Gateway URL
Authentication
The gateway accepts your virtual key in either header:Authorization: Bearer wardin_sk_...(canonical)x-api-key: wardin_sk_...(what the Anthropic SDK’sapi_keymode sends)
Supported protocols
There is no OpenAI-compatible
/v1/chat/completions endpoint. To reach a GPT model, send the request in Anthropic Messages format to /v1/messages with a gpt-* model name — the gateway resolves the model to its provider and translates the request/response shape.
SDK examples
Streaming
Streaming works without any changes. The gateway transparently forwards server-sent events (SSE) from the provider to your client. Token usage is parsed from the finalmessage_delta event for billing.
Request attribution headers
Add these optional headers to improve analytics granularity:
If
X-Wardin-Session-Id is not provided, the gateway groups requests using idle-timeout bucketing (30-minute sliding window). See Sessions.
User attribution comes from the virtual key’s owner — issue one key per developer rather than sharing keys.