Cursor integration

Use Cursor with Chinese AI models through ChinaAPI.

Point Cursor at one OpenAI-compatible endpoint for cheap official-price Chinese coding models, including DeepSeek, Kimi, Qwen, GLM, and MiniMax families.

Prerequisites

Before opening Cursor settings.

ChinaAPI account

Register, then open Dashboard -> Console -> Tokens to create or copy an sk-... API key.

Endpoint

Use https://dash.chinaapi.ai/v1 as the OpenAI-compatible base URL.

Setup

Configure Cursor.

  1. Open Cursor settings. In current versions this is usually Settings -> Models; naming can vary by release.
  2. Find the OpenAI API key area or the model provider section that accepts an OpenAI-compatible key.
  3. Paste your ChinaAPI key into the OpenAI API key field.
  4. Set the custom OpenAI base URL or override URL to https://dash.chinaapi.ai/v1.
  5. Add one or more custom model IDs from the live pricing list, then select one for chat or agent mode.

Copy-paste test

Verify the same key outside Cursor first.

curl https://dash.chinaapi.ai/v1/chat/completions \
  -H "Authorization: Bearer sk-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-flash",
    "messages": [
      {"role": "user", "content": "Reply with exactly: Cursor is connected to ChinaAPI."}
    ],
    "stream": true
  }'

After the curl test works, ask Cursor: Write a small TypeScript function that validates an email address.

Recommended models

Good Cursor defaults.

kimi-k2.7-code

Coding-focused Kimi model for repo navigation, edits, and longer coding sessions.

deepseek-v4-pro

Strong coding and reasoning model for harder refactors and analysis tasks.

qwen3.7-plus

Balanced multimodal reasoning model for planning, tool use, and daily coding help.

qwen3.6-flash

Fast, lower-latency choice for quick edits, summaries, and agent loops.

glm-5.2

Long-context GLM model for larger codebase questions and agentic work.

Troubleshooting

Common Cursor connection issues.

Thinking models such as qwen3.7-max can generate reasoning tokens before the answer appears. Enable streaming where Cursor exposes it, or raise the client timeout if requests end early.

Model not found: check the exact model ID on live pricing. IDs are case-sensitive and may differ from public marketing names.

401: confirm the key starts with sk- and is sent as Authorization: Bearer sk-.... In Cursor, make sure the key is in the OpenAI key field tied to the custom base URL.

Pricing and signup

Use official China list prices from one USD account.

Signup includes $1 free credit. Check live pricing before production runs because model IDs and availability can change.