Skip to content
Connect a clientRoo Code

Roo Code

Set up Roo Code: choose the API format, Guard URL, key and model.

Set up with your own AI
Model protocol

Claude, Kimi, Composer and Grok

Roo Code is a Cline fork for VS Code, configured the same way. A third-party key — no restrictions.

  1. Install the Roo Code extension from the VS Code Marketplace.
  2. Settings → API Provider → Anthropic.
  3. Check Use custom base URL → https://api.guardrelay.ai.
  4. API Key — gd-… from the bot.
  5. Model — claude-sonnet-5-5 or claude-opus-5.

Kimi

Kimi works with either provider. For Anthropic, set the Custom Base URL to https://api.guardrelay.ai; for an OpenAI-compatible one, set Base URL to https://api.guardrelay.ai/v1. The key is the same gd-… and the balance is shared, and Model takes one of the four Kimi IDs.

Composer and Grok

Both addresses work: https://api.guardrelay.ai on the Anthropic provider and https://api.guardrelay.ai/v1 on an OpenAI-compatible one. Put the exact id in Model, for example cursor-grok-4.6-medium or composer-2.5-fast.

GLM 5.3 in Roo Code

Open an existing Roo Code installation

This guide applies to an existing Roo Code 3.54 installation. For a new installation, prefer the maintained Cline. Open a separate test folder and the Roo Code panel in VS Code.

Get a Guard key

Get a universal gd-… key from the direct API link in @guardapi and choose an API package. Do not put the key in a project, repository, task prompt, or screenshot. Balance and usage are available in your Guard account.

Configure OpenAI Compatible

  1. Select the Roo Code gear and choose API Provider → OpenAI Compatible. Do not choose Native Responses.
  2. Set Base URL to https://api.guardrelay.ai/glm/v1, API Key to gd-…, and Model to glm-5.3.
  3. Keep Enable streaming on. Disable Enable R1 model parameters, Use Azure, Enable Reasoning Effort, and custom temperature; leave Custom Headers empty.
  4. If Include max output tokens is enabled, set Max Output Tokens to 4096 as a bounded client example. Do not treat Context Window Size as the GLM limit or publish it as a model property.
Roo Code fieldValue
API ProviderOpenAI Compatible
Base URLhttps://api.guardrelay.ai/glm/v1
API Keygd-…
Modelglm-5.3
Max Output Tokens4096
Final requestPOST https://api.guardrelay.ai/glm/v1/chat/completions

Quick check and continuation

  1. Open a new task and send: Read README.md and reply with exactly GUARD_GLM_OK. Change nothing.
  2. Approve only reading. Then, in the same task, ask for the line without reopening the file.
  3. If the first command reports a missing rg or cannot find files, this is a Roo client dependency issue: reinstall/update it or use Cline.

Models and confirmed capabilities

Model IDWhen to use it
glm-5.3Default model; text and coding tasks.
glm-5.3-flashFast model; at API level it accepts PNG and PDF through all three protocols, and MP4 through Chat Completions only.
  • With the stated dependency qualification, streaming Chat, local tools, and same-task continuation are confirmed.
  • The client itself executes file, edit, and terminal tools. This profile does not connect Z.AI tools or MCP automatically.
  • The Chat API permits MP4 with Flash and PNG/PDF at API level; attachments through the Roo UI were not checked.
  • The profile uses OpenAI-compatible Chat Completions. The GLM server prompt is off by default for ordinary API access; client setup does not enable it.
  • Native TXT, DOCX, and XLSX are outside the confirmed GLM contract. Use PDF for documents, or PNG with glm-5.3-flash for images.

If the connection fails

SymptomWhat to check
401 invalid_api_keyThe client received the complete active gd-… key; the variable is set in the same process that starts the client.
404 model_not_foundThe model ID is exactly glm-5.3 or glm-5.3-flash; old GLM IDs, aliases, Turbo, and FlashX are unsupported.
404 or incorrect pathBase URL is https://api.guardrelay.ai/glm/v1. The client appends /chat/completions; do not add it twice.
400 invalid_requestThe documented API format is selected; reasoning, temperature, MCP, or other unconfirmed fields were not copied from an older profile.
402 insufficient_balanceCheck available balance and unfinished reservations in your Guard account.
The model is replaced or the request uses another routeChoose OpenAI Compatible, exact glm-5.3, and disable Native Responses, R1, and Reasoning Effort.

