Skip to content
Getting startedQuick start

Quick start

A key from the bot, a model family, and the first request.

Model protocol

Guard gives access to the Claude, Kimi, GLM, Gemini, Muse, Composer, Grok, and Codex families through one universal key, with no sign-ups, KYC, or VPN. Buy a package in @guardapi, get a gd-… key, and pick a client below.

How an application connects to models
API Key
gd-…
Base URL
https://api.guardrelay.ai
Your application
GUARD API
model
ClaudeKimiGLMGeminiMuseComposerGrokCodex
Model families
Set the key and address in your application. GUARD API selects the family from the exact model id; the key has one shared balance.

1. Get a key

  1. @guardapi → Categories → API.
  2. Choose a package and an available payment method from the bot's live catalog.
  3. The bot sends a gd-… key — save it.

2. Connect a client

Choose where you will use your key.

Guard CodeOur VS Code agent for every familyClaude CodeCLI on Windows / Mac / LinuxVS CodeClaude Code extension in a folderCodexOpenAI-compatible CLIKimi APIChat Completions and four modelsGLM APIMessages, Chat, Responses, and two 5.3 modelsGemini APIMessages, Chat, Responses, and two modelsMuse APIMessages, Chat, Responses, and three modelsClaude CodeCLI on Windows / Mac / LinuxVS CodeClaude Code panel in a folderVS CodeCodex extension in the editorCline / Roo CodeAn agent in the editor on your keyPython / NodeSDK in your own codeHermes AgentNous Research terminal agentOpenClawLocal gateway assistantKimi CLIMoonshot AI terminal agentGrok CLIxAI console agentZCodeZ.ai desktop agentCodex APIResponses, Chat, Messages and seven GPT models

3. First Claude request

Check the key with one command. macOS / Linux: run the command, paste your key at the Guard API key prompt, and press Enter. Input is hidden and is not stored as part of a shell command in history.

bash
{
unset GUARD_API_KEY
until [ -n "${GUARD_API_KEY-}" ]; do printf "Guard API key: "; read -r -s GUARD_API_KEY || break; printf "\n"; done
curl https://api.guardrelay.ai/v1/messages \
  -H "x-api-key: $GUARD_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-haiku-5-5",
    "max_tokens": 64,
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
}

Windows PowerShell: run these commands, paste your key at the Guard API key prompt, and press Enter. Input is hidden and is not stored as part of a shell command in history.

powershell
$env:ANTHROPIC_BASE_URL = "https://api.guardrelay.ai"
$guardKey = Read-Host "Guard API key" -AsSecureString
$env:ANTHROPIC_API_KEY = [System.Net.NetworkCredential]::new("", $guardKey).Password

$body = @{ model = "claude-haiku-5-5"; max_tokens = 64; messages = @(@{ role = "user"; content = "Hello!" }) } | ConvertTo-Json -Depth 5
Invoke-RestMethod -Uri "$env:ANTHROPIC_BASE_URL/v1/messages" -Method POST -Headers @{ "x-api-key" = $env:ANTHROPIC_API_KEY; "anthropic-version" = "2023-06-01"; "content-type" = "application/json" } -Body $body

3. First Kimi request

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
  }'

3. First Grok request

Check the key with one command. Grok 4.7 encodes effort and context in the model id; effort itself does not change the rate. For a check, take cursor-grok-4.7-low; Guard currently publishes only a 256K window for Grok 4.7.

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.7-low",
    "messages": [{"role": "user", "content": "Hello!"}],
    "max_tokens": 128
  }'

3. First Composer request

Check the key with one command. Composer has two ids: the regular composer-2.5 and composer-2.5-fast, which returns the same answer sooner and costs more.

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
  }'

Set up with your own AI

Copy the prompt below into an AI that can work with files and a terminal. Replace only gd-… with your issued key. The prompt already carries the address, the header, the surfaces and the exact model ids of your family, so the AI does not have to configure anything from memory, and it is told to keep the key secret.

