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 list

Coding assistants

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.

Claude Code

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

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

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

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

Cline ships an OpenAI Compatible provider type meant for endpoints other than api.openai.com.

Roo Code

Roo Code keeps Cline's provider model: pick OpenAI Compatible in settings and fill in base URL, API key and model ID.

Continue

Continue is configured from a single YAML file. Any OpenAI-compatible endpoint uses provider: openai plus an apiBase field.

Chat clients

App platforms

Workflow automation