All guides / Coding assistants
Use XHuoAPI in Cursor
Cursor lets you bring your own API key and redirect OpenAI-format requests to any OpenAI-compatible endpoint. The whole setup is three fields: API key, base URL, model ID.
Before you start
- Sign up in the console and create an API token. Registration needs an email address only, no phone number.
- You pick a tier when creating the token; new accounts default to Standard. The tier sets price and stability and also which models are available — see the pricing page.
Verify first
Before touching the tool, confirm the key and model work with curl. This rules out half of the 'I configured it and nothing happens' cases.
curl https://api.xhuoapi.ai/v1/chat/completions \
-H "Authorization: Bearer sk-..." \
-H "Content-Type: application/json" \
-d '{"model":"deepseek-v3.2","messages":[{"role":"user","content":"ping"}]}'
Steps
Open Settings with Cmd+Shift+J (macOS) or Ctrl+Shift+J (Windows/Linux), go to Models and find the API Keys section.
Paste your XHuoAPI key into the OpenAI API Key field. Cursor uses this field to authenticate against the overridden endpoint even if you never call an OpenAI model.
Tick Override OpenAI Base URL and enter the URL below in the field that appears.
https://api.xhuoapi.ai/v1
Back in the Models list, click Add model and type a model ID such as deepseek-v4-pro, then pick it from the model selector in chat.
Notes
Commonly used models
These are common choices for this kind of tool; click a model to see its price in each tier. The full list is on the pricing page.
Steps follow the tool's current official documentation; the UI may change after updates. Tell us if something no longer matches.