Skip to main content
The Wardin gateway speaks the Anthropic Messages API format for every model it routes — Claude, GPT, Bedrock, and Gemini included. Point an Anthropic-compatible SDK at the gateway URL, swap in your virtual key, and pass whichever model name you want to reach (see Providers) — no other code changes.

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’s api_key mode 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 final message_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.

Response headers

Health check