text
Help me connect Guard API, the Claude family. My key is: gd-…

Before making any changes:
1. Ask which client, CLI, or SDK I want to connect.
2. Detect my OS yourself: macOS, Windows, or Linux.
3. Open and read the current Guard API documentation at https://docs.guardrelay.ai/ : the page for the selected client and the model list page. Do not configure from memory.
4. Use only a connection method that the selected client or SDK supports officially. You may install missing dependencies and client tools when needed.

What is already known about this family, no need to work it out again:
- Address: https://api.guardrelay.ai , and for OpenAI-compatible clients the Base URL is https://api.guardrelay.ai/v1
- Header: Authorization: Bearer gd-… . Anthropic clients send x-api-key: gd-… instead.
- Surfaces: /v1/messages for Anthropic clients, plus the OpenAI-compatible Chat Completions and Responses surfaces under the base address https://api.guardrelay.ai/v1 . Use the one the selected client expects.
- Models: claude-opus-5-5, claude-opus-5, claude-sonnet-5-5, claude-sonnet-5, claude-haiku-5-5, claude-haiku-4-5, claude-fable-5, claude-fable-5-1.
- Use claude-haiku-5-5 for the check, it is the cheapest one.
- No anthropic.com login, subscription or VPN is required: the gd-… key is enough on its own.

Security requirements:
- Never print or repeat the full key in messages, logs, or command output.
text
Help me connect Guard API, the Kimi family. My key is: gd-…

Before making any changes:
1. Ask which client, CLI, or SDK I want to connect.
2. Detect my OS yourself: macOS, Windows, or Linux.
3. Open and read the current Guard API documentation at https://docs.guardrelay.ai/ : the page for the selected client and the model list page. Do not configure from memory.
4. Use only a connection method that the selected client or SDK supports officially. You may install missing dependencies and client tools when needed.

What is already known about this family, no need to work it out again:
- Address: https://api.guardrelay.ai , and for OpenAI-compatible clients the Base URL is https://api.guardrelay.ai/v1
- Header: Authorization: Bearer gd-…
- There are three surfaces: POST /v1/chat/completions, plus the Anthropic Messages surface and the OpenAI Responses surface at the same address. Kimi serves all three.
- It follows that Claude Code and Codex do work with Kimi. Their ready-made setups live in the documentation, on the Claude Code, VS Code and Codex pages: open the right page and follow it exactly rather than working from memory.
- Any client that speaks plain Chat Completions will also do: Cline, Roo Code, n8n, the Python SDK, the Node SDK.
- Models: k3 and kimi-for-coding (Kimi K2.8 Preview) with a 1,048,576-token window; k3-256k and kimi-for-coding-highspeed (Kimi K2.7 Code HighSpeed) with a 262,144-token window.
- Always set an explicit max_tokens: without it the output half of the reserve is computed at Kimi's default (131,072 tokens for k3 and k3-256k, 32,768 for kimi-for-coding-highspeed, 32,000 for kimi-for-coding).

Security requirements:
text
Help me connect Guard API, the Grok family. My key is: gd-…

Before making any changes:
1. Ask which client, CLI, or SDK I want to connect.
2. Detect my OS yourself: macOS, Windows, or Linux.
3. Open and read the current Guard API documentation at https://docs.guardrelay.ai/ : the page for the selected client and the model list page. Do not configure from memory.
4. Use only a connection method that the selected client or SDK supports officially. You may install missing dependencies and client tools when needed.

