Relay365Multi-model API relay desk

Wiring runbook

Every API call goes to https://api.api365relay.com; the main site is only for managing your account.

1Line address table

One relay endpoint takes all three protocols; enter the address and auth header that match what your client speaks.

Protocol laneAddress to enterAuth headerMain paths
Anthropic Messages · Claude Code / Claude Desktophttps://api.api365relay.comx-api-key/v1/messages · /v1/messages/count_tokens
OpenAI · Codex / OpenAI SDKhttps://api.api365relay.com/v1Authorization: Bearer/chat/completions · /responses · /models
Gemini · Gemini CLIhttps://api.api365relay.comx-goog-api-key/v1beta/models/{model}:generateContent · :streamGenerateContent?alt=sse

2Status codes and what to do

CodeWhat it meansWhat to do
401No key, a mistyped key, or a disabled keyCopy an in-use key from the dashboard and send it in the header listed above
402Wallet is empty, or the duty pass quota or 7-day ceiling is used upTop up, or switch to a duty pass that still has quota
403The account is switched off, or a pass key called another model familyUse a wallet key for models outside the pass family
404The path is not on any desk lane (Gemini paths look like /v1beta/models/model:method)Check the base URL and path against the table above
413The request body is over 25 MBTrim the context or attachments and resend
429Over 120 calls in 60 seconds on one key, or more than 8 requests in flight for one accountWait a moment and keep concurrency at 8 or fewer
502 / 503The upstream lane did not answer (502) or is not configured (503); nothing is billedRetry shortly; if it persists, leave a message via Contact

3Client configuration table

Client toolWhat to setValue to use
Claude Code / Claude DesktopANTHROPIC_BASE_URL · ANTHROPIC_AUTH_TOKENRelay endpoint, without /v1 · Your API key
Codex CLIOPENAI_BASE_URL · OPENAI_API_KEYRelay endpoint plus /v1 · Your API key
OpenAI SDKbase_url · api_keyRelay endpoint plus /v1 · Your API key
Gemini CLIGOOGLE_GEMINI_BASE_URL · GEMINI_API_KEYRelay endpoint, without /v1 · Your API key
cURLAuthorization: BearerYour API key
Upstream accepts Claude models only from the official Claude Code / Claude Desktop clients, and Claude Code must be 2.1.285 or newer. GPT, Gemini and the rest work from any OpenAI-compatible client or SDK.
export ANTHROPIC_BASE_URL=https://api.api365relay.com
export ANTHROPIC_AUTH_TOKEN=r365-your-line-key
claude

Replace $R365_KEY with your line key; a reply means the line is up.

curl https://api.api365relay.com/v1/chat/completions \
  -H "Authorization: Bearer $R365_KEY" -H "Content-Type: application/json" \
  -d '{"model":"gpt-6.1-sol","messages":[{"role":"user","content":"ping from the night shift"}]}'

GPT wire names on the board: gpt-6.1-sol gpt-6-astra gpt-5.6-sol

Gemini uses its native protocol only: :generateContent for single replies, :streamGenerateContent?alt=sse for streams. It cannot go through /v1/chat/completions.
curl "https://api.api365relay.com/v1beta/models/gemini-3.8-flash:generateContent" \
  -H "x-goog-api-key: $R365_KEY" -H "Content-Type: application/json" \
  -d '{"contents":[{"role":"user","parts":[{"text":"ping from the night shift"}]}]}'

Gemini wire names on the board: gemini-3.1-pro gemini-4-argon gemini-3.8-flash gemini-2.5-flash

4Metering rules

  • Each request is billed on the token counts upstream reports; cache fills and cache recalls have their own rates.
  • HTTP 402: the wallet is empty or the pass quota is used up; topping up restores service.
  • HTTP 429: more than 120 calls in 60 seconds on one key, or more than 8 requests in flight for one account.
  • HTTP 401: the key is missing, mistyped or stood down.
  • OpenAI-style calls send the key as Authorization: Bearer, Anthropic-style calls use x-api-key, Gemini uses x-goog-api-key.