Skip to content
Connect a clientCursor

Cursor

new

The built-in Agent on your gd-… key.

Set up with your own AI
Model protocol

Cursor can call an OpenAI-compatible address, and Guard serves one. Put the key into the editor's own settings and the built-in agent starts working through Guard.

1. Open model settings

  1. Cursor → SettingsModels.
  2. Scroll past the model list and expand API Keys.

2. Enter the key and address

  1. Paste your gd-… into OpenAI API Key and turn on the switch next to it.
  2. Turn on Override OpenAI Base URL and set the address below.
text
https://api.guardrelay.ai/v1

3. Add a model

Type the id you need into Add or search model and add it, then make sure its switch is on.

id for CursorContextWhen to use
claude-sonnet-51Mdefault: price and quality
claude-opus-51Mcomplex code and long agent runs
claude-opus-4-81Mthe previous flagship
claude-haiku-4-5200Kfast and cheap
claude-fable-51Mwithout an applied server prompt
claude-fable-5-11Mwithout an applied server prompt

Loose spellings such as sonnet-5, opus-5 or Claude-Sonnet-5 are accepted too: the server normalizes them.

id for CursorContextWhen to use
k31Mdefault: the largest window
k3-256k256K262,144-token window; the same base rate as k3
kimi-for-coding256Kcode and tool work
kimi-for-coding-highspeed256Kthe same, but faster

Type the id exactly, with no shortening and no spelling of your own: Cursor will not fill in a short form.

Grok 4.6 effort is part of the ID: low, medium, high, xhigh; each has a -fast variant with a separate rate. Grok 4.5 is removed. Composer has two IDs. Copy the full string from Models.

The full table for every family is on the Models page.

4. Open a new chat

New Chat → pick the added model in the list next to the input → send a request. Restarting Cursor is not needed.

What you can do

The built-in agent works with supported capabilities: long conversations, reading and searching project files, editing and creating code, running terminal commands and showing the output, images and attachments, replies in a strict format. Responses stream, and you can stop and continue them. Image, attachment and strict-format support depends on the selected family and API; for example, Composer does not accept images.

Web search and opening pages by link are done by Cursor on its own and returned to the model — no separate charge for that.

When a repeat request costs less

Cursor sends a large service block with every message — tool descriptions and the agent’s working rules. On a confirmed cache hit, this repeated input is charged at the lower cache-read rate.

A sufficiently large first request may write the cache, and later matching requests may read it at a lower rate. Hits and savings are not guaranteed: check cached tokens, tariff and discount in request history.

Cursor payment and Guard usage

Your Cursor subscription pays for the editor. Requests made with your gd-… are charged to the Guard balance and do not count against Cursor limits — see the dashboard.

If it does not work

What you seeWhat to do
The model you chose is not availableThat id is not in the Guard catalog. Check the table above or the Models page.
An error about a resource that cannot be foundMake sure the address ends with /v1 and has no extra path.
An authorization errorThe key was not copied in full, or the OpenAI API Key switch is off.
A built-in Cursor model answersIn the list next to the input pick the model you added.
An old chat behaves as beforeSettings apply to new chats — open New Chat.

Documentation sections

On this page