Skip to content
Getting startedKeys and URL

Keys and URL

What to use, what not to touch.

Model protocol

Guard issues its own universal gd-… keys. The gateway validates the key, selects the family from the exact model id, and deducts Claude, Kimi, Composer or Grok usage from the key's one shared balance.

ParameterValue
Base URLhttps://api.guardrelay.ai
API Keygd-… from @subscribe_ai_bot
Dashboardapp.guardrelay.ai/
One address, three protocols
Shared key
gd-…
GUARD API
https://api.guardrelay.ai
Anthropic Messages
/v1/messages
Chat Completions
/v1/chat/completions
Responses
/v1/responses
Exact model id
model
Choose the protocol your client expects. The OpenAI SDK Base URL includes /v1; the model field selects the family.

Claude endpoints

For Claude, the gateway supports Anthropic- and OpenAI-compatible formats. Choose the endpoint your client expects.

EndpointFormatWho uses it
/v1/messagesAnthropic MessagesClaude Code, Anthropic SDK, curl
/v1/chat/completionsOpenAI ChatOpenAI SDK, most clients
/v1/responsesOpenAI ResponsesCodex (newer versions)

Kimi surfaces

The key and the address are shared by every family. The gateway picks the family from the exact model id in the model field, so Kimi needs no separate key and no separate address.

What you configureValue for Kimi
OpenAI SDK Base URLhttps://api.guardrelay.ai/v1
HeaderAuthorization: Bearer gd-…
Surfacesall three: plain POST /v1/chat/completions, the Anthropic Messages protocol and the Responses protocol
Modelsk3, k3-256k, kimi-for-coding, kimi-for-coding-highspeed

Check the key

bash
curl -X POST https://api.guardrelay.ai/v1/chat/completions \
  -H "Authorization: Bearer gd-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "k3",
    "messages": [{"role": "user", "content": "Hello!"}],
    "max_tokens": 128
  }'

Request chain

  1. Key check: limit, validity, revocation.
  2. Route to Claude, Kimi, Composer or Grok from the exact model id.
  3. Deduct tokens from the shared key credit.

Claude Code

Environment variables
bash · macOS / Linux
export ANTHROPIC_BASE_URL="https://api.guardrelay.ai"
export ANTHROPIC_AUTH_TOKEN="gd-your-key-from-bot"

claude
PowerShell · Windows
$env:ANTHROPIC_BASE_URL = "https://api.guardrelay.ai"
$env:ANTHROPIC_AUTH_TOKEN = "gd-your-key-from-bot"

claude

Composer and Grok endpoints

These models answer on all three surfaces. The endpoint follows your client, the model follows the model field.

EndpointRequest fields
/v1/messagesmodel, messages, system, max_tokens, stream, tools
/v1/chat/completionsmodel, messages, max_tokens or max_completion_tokens, stream, tools
/v1/responsesmodel, input, instructions, max_output_tokens, stream, tools

Check the key

The key and the address are the same as for Claude: these models need no separate signup and no separate address. The gateway picks the family from the exact id in the model field, and the key keeps one balance for every family.

bash
curl -X POST https://api.guardrelay.ai/v1/chat/completions \
  -H "Authorization: Bearer gd-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "cursor-grok-4.6-low",
    "messages": [{"role": "user", "content": "Hello!"}],
    "max_tokens": 128
  }'
bash
curl -X POST https://api.guardrelay.ai/v1/chat/completions \
  -H "Authorization: Bearer gd-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "composer-2.5",
    "messages": [{"role": "user", "content": "Hello!"}],
    "max_tokens": 128
  }'

Documentation sections

On this page