DocumentationAPI reference

API reference

Get back to building.

Understand authentication, setup and request failures without guessing.

HTTP status codes

#
StatusMeaningNext step
400Invalid JSON, model or protocolCheck the body and the current model catalog.
401Missing, invalid, revoked or expired keyUse an active XEDOC API key.
402Insufficient available token balanceCheck Overview. Active requests can hold balance; lower the requested output limit or ask an administrator to adjust your balance.
403API access awaiting activation or access deniedCheck the account status in your dashboard.
404Unsupported routeUse one of the documented endpoints.
413Request body too largeReduce input or attachment size.
429Request limit reachedRespect Retry-After and reduce request frequency.
502The model service failed or its response was interruptedInspect the failure before deciding whether a retry is safe.
503Generation/model paused, provider unavailable or coordination unavailableRespect Retry-After when present and check availability.

Read the error body

#
Gateway error examplejson
{
  "detail": "Your API access is awaiting activation"
}

Gateway validation errors use a detail field. Model-service or streaming protocol errors may use an error object or an SSE error event. Handle the HTTP status and the format for the endpoint you are using. Never log Authorization headers or the full API key.

Client setup

#
SymptomWhat to check
npx.ps1 cannot be loadedUse npx.cmd in PowerShell.
No characters appear while pasting the keyInput is hidden. Paste once and press Enter.
xedoc command not foundOpen a new terminal, check npm’s global bin PATH, or use npx.
The model picker is missing XEDOC modelsRun setup for that client, fully quit it and reopen.
Codex cannot execute the credential helperCheck Node is installed at the saved path; rerun setup after moving or updating Node.
Claude Code works but Desktop does notConfigure Claude Desktop separately; its Code connection does not use settings.json.
A configuration cannot be parsedFix the reported client file or restore a valid backup; setup will not overwrite malformed JSON/TOML.
A managed desktop app ignores local changesAsk the organization administrator about the effective inference policy.

Limits and recorded usage

#

Generation limits apply to the account across its keys and gateway instances. Creating extra keys does not multiply the account allowance. Follow Retry-After rather than retrying in a tight loop.

Your token balance is separate from raw model usage. The charge applies the model’s input, cached-input and output factors; cached input is counted once. For example, 100,000 tokens at ×5 costs 500,000 balance tokens. Request details show the rates used for that request.

A request reserves credit for its input and output limit before it starts. Unused reserved credit is released when final usage is known. If no output limit is supplied, the gateway sets a 4,096-token output limit. Image attachments and stored conversation references can require a larger input hold. Requests with unknown final usage remain pending reconciliation; older requests are marked Not billed.

Requests records known token usage and status without storing prompt or response text. Unknown usage is shown as unknown, not invented as zero. You can inspect request metadata in Dashboard → Requests.