Gemini in Roo Code

Open Roo Code

For a new installation, prefer the maintained Cline. Open a separate test folder and the Roo Code panel in VS Code.

Get a Guard key

Get a universal gd-… key from the direct API link in @guardapi and choose an API package. Do not put the key in a project, repository, task prompt, or screenshot. Balance and usage are available in your Guard account.

Configure OpenAI Compatible

  1. Select the Roo Code gear and choose API Provider → OpenAI Compatible. Do not choose Native Responses.
  2. Set Base URL to https://api.guardrelay.ai/v1, API Key to gd-…, and Model to gemini-4-argon.
  3. Keep Enable streaming on. Disable Enable R1 model parameters, Use Azure, Enable Reasoning Effort, and custom temperature; leave Custom Headers empty.
  4. If Include max output tokens is enabled, set Max Output Tokens to 4096 as a bounded client example.
Roo Code fieldValue
API ProviderOpenAI Compatible
Base URLhttps://api.guardrelay.ai/v1
API Keygd-…
Modelgemini-4-argon
Max Output Tokens4096
Final requestPOST https://api.guardrelay.ai/v1/chat/completions

Quick check and continuation

  1. Open a new task and send: Read README.md and reply with exactly GUARD_GEMINI_OK. Change nothing.
  2. Approve only reading. Then, in the same task, ask for the line without reopening the file.

Gemini models and capabilities

Model IDInput and window
gemini-4-argonText, images, PDF; 1,048,576-token window, shared by input and answer.
gemini-3.8-flashText, images, PDF; 1,048,576-token window for input.
  • Roo Code itself executes file and terminal tools; it sends the task history to Gemini with every request.
  • The Guard catalog takes text, images, and PDF as input and returns text. How to send a file or an image depends on the client's interface; this guide does not describe attachments.
  • The profile uses OpenAI-compatible Chat Completions. The server prompt is a separate setting of the Gemini family: it applies only when the key has the entitlement and the option is on; client setup does not enable it.

If the connection fails

SymptomWhat to check
401 invalid_api_keyThe client received the complete active gd-… key; the variable is set in the same process that starts the client.
404 model_not_foundThe model ID is an exact ID from the table above or the short name gemini; other spellings are unsupported.
404 or incorrect pathBase URL is https://api.guardrelay.ai/v1. The client appends /chat/completions; do not add it twice.
400 invalid_requestThe documented API format is selected; extra settings from an older profile were not copied: reasoning, temperature, MCP, and others.
402 insufficient_creditCheck available balance and unfinished reservations in your Guard account.
The model is replaced or the request uses another routeChoose OpenAI Compatible, exact gemini-4-argon, and disable Native Responses, R1, and Reasoning Effort.

Muse in Roo Code

Open Roo Code

For a new installation, prefer the maintained Cline. Open a separate test folder and the Roo Code panel in VS Code.

Get a Guard key

Get a universal gd-… key from the direct API link in @guardapi and choose an API package. Do not put the key in a project, repository, task prompt, or screenshot. Balance and usage are available in your Guard account.

Configure OpenAI Compatible

  1. Select the Roo Code gear and choose API Provider → OpenAI Compatible. Do not choose Native Responses.
  2. Set Base URL to https://api.guardrelay.ai/v1, API Key to gd-…, and Model to muse-wonder-1.0.
  3. Keep Enable streaming on. Disable Enable R1 model parameters, Use Azure, Enable Reasoning Effort, and custom temperature; leave Custom Headers empty.
  4. If Include max output tokens is enabled, set Max Output Tokens to 4096 as a bounded client example.
Roo Code fieldValue
API ProviderOpenAI Compatible
Base URLhttps://api.guardrelay.ai/v1
API Keygd-…
Modelmuse-wonder-1.0
Max Output Tokens4096
Final requestPOST https://api.guardrelay.ai/v1/chat/completions

