Point Cursor at a custom Anthropic base URL
Cursor lets you override the API endpoint it talks to. Once you do, every request is billed against your own key at your own rate instead of Cursor's pooled quota.
curl https://aicomp.ai/v1/models \
-H "Authorization: Bearer sk-your-gateway-key"
You should get back a JSON list of model IDs. If you see
Invalid token, the key is wrong or was not copied in full.
Step 1 — create a key
Sign up, generate an API key in the dashboard, and copy your base URL (https://aicomp.ai/v1).
Step 2 — open the override field
In Cursor: Settings → Models. Look for the base URL override (in some versions it sits under "Override OpenAI Base URL" or the Anthropic section). Enter:
https://aicomp.ai/v1
Then paste your key into the API key field and save.
Step 3 — confirm it took effect
Open a new chat and send a short message. If routing works you get a normal reply. To be certain, check the usage log in your gateway dashboard — the request should appear there within a minute.
If it does not work
| Symptom | Fix |
|---|---|
| Invalid API key | Cursor may cache the old key. Restart Cursor fully after saving. |
| 404 errors | Remove or add the /v1 suffix so it is not doubled. |
| Falls back to Cursor quota | Some versions ignore the override unless "use my own key" is explicitly enabled. |
What it costs
With your own key, your bill is pure token spend — no per-request markup. Estimate it with the Cursor cost calculator, or compare Sonnet 5 against Haiku 4.5 for your workload.