Skip to content

Quickstart

Send your first request.

Create a Relay key, configure your client, and choose an available model from the console. These examples use the Chat Completions API.

  1. 1Create a key
  2. 2Configure your client
  3. 3Send a model request

Base URL

https://proxystacks.com/v1

Model ID

YOUR_MODEL_ID

Replace YOUR_MODEL_ID with an available model ID from your console.

curl https://proxystacks.com/v1/chat/completions \
  -H "Authorization: Bearer sk-relay-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "YOUR_MODEL_ID",
    "messages": [
      { "role": "user", "content": "Hello, Relay!" }
    ],
    "stream": true
  }'

Authentication

Every model request must carry a Bearer token in the Authorization header. Relay stores only the SHA-256 hash of your API key.

Streaming

Set stream: true to get a standard SSE data stream. Balance deduction completes automatically once the stream ends.

Response format

Non-streaming responses use a standard JSON response format, plus a Relay request ID in the response header for easy log lookup.

AI coding tools

Point your AI coding tools at the Relay gateway. Copy a config block into the target file, then replace sk-relay-your-key and YOUR_MODEL_ID.

Merge into the env block of ~/.claude/settings.json, then restart Claude Code. ANTHROPIC_AUTH_TOKEN is sent as a Bearer token.

~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "sk-relay-your-key",
    "ANTHROPIC_BASE_URL": "https://proxystacks.com/anthropic",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "YOUR_MODEL_ID",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "YOUR_MODEL_ID",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "YOUR_MODEL_ID",
    "ANTHROPIC_SMALL_FAST_MODEL": "YOUR_MODEL_ID"
  }
}
Run into trouble? [email protected]