Quick check and continuation

  1. Open a new task and send: Read README.md and reply with exactly GUARD_MUSE_OK. Change nothing.
  2. Approve only reading. Then, in the same task, ask for the line without reopening the file.

Muse models and capabilities

Model IDInput and window
muse-wonder-1.0Text, images, PDF; 1,048,576-token window.
muse-spark-1.3Text, images, PDF; 1,048,576-token window.
muse-spark-1.2Text, images, PDF; 1,048,576-token window.
  • Roo Code itself executes file and terminal tools; it sends the task history to Muse with every request.
  • The Guard catalog takes text, images, and PDF as input and returns text. How to send a file or an image depends on the client's interface; this guide does not describe attachments.
  • The profile uses OpenAI-compatible Chat Completions. The server prompt is a separate setting of the Muse family: it applies only when the key has the entitlement and the option is on; client setup does not enable it.

If the connection fails

SymptomWhat to check
401 invalid_api_keyThe client received the complete active gd-… key; the variable is set in the same process that starts the client.
404 model_not_foundThe model ID is an exact ID from the table above or the short name muse; other spellings are unsupported.
404 or incorrect pathBase URL is https://api.guardrelay.ai/v1. The client appends /chat/completions; do not add it twice.
400 invalid_requestThe documented API format is selected; extra settings from an older profile were not copied: reasoning, temperature, MCP, and others.
402 insufficient_creditCheck available balance and unfinished reservations in your Guard account.
The model is replaced or the request uses another routeChoose OpenAI Compatible, exact muse-wonder-1.0, and disable Native Responses, R1, and Reasoning Effort.

Codex in Roo Code

This section is for people who already have the Roo Code extension: extension development has ended. For a new installation, use the maintained Cline. In an existing Roo Code installation, configure the Codex family through OpenAI Compatible and Chat Completions. Get your gd-… key from the Guard bot.

For a connection check, use a plain chat without files and ask “Reply: connection established”. To check project work, create a separate guard-test folder in File Explorer or Finder, open it in your editor, and create README.md containing “This is a Guard test project”. The file-reading example below uses that folder.

Model IDName
gpt-6-astraGPT-6 Astra
gpt-6.1-solGPT-6.1 Sol
gpt-6-solGPT-6 Sol
gpt-6-lunaGPT-6 Luna
gpt-5.6-solGPT-5.6 Sol
gpt-5.6-terraGPT-5.6 Terra
gpt-5.6-lunaGPT-5.6 Luna

Set up an existing Roo Code installation

  1. Open VS Code and a test folder without secrets and with a README.md through File → Open Folder. Open the Roo Code panel from the sidebar icon and select the settings gear.
  2. Choose OpenAI Compatible under API Provider, not Anthropic, OpenAI, or Native Responses.
  3. Set Base URL to https://api.guardrelay.ai/codex/v1.
  4. Paste your gd-… key from the bot into API Key; do not put it in task text or a project file.
  5. Select or enter the exact gpt-6-astra value under Model. Turn off Enable Streaming, Include Max Output Tokens, R1 format, Use Azure, Set reasoning level, and Advanced → Use custom temperature; leave Custom Headers empty. See Models for other exact IDs and effort levels.
  6. Save the settings, open a new Roo Code task, and send: Read README.md and explain in two sentences what this test project does. Do not change anything. If Roo Code asks for permission, allow only a read of that file.
  7. Continue in the same task with: Name one fact from README.md that supports your explanation. Create a new task for another question.
Roo Code fieldValue
API ProviderOpenAI Compatible
Base URLhttps://api.guardrelay.ai/codex/v1
API Keygd-…
Modelgpt-6-astra
Final requestPOST https://api.guardrelay.ai/codex/v1/chat/completions

After checking file reading, you can request a change: “Add a Test section and one descriptive line to README.md.” Review the proposed edit and approve it if it matches your task. Command, file and tool permissions are controlled by the client; connecting Guard does not require granting unrestricted access to your whole computer.

Sections

On this page