Anysphere · IDE

Cursor

Cursor supports bring-your-own-key for OpenAI-compatible endpoints. Paste your NextModel key under Settings → Models and point the OpenAI provider's base URL at NextModel so OpenAI-format requests go there.

Quick start

  1. Get your NextModel API Key

    Create a key in the NextModel console and keep this tab open — you will paste it into Cursor next.

  2. Point Cursor at NextModel in Settings

    Cursor Settings → Models: paste your NextModel key into the OpenAI field and click Save. To send OpenAI-format requests to NextModel, enable the Override OpenAI Base URL toggle in the same panel, set it to https://api.nextmodel.app/v1, and register claude-sonnet-4-5 as a custom model. Control names can vary slightly between Cursor versions.

    Official docs

  3. Confirm the endpoint with one request

    A JSON reply means the address, key and model line up — the same values now live in Cursor.

    Shell
    curl "https://api.nextmodel.app/v1/chat/completions" \
      -H "Authorization: Bearer <YOUR_API_KEY>" \
      -H "Content-Type: application/json" \
      -d '{"model": "claude-sonnet-4-5", "messages": [{"role": "user", "content": "ping"}]}'
  4. Pick claude-sonnet-4-5 in the composer

    Open the model picker in the composer or chat panel and select the model you added.

Example prompts

Prompts
Add input validation to the signup form and generate unit tests for it.
Explain what this component renders, then simplify it without changing behavior.

FAQ

Is there a settings.json I can edit instead?

Cursor's docs document only the Settings → Models panel for custom keys, so treat the UI as the supported configuration path.

Does a custom key change Cursor's built-in features?

Per Cursor's docs, custom API keys only work with chat models — Tab completion keeps using Cursor's built-in models.

Which model IDs work?

Any chat model ID your endpoint serves; this guide uses claude-sonnet-4-5. Once configured, the model shows up in Cursor's model picker.

Troubleshooting

The key or endpoint check fails in Cursor

Check the base URL ends in /v1, then paste the same key into the curl request in step 3 to see whether the key or the URL is wrong.

The model doesn't show up after the override

An override replaces Cursor's built-in OpenAI catalog. Register claude-sonnet-4-5 as a custom model under the OpenAI provider and select it in the model picker.

Other agents

CLIOpenAI

Codex CLI

OpenAI's terminal coding agent, pointed at NextModel.

Codex CLI reads model providers from ~/.codex/config.toml. Add one provider block that points at your NextModel base URL, export your key, and every codex run routes through NextModel.

Codex CLI
IDECline

Cline

Autonomous coding inside VS Code, on your own key.

Cline is a VS Code extension that plans and edits code with your approval at each step. Its OpenAI Compatible provider accepts any endpoint, so NextModel is one form away.

Cline
DesktopCherry Studio

Cherry Studio

A desktop chat client that speaks OpenAI out of the box.

Cherry Studio manages model providers as services. Add NextModel once as an OpenAI-compatible provider and it sits next to the services you already use.

Cherry Studio
SDKOpenAI

OpenAI SDK

Any OpenAI SDK, one base_url away.

The official OpenAI SDKs for Python and Node accept a custom endpoint. Set base_url to your NextModel endpoint, keep the key in the environment, and the rest of your code stays unchanged.

OpenAI SDK