What is already known about this family, no need to work it out again:
- Address: https://api.guardrelay.ai , and for OpenAI-compatible clients the Base URL is https://api.guardrelay.ai/v1
- Header: Authorization: Bearer gd-…
- API surfaces: /v1/messages, /v1/chat/completions, /v1/responses. Their availability does not prove compatibility with a particular client. Codex 0.155 does not currently work with Composer/Grok because it adds unsupported `id`, `web_search`, and `namespace` data.
- Grok 4.7: cursor-grok-4.7-low, cursor-grok-4.7-medium, cursor-grok-4.7-high, cursor-grok-4.7-xhigh and four paired variants with a final -fast. All eight ids use a 256K window; the eight Grok 4.6 ids remain available.
- Effort and Fast mode are part of the id. Effort does not change the price. Guard currently publishes a 256,000-token window for Grok 4.7.
- Grok 4.7 is currently text-only: image support is not published. Grok 4.6 keeps images and its 500K window.
- For a separate API check with curl, use the recommended `cursor-grok-4.7-low`; this does not prove the selected client works.
- The tools field is accepted. temperature, top_p, metadata and thinking are accepted without effect; tool_choice supports only the automatic form of the selected API. response_format, reasoning_effort and stop are unsupported. Check other fields against the selected API reference.

text
Help me connect Guard API, the Composer family. My key is: gd-…

Before making any changes:
1. Ask which client, CLI, or SDK I want to connect.
2. Detect my OS yourself: macOS, Windows, or Linux.
3. Open and read the current Guard API documentation at https://docs.guardrelay.ai/ : the page for the selected client and the model list page. Do not configure from memory.
4. Use only a connection method that the selected client or SDK supports officially. You may install missing dependencies and client tools when needed.

What is already known about this family, no need to work it out again:
- Address: https://api.guardrelay.ai , and for OpenAI-compatible clients the Base URL is https://api.guardrelay.ai/v1
- Header: Authorization: Bearer gd-…
- API surfaces: /v1/messages, /v1/chat/completions, /v1/responses. Their availability does not prove compatibility with a particular client. Codex 0.155 does not currently work with Composer/Grok because it adds unsupported `id`, `web_search`, and `namespace` data.
- There are two models: composer-2.5 and composer-2.5-fast. The second one returns the same answer sooner and costs more.
- Composer has no effort levels, it does not accept images, and its context window is 200,000 tokens.
- On a long input Composer answers from a short summary rather than from my full text. Split a large document into parts.
- Use composer-2.5 for the check.
- The tools field is accepted. temperature, top_p, metadata and thinking are accepted without effect; tool_choice supports only the automatic form of the selected API. response_format, reasoning_effort and stop are unsupported. Check other fields against the selected API reference.

3. First Codex request

The Codex family works through the shared /v1 and retained /codex/v1 namespaces; the primary example uses Responses with gpt-6-astra. Take an exact id from the model catalog.

bash
curl https://api.guardrelay.ai/codex/v1/responses \
  -H "Authorization: Bearer $GUARD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-6-astra",
    "input": "Connection check: reply OK",
    "store": false
  }'

Connect an application

  1. Use your existing Guard key, or get an API package from the Guard bot.
  2. Open your application under Connect a client, select GLM, and follow its setup steps.
  3. Start with glm-5.3; select glm-5.3-flash for Flash. Both use the shared balance; see usage in your Guard account.

First GLM request

For a custom integration or endpoint check, run the following example in a terminal.

One gd-… key opens both GLM models and charges the shared balance. Start with glm-5.3; the dedicated GLM Base URL is https://api.guardrelay.ai/glm/v1.

  1. Save the key in GUARD_API_KEY.
  2. Call the family Chat Completions endpoint with max_tokens: 4096.
  3. Check choices[0].message.content, finish_reason, and usage.
  4. After the JSON request works, add stream: true if needed.
bash
export GUARD_API_KEY="gd-your-key"
curl https://api.guardrelay.ai/glm/v1/chat/completions \
  -H "Authorization: Bearer $GUARD_API_KEY" \
  -H "content-type: application/json" \
  -d '{"model":"glm-5.3","messages":[{"role":"user","content":"Reply with OK"}],"max_tokens":4096}'
