# Use Cursor with GoiAPI

> Use Cursor with your own API key: add it as the OpenAI API key, override the base URL, add the model name, then send a test message from the Cursor chat.

Source: https://goiapi.com/en/docs/integrations/cursor

## 1. Before you start

- An API key: [sign up](https://goiapi.com/en/signup), top up your balance, then create a key in the dashboard. Put your key where `<API_KEY>` appears below.
- The name of the model you want to use, from [Models](https://goiapi.com/en/models). The examples below use `claude-haiku-5-5`.

## 2. Set up Cursor

In Cursor, point the OpenAI settings to your base URL and key, then add the exact model name below.

1. Open Cursor → Settings → Models.
2. In "OpenAI API Key", paste `<API_KEY>`.
3. Turn on "Override OpenAI Base URL" and paste: `https://api.goiapi.com/v1`
4. Click "Add model", type `claude-haiku-5-5`, then turn that model on.
5. Pick `claude-haiku-5-5` in the chat panel and start asking.

## 3. Send a test message

Send a short message (for example "Hello") from Cursor. The **Request history** page in the dashboard shows the request as soon as it happens, with token counts and cost.

If something fails, see [Error codes](https://goiapi.com/en/docs/error-codes): `401` means the key is wrong or missing, `402` means your balance is too low, `404` means the model name is wrong.
