Cursor
Cursor is a code editor with a built-in AI assistant. It uses the OpenAI Chat Completions format and lets you replace the OpenAI base URL. Set the URL to the exchange and add your model by name.
These steps configure the Cursor editor. They do not configure Cursor CLI.
Print the setup with the Liquid CLI
Cursor has its own settings screen, so the Liquid CLI cannot start it. liquid connect cursor prints the values to paste, with your model filled in.
curl -fsSL https://inference.ai.exchange/cli/install.sh | bash
liquid login
liquid connect cursor
To enter the values yourself, follow the steps below.
Before you start
- A workspace with a balance and a
spendkey. See API keys. - Cursor installed, with a project open.
1. Override the base URL
Open Settings → Models. Turn on Override OpenAI Base URL and enter:
https://router.inference.ai.exchange/v1
The URL ends in /v1, because Cursor adds /chat/completions to it.
2. Paste the key
In the OpenAI API Key field, paste your key:
sk-liquid-...
3. Add the models by name
Cursor lists only the models that it knows. Add each name to show it in the picker. Then use Verify to test the key with the first model.
liquid.auto
The connect guide in the console lists your chosen model, the router models and your presets. The exchange resolves each name on every request, so the names stay correct when offers change.
You can add any other model on the book. To get the current names, see the Market page or use GET /v1/models. See Market data.
Cursor cannot send the x-liquid-cap-usd header. liquid.auto has a cap of its own, so it works. To change the cap, use a preset that sets one.
Notes
- Some Cursor features, such as Tab completion and some agent modes, can go through the Cursor servers, with or without this setting. The override applies to chat and to the models that you add here.
- The exchange sets a cap on each request. It is in the
x-liquid-cap-usdheader. To limit total spend, set a spending limit on the key. See API keys.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
| Verifying the key fails. | The base URL override is off, the URL is missing /v1, or the model name is not on the book. |
| The model does not appear in the picker. | You have not added it by name under Settings → Models. |
| A request is refused for lack of funds. | The workspace balance cannot cover the cap. Add funds on the Credits page. |
Next steps
- Cline: a VS Code agent that uses the same OpenAI format.
- API keys: scopes and spending limits.
- Purchasing rules: cost caps and service floors.