Integration guides
Every tool is configured the same way underneath: an OpenAI-compatible base URL, an API key and a model ID. The differences are what the fields are called, where they live, and whether /v1 belongs in the URL. One page per tool below.
Which Chinese models work in Claude Code, Codex CLI, fx and OpenCode (tested) → Using the DeepSeek API outside China: four ways, with prices DeepSeek vs Qwen vs GLM: API prices, official and XHuoAPI One API key for multiple LLM providers: four approaches compared Using the Qwen API without a Chinese phone number: four ways OpenAI-compatible gateways for Chinese AI models: what four platforms actually listCoding assistants
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.
Claude Code sends requests in the Anthropic Messages format, which XHuoAPI accepts, so no proxy or converter is needed: two environment variables are enough. We ran real file-writing tasks with Claude Code 2.1.284, and the steps and notes below come from that test.
Codex CLI lets you add a custom model provider in its config file. It only talks to OpenAI's Responses endpoint (/v1/responses), so through XHuoAPI the models that work are GPT models. We ran real file-writing tasks with codex-cli 0.156.1, and the config below is the one we tested.
fx is an open-source coding agent CLI from Vercel Labs: one native binary that can connect to any OpenAI Chat Completions–compatible endpoint. XHuoAPI provides that endpoint, so one connection in the settings file is enough. We had fx 0.0.13 create and run a file for real, and the config below is the one we tested.
OpenCode is an open-source coding agent with a terminal UI, a desktop app and IDE extensions, and it can connect to any OpenAI Chat Completions–compatible endpoint. XHuoAPI provides that endpoint, so one provider in the config file is enough. We had OpenCode 2.1.2 create a file for real, and the config below is the one we tested.
Cline ships an OpenAI Compatible provider type meant for endpoints other than api.openai.com.
Roo Code keeps Cline's provider model: pick OpenAI Compatible in settings and fill in base URL, API key and model ID.
Continue is configured from a single YAML file. Any OpenAI-compatible endpoint uses provider: openai plus an apiBase field.
Chat clients
Open WebUI can hold several OpenAI-compatible connections at once. Add one pointing at XHuoAPI and every available model shows up in the model selector.
A self-hosted LobeChat connects to an OpenAI-compatible endpoint with two environment variables: OPENAI_PROXY_URL for the address and OPENAI_API_KEY for the key.
Chatbox's custom provider appends /v1/chat/completions itself, so the API Host is just the domain.
Cherry Studio has said it will not bundle more gateway-type providers; they are added as a custom provider instead. The setup mirrors the built-in OpenAI provider.