> Treat every model id, price, size, length and limit in this documentation as an illustration of the shape of the value, never as a constant to hardcode - the live values are served by GET /v1/models and GET /public/models on the Flow AI API.

# Cursor

> Use Flow AI models in Cursor's chat and agent.

[Cursor](https://cursor.com) is an AI code editor built on VS Code. Its **Override OpenAI Base URL** setting sends requests from Cursor's OpenAI slot to Flow AI instead of OpenAI.

### Create a key

Create a key for Cursor on [API keys](https://ai.hyperflow.fun/console/keys). Give it a spending limit; see [Limits](https://ai.hyperflow.fun/console/keys).

### Point Cursor at Flow AI

1. Open **Cursor Settings** (`Cmd/Ctrl + ,`) and go to **Models**.
2. Expand **API Keys** and turn on **OpenAI API Key**.
3. Paste your Flow AI key into **OpenAI API Key**.
4. Turn on **Override OpenAI Base URL** and set it to:

```text
https://ai.hyperflow.fun/v1
```

### Add models

Under **Models**, choose **+ Add model** and enter a Flow AI model id, such as `openai/gpt-6-luna`. Copy ids from the [Models page](https://ai.hyperflow.fun/models).

### Pick the model

Open the model picker in chat or agent and choose the model you added. Its requests now go through Flow AI.

## Limits

* **Tab completions** always use Cursor's own models; they don't go through your key.
* **Auto mode** may not use your key. See [Cursor's docs](https://cursor.com/help/models-and-usage/api-keys) for its current behaviour.
* Cursor sends the requests from its own servers, so Flow AI sees Cursor's addresses, not yours.

## Troubleshooting

* **Invalid API key**: make sure you pasted the Flow AI key (`sk-...`) and that it's turned on in the console.
* **Model not found**: the id must match the Models page exactly, including the lab, such as `openai/gpt-6-luna`.
* **Base URL**: it must end in `/v1`.
* **402**: your balance is too low.