TopxAI is a model API service. Claude, GPT, Grok, GLM, Kimi, DeepSeek and TypeSafe's Jev are served through OpenAI- and Anthropic-compatible endpoints at fixed USD prices, on prepaid credit, and nothing you send is stored.
This repository indexes the public documentation: each page under docs/ summarizes a page of https://api.topxai.xyz/docs, where the full text is published in English and Chinese.
The site moved to api.topxai.xyz on 2026-11-13. The old address redirects, but most HTTP clients drop the Authorization header when a redirect changes host and the call fails with 401, so set the base URL to https://api.topxai.xyz/v1 (or https://api.topxai.xyz for Anthropic SDKs).
- Sign in and create a key: https://api.topxai.xyz/keys
- Models and prices: https://api.topxai.xyz/pricing
- Documentation: https://api.topxai.xyz/docs
- Every model's price on its own page: https://api.topxai.xyz/pricing · price calculator: https://api.topxai.xyz/tools/price-calculator
- API reference and OpenAPI 3.1: https://api.topxai.xyz/docs/api-reference · openapi.json
- Changelog: https://api.topxai.xyz/changelog · CHANGELOG.md · RSS https://api.topxai.xyz/changelog/feed.xml
- Blog: https://api.topxai.xyz/blog
- Support: the help button at the bottom right of any page, or support@topxai.xyz
Point the SDK you already use at TopxAI; the key goes where the provider's key would go.
from openai import OpenAI
client = OpenAI(base_url="https://api.topxai.xyz/v1", api_key="sk-...")
reply = client.chat.completions.create(
model="claude-sonnet-5-5",
messages=[{"role": "user", "content": "Say hello in one sentence."}],
)
print(reply.choices[0].message.content)from anthropic import Anthropic
client = Anthropic(base_url="https://api.topxai.xyz", api_key="sk-...")
reply = client.messages.create(
model="claude-sonnet-5-5",
max_tokens=256,
messages=[{"role": "user", "content": "Say hello in one sentence."}],
)
print(reply.content[0].text)More in examples/ and in Connect your SDK.
| Path | Dialect | Models |
|---|---|---|
POST /v1/chat/completions |
OpenAI Chat Completions | every text model except Jev |
POST /v1/responses |
OpenAI Responses | gpt-6.2-astra, gpt-6.2-sol, gpt-6.1-terra, grok-4.7, GLM-5.3-Flash-Abliterated, kimi-k3.1-pro-Abliterated, deepseek-flash-Abliterated, deepseek-flash-fast |
POST /v1/messages |
Anthropic Messages | every text model except Jev |
POST /v1/images/generations, POST /v1/images/edits |
OpenAI Images | gpt-image-2.6-sunburst, gpt-image-2.6-flare |
POST /v1/videos/generations, GET /v1/videos/{request_id} |
OpenAI Videos | grok-imagine-video-1.5 |
POST /v1/systemone |
TypeSafe System One | jev-1.14.0 |
GET /v1/models |
OpenAI | the models your key can use |
As GET https://api.topxai.xyz/api/pricing listed them on 2026-11-19: 16 models from 7 providers. Each id links to its page with the current price on every route; the full table is at https://api.topxai.xyz/pricing, and prices are not repeated here because they change.
| Provider | Models |
|---|---|
| Anthropic | claude-fable-5-2 · claude-opus-5-5 · claude-sonnet-5-5 |
| OpenAI | gpt-6.1-terra · gpt-6.2-astra · gpt-6.2-sol · gpt-image-2.6-flare · gpt-image-2.6-sunburst |
| xAI | grok-4.7 · grok-imagine-video-1.5 |
| Zhipu AI | GLM-5.3-Abliterated (private deployment) · GLM-5.3-Flash-Abliterated (private deployment) |
| Moonshot AI | kimi-k3.1-pro-Abliterated (private deployment) |
| TypeSafe | jev-1.14.0 |
| DeepSeek | deepseek-flash-Abliterated (private deployment) · deepseek-flash-fast (private deployment) |
Prices are fixed in USD per model. Claude, GPT and Grok are sold on one route per provider at 80% of the provider's list price; a key is set to one route or to Auto route, which bills each model on that model's route (routes and the auto route). Every model on the GLM, Kimi and DeepSeek lines is served from a private deployment rather than the provider's own API, at fixed prices that are the same at every hour; the two GLM models, kimi-k3.1-pro-Abliterated and deepseek-flash-Abliterated have the refusal alignment removed (each request to them starts with a short TopxAI deployment note), and deepseek-flash-fast runs the standard weights. They are covered by the same Acceptable Use Policy as every other line.
- 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.
- 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 — Configure Codex CLI for TopxAI with an API key and a model such as gpt-6.2-sol, gpt-6.2-astra or grok-4.7. Includes the installer and manual setup.
- 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/ 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.
- Hosted MCP servers: models, images and video in any MCP client — Three MCP servers put the catalogue in Claude Code, Cursor, VS Code and other MCP clients with your API key. Setup, tools and what a call costs.
- Routes and the auto route — One route per provider: what each API-key route sells, its price next to the provider list price, and how one Auto-route key covers every model.
- 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.
- Web search: which models search and what a search costs — Claude, GPT-6 and Grok 4.7 can search the web. Each search costs the provider’s own fee, $0.01 or $0.005, on top of the tokens.
- Prompt caching: the automatic Claude cache and how to turn it off — TopxAI turns on Claude’s five-minute prompt cache when a request sets none. How cache reads and writes are billed, and the header that declines it.
- 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-Abliterated — Call kimi-k3.1-pro-Abliterated: Kimi K3.1 Pro with the refusal alignment removed, on a private deployment. Prices, reasoning, limits and parameters.
- 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.
- Top up with a card, Alipay or WeChat Pay — Add USD credit with Visa, Mastercard, Alipay, WeChat Pay, Apple Pay or Google 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.
- Monthly plans: credit, weekly unlocks and renewal — Four monthly plans give more credit than they cost. How the credit unlocks, what it pays for, renewal, cancelling and the 48-hour refund.
- 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.
- 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 80% of it — Vercel AI Gateway charges the provider list price with no markup; TopxAI charges 80% of it for Claude, GPT and Grok. What else differs.
- 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.
Prompts, completions and uploaded files are relayed in memory and never written to disk; the usage log keeps token counts, model names, routes and request ids. Details: Privacy Policy, User Agreement, Acceptable Use Policy.
TopxAI makes this model API and TopxAI Desktop, the Mac app at https://topxai.xyz/. Announcements: X @Topx_AI.
The summaries here are generated from the site's sources, so a correction belongs on the page it summarizes: open an issue or write to support@topxai.xyz.
The documentation in this repository is released under CC BY 4.0; the code snippets under examples/ are public domain (CC0).