powershell
$env:GUARD_API_KEY = "gd-your-key"
$headers = @{ Authorization = "Bearer $env:GUARD_API_KEY" }
$body = @{
  model = "glm-5.3"
  max_tokens = 4096
  messages = @(@{ role = "user"; content = "Reply with OK" })
} | ConvertTo-Json -Depth 10
Invoke-RestMethod -Method Post `
  -Uri "https://api.guardrelay.ai/glm/v1/chat/completions" `
  -Headers $headers `
  -ContentType "application/json" `
  -Body $body

Next choose the contract you need: Messages, Chat Completions, or Responses. See GLM API for the model, price, and media matrix.

Connect an application to Gemini

  1. Use your existing Guard key, or get an API package from the Guard bot.
  2. Open your application under Connect a client, select Gemini, and follow its setup steps.
  3. Start with gemini-4-argon; the other models of the family are in the table on the Gemini API page. All models use the shared balance; see usage in your Guard account.

First Gemini request

For a custom integration or endpoint check, run the following example in a terminal.

One gd-… key opens both Gemini models and charges the shared balance. Start with gemini-4-argon; the shared address is https://api.guardrelay.ai/v1.

  1. Save the key in GUARD_API_KEY.
  2. Call Chat Completions with max_tokens: 4096.
  3. Check choices[0].message.content, finish_reason, and usage.
  4. After the JSON request works, add stream: true if needed.
bash
export GUARD_API_KEY="gd-your-key"
curl https://api.guardrelay.ai/v1/chat/completions \
  -H "Authorization: Bearer $GUARD_API_KEY" \
  -H "content-type: application/json" \
  -d '{"model":"gemini-4-argon","messages":[{"role":"user","content":"Reply with OK"}],"max_tokens":4096}'
powershell
$env:GUARD_API_KEY = "gd-your-key"
$headers = @{ Authorization = "Bearer $env:GUARD_API_KEY" }
$body = @{
  model = "gemini-4-argon"
  max_tokens = 4096
  messages = @(@{ role = "user"; content = "Reply with OK" })
} | ConvertTo-Json -Depth 10
Invoke-RestMethod -Method Post `
  -Uri "https://api.guardrelay.ai/v1/chat/completions" `
  -Headers $headers `
  -ContentType "application/json" `
  -Body $body

Next choose the contract you need: Messages, Chat Completions, or Responses. Models, prices, and the server prompt are described on the Gemini API page.

Connect an application to Muse

  1. Use your existing Guard key, or get an API package from the Guard bot.
  2. Open your application under Connect a client, select Muse, and follow its setup steps.
  3. Start with muse-wonder-1.0; the other models of the family are in the table on the Muse API page. All models use the shared balance; see usage in your Guard account.

First Muse request

For a custom integration or endpoint check, run the following example in a terminal.

One gd-… key opens all three Muse models and charges the shared balance. Start with muse-wonder-1.0; the shared address is https://api.guardrelay.ai/v1.

  1. Save the key in GUARD_API_KEY.
  2. Call Chat Completions with max_tokens: 4096.
  3. Check choices[0].message.content, finish_reason, and usage.
  4. After the JSON request works, add stream: true if needed.
bash
export GUARD_API_KEY="gd-your-key"
curl https://api.guardrelay.ai/v1/chat/completions \
  -H "Authorization: Bearer $GUARD_API_KEY" \
  -H "content-type: application/json" \
  -d '{"model":"muse-wonder-1.0","messages":[{"role":"user","content":"Reply with OK"}],"max_tokens":4096}'
powershell
$env:GUARD_API_KEY = "gd-your-key"
$headers = @{ Authorization = "Bearer $env:GUARD_API_KEY" }
$body = @{
  model = "muse-wonder-1.0"
  max_tokens = 4096
  messages = @(@{ role = "user"; content = "Reply with OK" })
} | ConvertTo-Json -Depth 10
Invoke-RestMethod -Method Post `
  -Uri "https://api.guardrelay.ai/v1/chat/completions" `
  -Headers $headers `
  -ContentType "application/json" `
  -Body $body

Next choose the contract you need: Messages, Chat Completions, or Responses. Models, prices, and the server prompt are described on the Muse API page.

Sections

On this page