Integrate

Integration Docs

Integrate in three steps: register → create an API Key in the console → swap the Base URL and call. Minimal working examples below.

Unified Base URL https://api.wos.one/v1

Three steps

  1. 1. Register

    Sign up free in the console — no credit card, instant access.

  2. 2. Create an API Key

    Log in to the console and create an API Key in key management; keep it safe.

  3. 3. Swap Base URL and call

    Point your client’s Base URL at the Chonway API endpoint, add your key, and start calling.

Call examples

Examples use the OpenAI-compatible protocol with Base URL https://api.wos.one/v1.

curl
curl https://api.wos.one/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.4",
    "messages": [{"role": "user", "content": "Hello"}]
  }'
Python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.wos.one/v1",
    api_key="your-key",
)
resp = client.chat.completions.create(
    model="gpt-5.4",
    messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)
Node.js
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.wos.one/v1",
  apiKey: process.env.API_KEY,
});
const resp = await client.chat.completions.create({
  model: "gpt-5.4",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(resp.choices[0].message.content);

Use with Claude Code / Codex

Claude Code (Anthropic protocol)
export ANTHROPIC_BASE_URL=https://api.wos.one
export ANTHROPIC_API_KEY=your-key
claude
Codex / OpenAI-compatible
export OPENAI_BASE_URL=https://api.wos.one/v1
export OPENAI_API_KEY=your-key

Common error codes

Follows standard HTTP semantics for easy debugging.

401 Missing or invalid API Key — check the Authorization header and your key.
403 Forbidden — the key may be disabled or lacks permission for the resource.
404 Not found — check the model name and request path.
429 Too many requests — rate limited; back off and retry.
500 Internal server error — please retry later.
503 Service unavailable — upstream busy or under maintenance; retry later.

Hand AI integration over to Chonway API today

One Base URL for the full Claude & GPT lineup. Instant access, pay-as-you-go, up to 30% off official.