> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flexinference.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cursor

> Point Cursor at FlexInference with an agent key that carries the deadline.

Cursor sends chat completions to whatever base URL you set. The integration is two fields and a model name.

Cursor gives you nowhere to set `start_within`, so the deadline goes on an [agent key](https://docs.flexinference.com/agent-keys.md).

Pick a tier rather than **Flex race**, because Cursor sends Chat Completions parameters a race refuses.

Cursor keeps these settings in its own UI, with no config file to write, so this page has no agent setup prompt. The steps below take under a minute by hand.

## Configure Cursor

1. Open Cursor settings with `Cmd+,` on macOS, or `Ctrl+,` on Windows and Linux.

2. Click **Models** in the sidebar.

3. Enable **Override OpenAI Base URL**. Enter the router URL, including the `/v1` suffix.

   ```text theme={null}
   https://api.flexinference.com/v1
   ```

4. Paste your agent key into the **OpenAI API Key** field.

   ```text theme={null}
   flex_live_...
   ```

5. Add `gpt-5.6-sol` to the model list. Cursor sends this name to us verbatim.

6. Click **Verify**.

Cursor appends `/chat/completions` to the base URL and sends the key as a bearer token. The key supplies the deadline.

## Troubleshooting

**A `401` that doesn't look like ours.** The base URL is blank or wrong, so Cursor sent your key to `api.openai.com` and OpenAI refused it. Set both the base URL and the key field.

**`422` on Claude models.** That refusal isn't ours. We run `claude-*` on Chat Completions by translating the request onto Anthropic's Messages API, as long as the body has no native Chat parameter. Cursor's own Claude path through an overridden base URL fails this way on its side. Use a `gpt-*` slug to move on, or send the same request to us directly to see which side refuses it.

**Claude worked yesterday, `422` today.** Turning Anthropic BYOK on in Cursor also turns the base URL override on without saying so. Turn one of the two off.

**Tab autocomplete never appears in your logs.** Cursor runs Tab on its own backend, and the override applies to chat only. Nothing is wrong.

**`Verify` passed but requests still fail.** **Verify** checks the key format and that the endpoint answers, not every feature path. Send one chat request to check it works.

Anything not specific to Cursor is on [agent keys](https://docs.flexinference.com/agent-keys.md#troubleshooting).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.