| Header | Format | Where |
|---|---|---|
x-api-key | x-api-key: gd-... | Anthropic SDK, Claude Code, /v1/messages |
Authorization | Authorization: Bearer gd-... | OpenAI SDK, Codex, Claude Chat Completions / Responses |
For Claude, use the one header expected by your SDK or client.
Two headers, one key
Anthropic SDK / Claude Code
x-api-key: gd-…OpenAI SDK / Codex
Authorization: Bearer gd-…One keyOne balance
gd-…ActiveRequest
Revoked
401bash
curl https://api.guardrelay.ai/v1/messages \
-H "x-api-key: $GUARD_API_KEY" \
-H "anthropic-version: 2023-06-01" ...| Header | Format | Where |
|---|---|---|
Authorization | Authorization: Bearer gd-... | Kimi POST /v1/chat/completions |
For Kimi, pass the universal gd-… key as a Bearer token.
bash
curl https://api.guardrelay.ai/v1/chat/completions \
-H "Authorization: Bearer $GUARD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"k3","messages":[{"role":"user","content":"Hello!"}],"max_tokens":128}'Composer and Grok take the same gd-… key. The header follows the client: Anthropic clients send x-api-key, OpenAI-compatible ones send Authorization: Bearer. Both headers reach the same key and the same balance.
bash
curl https://api.guardrelay.ai/v1/chat/completions \
-H "Authorization: Bearer $GUARD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"cursor-grok-4.6-low","messages":[{"role":"user","content":"Hello!"}],"max_tokens":128}'bash
curl https://api.guardrelay.ai/v1/chat/completions \
-H "Authorization: Bearer $GUARD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"composer-2.5","messages":[{"role":"user","content":"Hello!"}],"max_tokens":128}'In the bot you can keep several active keys and revoke any of them individually. A revoked key returns 401 immediately.