Tool setup

Cursor

Override Cursor's OpenAI base URL and add the gateway's models.

Cursor can send its model requests to a custom OpenAI-compatible endpoint. Point that at the gateway and Cursor's chat and agent features run on your project's sponsor budget.

Heads up: Cursor doesn't officially support third-party gateways. This works by overriding Cursor's OpenAI base URL, which Cursor treats as a power-user setting and occasionally changes between releases. Keep Cursor reasonably up to date. Tab completion and some Cursor-hosted features always use Cursor's own models regardless of this setting.

What you get

  • Cursor Ask and Agent modes running against the gateway's models.
  • Billing to your project's sponsor budget instead of a Cursor subscription for those calls.

Prerequisites

  • Your project access key and base URL from your project control panel — written here as YOUR_PROJECT_KEY and https://v1.opentokenmarket.dev.
  • A recent version of Cursor.

Configure

  1. Cursor → Settings → Cursor Settings → Models.

  2. Enable Override OpenAI Base URL and set it to:

    https://v1.opentokenmarket.dev/cursor
    

    The /cursor suffix is a gateway route that adapts Cursor's request shape.

  3. Set the OpenAI API Key field to your project access key: YOUR_PROJECT_KEY.

  4. Under Add Custom Model, add each model you want by its exact name from the model catalog (for example gpt-4o). The name must not collide with a built-in Cursor model name.

  5. Toggle the custom model on. Click Verify if Cursor offers it.

Run

Open Ask with Cmd/Ctrl + L, select your custom model from the picker, and send a message. Use the same picker in the Agent panel.

Verify

Independently of Cursor, confirm the key and URL work:

curl https://v1.opentokenmarket.dev/chat/completions \
  -H "Authorization: Bearer YOUR_PROJECT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-4o","messages":[{"role":"user","content":"ping"}]}'

Troubleshooting

  • Model doesn't appear in the picker — it wasn't added under Add Custom Model, or its name matches a built-in model. Use a name straight from the model catalog.
  • 401 Unauthorized — the OpenAI API Key field doesn't hold your project access key, or the base URL is missing the /cursor suffix.
  • Requests work in curl but not in Cursor — your Cursor build predates gateway support. Update Cursor.
  • budget has been exceeded — ask your sponsor to top up the project.

Which model names to use

Whatever you typed under Add Custom Model must match the Model name column in the model catalog exactly.