Documentation
TopxAI documentation: how to connect, what each route costs, how credit is added and what to do when a request fails.
Getting started
- What TopxAI is · One base URL, 16 models on seven lines and prepaid USD credit. TopxAI does not store prompts or completions.
- Create an API key and choose a route · The key drawer step by step, what each route means, and the three 403 refusals a key can hit.
- Connect your SDK · The base URL, every endpoint with its auth header, working examples for the OpenAI and Anthropic SDKs, and what each error status means.
- API reference: every endpoint, with an OpenAPI specification · Every endpoint TopxAI serves, what each accepts and returns, the two ways to send the key, and the OpenAPI 3.1 file at /openapi.json for API tools.
Integrations
- Claude Code with TopxAI: ANTHROPIC_BASE_URL and the key · Point Claude Code at https://api.topxai.xyz with two environment variables and pick claude-sonnet-5-5, claude-opus-5-5 or claude-fable-5-2 as its model.
- Codex CLI custom model provider: model_providers in config.toml for TopxAI · Point Codex CLI at TopxAI with a [model_providers.topxai] table in ~/.codex/config.toml and run gpt-6.1-sol, gpt-6-astra or grok-4.7. An npm mirror is included.
- Cursor with TopxAI: override the OpenAI base URL · In Cursor, paste a TopxAI key as the OpenAI key, turn on the base URL override with https://api.topxai.xyz/v1 and add the model ids you want to chat with.
- Cline and Roo Code with TopxAI: the OpenAI-compatible provider · Set the provider to OpenAI Compatible with base URL https://api.topxai.xyz/v1, a TopxAI key and a model id; or the Anthropic provider with a custom base URL.
- Continue with TopxAI: models in config.yaml · Add TopxAI models to ~/.continue/config.yaml with provider openai or anthropic and apiBase, then use them for chat, edit and agent mode in VS Code or JetBrains.
- Zed with TopxAI: OpenAI- and Anthropic-compatible providers · Add TopxAI to Zed as an openai_compatible provider for GPT, Grok, Kimi and GLM, and as an anthropic_compatible provider for Claude, in settings.json.
- Aider with TopxAI: OPENAI_API_BASE and the model name · Run aider against TopxAI with OPENAI_API_BASE=https://api.topxai.xyz/v1 and --model openai/claude-sonnet-5-5, or the Anthropic variables for the Claude line.
- opencode with TopxAI: a custom provider in opencode.json · Declare TopxAI in opencode.json with @ai-sdk/openai-compatible, the base URL and the model ids, then pick them with /models.
- Open WebUI with TopxAI: one OpenAI connection, every model · Add https://api.topxai.xyz/v1 as an OpenAI API connection in Open WebUI; the model list fills from /v1/models and every text model is ready to chat.
- LobeChat with TopxAI: the OpenAI proxy address · Set OpenAI’s API proxy address to https://api.topxai.xyz/v1 in LobeChat, or OPENAI_PROXY_URL for a deployment, and fetch the model list.
- Cherry Studio with TopxAI: first chat and endpoint setup · Connect a route-scoped TopxAI key to Cherry Studio, choose the right endpoint, and diagnose the first request without guessing URL suffixes.
- ChatBox with TopxAI: a custom provider · In ChatBox, add a custom provider in OpenAI API compatible mode with host https://api.topxai.xyz and path /v1/chat/completions, then add the model ids.
- LangChain with TopxAI: ChatTopxAI from the langchain-topxai package · Call TopxAI chat models from LangChain in Python with ChatTopxAI from langchain-topxai. ChatOpenAI with a base URL still works, also for the Responses API.
- Vercel AI SDK with TopxAI: createOpenAI, createAnthropic and openai-compatible · Create an AI SDK provider with baseURL https://api.topxai.xyz/v1 and a TopxAI key, then use generateText or streamText with any catalogue model.
- LiteLLM with TopxAI: proxy config and the Python SDK · Route LiteLLM to TopxAI with model openai/<id> and api_base https://api.topxai.xyz/v1, in the proxy’s model_list or a completion() call.
- Dify with TopxAI: the OpenAI-API-compatible provider · Add each TopxAI model to Dify through the OpenAI-API-compatible provider with endpoint https://api.topxai.xyz/v1, your key and the model id.
- n8n with TopxAI: an OpenAI credential with a base URL · Create an OpenAI credential in n8n with base URL https://api.topxai.xyz/v1 and a TopxAI key, then use any catalogue model in the Chat Model and AI Agent nodes.
- llm CLI with TopxAI: extra-openai-models.yaml · Register TopxAI models in llm’s extra-openai-models.yaml with api_base https://api.topxai.xyz/v1, store the key with llm keys set, and prompt from the shell.
Routes and pricing
- Shared pool, official line and auto route · Same models, different routing and price: what each API-key route means and how Auto route picks one for you.
- How requests are billed · Billing units, long-context tiers, the up-front reservation and what happens to it when a request fails.
- Reading your usage log · What each row of the usage log shows, how to filter it, and what is never recorded.
Models
- Jev (TypeSafe System One) · What Jev 1.14 returns, how to call POST /v1/systemone with text or images, Box questions, the one-line setup for a TypeSafe key, and the price.
- GLM-5.3-Abliterated and GLM-5.3-Flash-Abliterated · The two GLM models on a private deployment: text-only GLM-5.3-Abliterated and the faster GLM-5.3-Flash-Abliterated with images. Reasoning, limits, prices.
- Image generation · gpt-image-2.6-sunburst and -flare: the two endpoints, the 1K and 2K per-image prices, how the size tier is chosen, and where the image link comes from.
- Video generation · grok-imagine-video-1.5: submit a job, poll it, per-second prices by resolution, refunds on failure, and how forgotten jobs are refunded after 24 hours.
- deepseek-flash-Abliterated and deepseek-flash-fast · The two DeepSeek V4.1 Flash 1017 models on a private deployment, abliterated or on standard weights: limits, four reasoning settings and fixed prices.
- Kimi K3.1 Pro · Call kimi-k3.1-pro on TopxAI: a private deployment with fixed token prices, always-on reasoning (default low), output caps, and image and parameter limits.
- Claude Opus 5.5 special offer · A temporary, low-priced Claude Opus 5.5 line that is often unavailable: prices, how to create a key for it, the extra tokens it adds and its terms.
Payments and credit
- Top up with a card · Add USD credit with a card, Apple Pay, Google Pay or a local e-wallet; you pay on the Waffo checkout that the Wallet page opens.
- Pay with crypto · Top up with USDT or USDC through a NOWPayments invoice: what to send, how long confirmation takes, and what happens if you send too little.
- Gift cards and credit codes · Buy a single-use credit code, redeem one on any account, and what the User Agreement says about refunds.
Troubleshooting
- Common error responses · What each HTTP status and error code from the gateway means, and what to change before you retry.
- The model works in curl but not in my tool · Seven places where a tool differs from the working curl: base URL, auth header, model id, key route and limits, IP whitelist, GLM and Jev endpoints, timeouts.
- Sign-in and account · How sign-in works, how sessions, devices and TopxAI Desktop sign-ins are managed, the regional service notice, and how to reach support.
Comparisons
- TopxAI vs OpenRouter: what is the same and what differs · Compare TopxAI and OpenRouter model prices, routes and API formats, with dated sources and the scope of the private-deployment prices.
- TopxAI vs the providers' own APIs: price, retention and what stays direct · What changes when Claude, GPT or Grok go through TopxAI: the price per token, one key and one balance, zero retention, and what stays with the provider.
- TopxAI vs Vercel AI Gateway: list price with no markup, or half of it · Vercel AI Gateway charges the provider list price with no markup; TopxAI shared routes charge 50% of it for Claude, GPT and Grok. What else differs.
Privacy and policies
- What TopxAI stores and what it never stores · Request and response content passes through memory only; here is what the usage log, account and payment records keep, and for how long.
- Acceptable use and abuse reports · The six prohibited content categories, how enforcement works, why private deployments are no exception, and how to report abuse.
TopxAI · Models & pricing · Blog
Other languages: 简体中文