Quickstart
Three steps from nothing to a first successful request. The whole journey takes about five minutes.
Create an API key
Sign up at texapi.dev, go to dashboard → API keys → Create. The key looks like sk-texapi-… and is shown in full exactly once — save it immediately.
Pick the tool for the model you need
Check the tool × model matrix below. The short rule: every family on sale accepts standard tools; Kimi serves Messages natively, so Codex CLI cannot call it.
Connect the tool and make the first request
Run the one-command connector (below) for automatic setup, or open Manual setup if you prefer editing config files yourself. Then just use the tool as usual.
Tool × model family matrix
Every family TexAPI sells accepts standard clients; only Kimi has a dedicated endpoint (Messages). This matrix tells you up front which families your tool calls directly, which go through a converter, and which are blocked.
Your tool speaks the exact protocol the family's upstream serves. No conversion, no dropped request fields — the best way to use the family.
The tool works: TexAPI translates your request into a protocol the upstream serves. A few rarely used parameters have no field on the target protocol and are dropped. For everyday coding traffic the difference is negligible.
Rare: the family only accepts the vendor's official client, but TexAPI can still reshape your request to look like it. A footpath — for long-term stability prefer a tool marked “Direct”.
No path exists: no converter bridges this tool to any protocol the family serves.
Two connection styles
Most families on sale accept every standard client. Kimi is the exception: it serves the native Messages interface only, so chat tools go through a converter and Codex CLI has no path.
Kimi: native Messages
Kimi opens /v1/messages only. Claude Code and chat tools work (chat is converted); Codex CLI is blocked because no Responses→Messages converter exists.
Works with every tool
The other families accept any well-formed client, no shape check. Every tool calls them directly.
Rows are tools, columns are families. Each cell shows its compatibility level by colour — hover a cell for that level's explanation.
| Tool | Kimi | Open |
|---|---|---|
Claude Code /v1/messages | Direct | Via converter |
Codex CLI /v1/responses | Cannot call | Via converter |
Gemini CLI :generateContent | Cannot call | Via converter |
Cline /v1/chat/completions | Via converter + CLI shaping | Direct |
Roo Code /v1/chat/completions | Via converter + CLI shaping | Direct |
Continue /v1/chat/completions | Via converter + CLI shaping | Direct |
aider /v1/chat/completions | Via converter + CLI shaping | Direct |
Zed /v1/chat/completions | Via converter + CLI shaping | Direct |
Which family each tool should use
The same matrix, pivoted by tool — for when you are setting a tool up and asking 'which model?'.
Kimi details
Why Kimi needs the Messages endpoint, which tools work, and the error Codex CLI sees.
Kimi
/v1/messagesThe Kimi group serves /v1/messages only — verified by probe: the chat endpoint returns protocol_not_supported even though the catalogue advertises it.
Claude Code (direct). Chat tools (Cline, aider, Zed…) work via the chat→messages converter.
Codex CLI CANNOT call this family — no Responses→Messages converter exists. On Codex, pick a family that serves Responses.
Automatic setup (connector)
One command configures every tool on your machine: detects installed tools, asks for approval in your browser, issues a per-machine key, and writes the config exactly where each tool reads it. Clean rollback with one disconnect.
How the connector works
- 1Run connect — the connector opens your browser for approval. The code shown in the terminal must match the one on the approval page (anti-spoofing).
- 2After approval, TexAPI issues an API key dedicated to that machine — one key per machine, never your main key.
- 3In the dashboard → Integrations, toggle which tools the connector may configure on this machine.
- 4Run apply — the connector writes each tool's config to the exact files described under Manual setup below, and undoes exactly what it wrote when you disconnect.
Commands
npx @texapi/connectConnect this machine to TexAPI — writes no tool config yet
npx @texapi/connect applyWrite config for exactly the tools toggled on in the dashboard
npx @texapi/connect statusShow what this machine is connected to and what is applied
npx @texapi/connect disconnectRevoke the machine's key and restore config files to before
Common options
--dry-runSee what the connector would write, without writing
--only claude-code,codex-cliConfigure only these tools
--no-browserPrint the approval URL instead of opening a browser (SSH/servers)
--jsonMachine-readable JSON output — for scripts/CI
Single requirement: Node.js on the machine. No admin rights — the connector only writes your own user's files.
Manual setup, tool by tool
If you would rather configure things yourself, use a machine without Node.js, or simply want to understand what the tool reads — this is the exact configuration for each tool. These are the very things the connector writes, not a paraphrase.
Tools documented below
Claude Code
Use with every family on sale; Kimi needs the native Messages endpoint.
- 1Open or create the settings.json file (comments allowed — JSONC).
- 2Set env.ANTHROPIC_BASE_URL to TexAPI and env.ANTHROPIC_AUTH_TOKEN to your API key.
- 3If env.ANTHROPIC_API_KEY has a value, REMOVE it — Claude Code may prefer that variable and keep calling the old upstream instead of TexAPI.
- 4Restart Claude Code. Call any model to check.
{
"env": {
"ANTHROPIC_BASE_URL": "https://texapi.dev",
"ANTHROPIC_AUTH_TOKEN": "sk-texapi-..."
}
}- Project-level settings (.claude/settings.json in a repo) override user settings — if that file exists in your repo, make sure it does not override the base URL.
Codex CLI / Codex desktop
Use with the families on sale over the Responses interface.
- 1Open or create config.toml. Put model_provider = "texapi" at the top, outside any [table] block.
- 2Add the [model_providers.texapi] block from the snippet — base_url ends with /v1.
- 3Write the key into auth.json: OPENAI_API_KEY is your TexAPI key, auth_mode is "apikey".
- 4Restart Codex. If you had signed in with another account, the new auth_mode overwrites it — the connector's disconnect restores it; by hand, back it up first.
model_provider = "texapi"
[model_providers.texapi]
name = "TexAPI"
base_url = "https://texapi.dev/v1"
wire_api = "responses"
requires_openai_auth = true{
"OPENAI_API_KEY": "sk-texapi-...",
"auth_mode": "apikey"
}- wire_api = "responses" is what the connector picks for current Codex versions; on older CLIs that still need "chat", TexAPI serves both.
- auth.json is Codex's real credential store — if a genuine OpenAI key lives there, it will be replaced. Save the old key before editing.
Gemini CLI
Use with the families on sale over the Google generateContent interface.
- 1Open or create ~/.gemini/.env (the CLI loads this file itself — no export needed).
- 2Set GOOGLE_GEMINI_BASE_URL to the bare origin WITHOUT /v1beta — the SDK appends /v1beta/models/… itself.
- 3Set GEMINI_API_KEY to your TexAPI key.
- 4If you had signed in with Google (OAuth): open settings.json and set security.auth.selectedType to "gemini-api-key", or the new base URL is ignored.
GOOGLE_GEMINI_BASE_URL=https://texapi.dev
GEMINI_API_KEY=sk-texapi-...{
"security": {
"auth": {
"selectedType": "gemini-api-key"
}
}
}- The classic trap: adding /v1beta to the base URL makes every request 404 before reaching TexAPI — the SDK already appends that part.
aider
Use with every family on sale over the OpenAI-compatible surface.
- 1Open or create ~/.aider.conf.yml.
- 2Set openai-api-base to https://texapi.dev/v1 and openai-api-key to your key.
- 3The model MUST carry the openai/ prefix — e.g. openai/glm-5.2. Without it, aider resolves the model against its own provider table and hits the wrong endpoint.
openai-api-base: https://texapi.dev/v1
openai-api-key: sk-texapi-...
model: openai/glm-5.2- aider loads .aider.conf.yml in order: home → git root → current directory, later files winning. If your repo has one, it overrides the home config — check there before wondering why traffic still goes to OpenAI.
Cline / Roo Code (VS Code)
Use with every family on sale over the OpenAI-compatible surface.
- 1Open VS Code Settings (Ctrl+,), search for “Cline: OpenAI Compatible Settings” (Roo Code is similar).
- 2Base URL: https://texapi.dev/v1 — API Key: your sk-texapi-…
- 3Model ID: pick a TexAPI model that serves chat (see the matrix).
- Cline/Roo configuration lives in VS Code's state database, not a user-editable file — which is also why the connector does not yet automate this tool.
Continue
Use with every family on sale over the OpenAI-compatible surface.
- 1Open ~/.continue/config.yaml.
- 2In the models list, add an entry: model is the TexAPI id, apiBase is https://texapi.dev/v1, apiKey is your key, provider is openai.
- 3Select that model in Continue. Continue creates the file itself when empty — add to the models list, never overwrite the whole file.
- config.yaml is a YAML list — one wrong indent and the tool stops loading it entirely. Back it up before editing.
Zed
Use with every family on sale over the OpenAI-compatible surface.
- 1Open Zed's settings.json (Zed: Open Settings).
- 2Add a language_models.openai block: api_url = "https://texapi.dev/v1".
- 3The API key does NOT go in settings.json — Zed prompts for it and stores it in the OS keychain on your first request.
- Zed's keychain entry is keyed by api_url — changing the URL invalidates a previously saved key and you will be asked to re-enter it.
API reference
TexAPI serves all four industry-standard interfaces — use any vendor's official SDK or plain HTTP. All authenticate with Authorization: Bearer sk-texapi-… (Gemini also accepts x-goog-api-key).
Authentication
Every endpoint takes a TexAPI key via Authorization: Bearer sk-texapi-…, created at dashboard → API keys. The connector gives one key per machine; keys you manage yourself can be named freely.
Four interfaces, one key
/v1/chat/completionsCompatible with the openai SDK. Works for every chat tool and most models.
/v1/messagesCompatible with the Anthropic SDK and Claude Code. The only endpoint Kimi serves.
/v1/responsesCompatible with Codex CLI. Serves the families on sale over the Responses interface.
/v1beta/models/{model}:generateContentCompatible with the google-genai SDK and Gemini CLI. Serves the families on sale over the Google interface.
Streaming
Every text endpoint supports streaming (SSE): set "stream": true in the body (Gemini uses :streamGenerateContent?alt=sse). Token usage on streams is always reported fully by TexAPI — even when upstream omits it. Settled cost_usd, cost_credits and credits_per_usd fields are currently added only to non-streaming JSON responses; use the request id and pricing receipt to reconcile a stream.
Images
/v1/images/generations and /v1/images/edits follow the OpenAI Images interface. The catalogue does not currently sell an image model; the endpoints stay for compatibility.
Model list
GET /v1/models returns every model enabled for your key, each with its toolCompat field — the same data this page's matrix is built from.
Smoke-test with curl
Chat (OpenAI)
curl https://texapi.dev/v1/chat/completions \
-H "Authorization: Bearer sk-texapi-..." \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.2",
"messages": [{"role": "user", "content": "Hello!"}]
}'Messages (Anthropic)
curl https://texapi.dev/v1/messages \
-H "Authorization: Bearer sk-texapi-..." \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "kimi-k3",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Hello!"}]
}'Responses (OpenAI)
curl https://texapi.dev/v1/responses \
-H "Authorization: Bearer sk-texapi-..." \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-pro",
"input": "Hello!"
}'Gemini
curl "https://texapi.dev/v1beta/models/qwen3.8-max:generateContent" \
-H "x-goog-api-key: sk-texapi-..." \
-H "Content-Type: application/json" \
-d '{
"contents": [{"parts": [{"text": "Hello!"}]}]
}'Full OpenAPI
The complete OpenAPI 3.1 spec lives at /openapi.json and /openapi.yaml — load it into Postman/Insomnia or generate an SDK. In a settled non-streaming JSON response, usage.cost_usd remains the canonical USD amount for compatibility and reconciliation; usage.cost_credits = cost_usd × 100 is derived after settlement; texapi.credits_per_usd publishes the fixed rate of 100.
Pricing & limits
Rates are shown as credits / 1M tokens at a fixed 100 credits = $1 of usage value, kept in real time with the dashboard price table. Pure pay-as-you-go — no hidden fees; credits are deducted only for billable usage under the Billing Policy.
Plans
Current plans and top-up tiers (see the Pricing page for the full UI):
| Plan | Monthly | VND price | Included | RPM | TPM | Keys |
|---|---|---|---|---|---|---|
| Dev | $9 | 249,000 ₫ | 1,000 credits | 300 | 1,000,000 | 5 |
| Studio | $29 | 799,000 ₫ | 3,200 credits | 800 | 4,000,000 | 20 |
| Scale | $99 | 2,699,000 ₫ | 11,000 credits | 2000 | 12,000,000 | 100 |
Long context
Some models have a staircase price by context: the deeper the context, the ratio of the matching step. The staircase is shown on each model's page in Models — use the Calculator tab to estimate a run before you make it.
Cache reads
Reading from a model's prompt cache is billed separately, cheaper than fresh input — the rate shows in each model's “Cached input” row. No row = that model has no separate cache rate.
Plan limits
Each plan caps requests per minute (rpm) and concurrent requests (default concurrent = rpm ÷ 8). A 429 comes with a Retry-After header — well-behaved tools wait and retry by themselves.
Error lookup
The cause is almost always a tool ↔ model mismatch. Match the message you received:
This model does not support this endpointYour tool speaks a protocol the family does not serve, with no converter bridging the two.
Look up the family's column in the matrix above, switch tool or model.
protocol_not_supported / 400 from upstreamThe group only accepts a protocol other than what the request carries.
Rarely customer-visible — the gateway reroutes it. If you see it, contact support with the request id.
400 mentioning the “official CLI”Kimi serves Messages only; the request uses an interface with no converter.
Use Claude Code or a chat tool (converted), or pick another family if you are on Codex CLI.
Invalid reasoning_effort valueThe reasoning_effort value the model refuses.
The gateway drops the field and retries — nothing to do. If it persists, switch model.
401 invalid_api_keyWrong key, revoked key, or wrong header shape.
Check the key at dashboard → API keys. Correct form: Authorization: Bearer sk-texapi-… (missing ‘Bearer’ is rejected too).
402 insufficient_balanceCredit balance empty or never topped up.
Top up at dashboard → Wallet. For large requests, the credit balance must cover the estimated output too.
429 rate_limitOver the plan's rpm or concurrent-request cap.
Wait for Retry-After and retry. If this happens often, consider a higher plan.
429 spend_limitOver the monthly spend limit you set on the key.
Raise or remove it at dashboard → API keys → edit key.
FAQ
Do I have to use the official vendor tools?
Every family on sale accepts standard clients. Kimi serves Messages only, so Claude Code and chat tools work while Codex CLI does not. The matrix above is authoritative.
Can one API key serve multiple machines?
Yes — a key you manage yourself is not tied to a machine. The connector, though, issues ONE KEY PER MACHINE (easy to revoke individually, clear which key belongs to which machine). If you want a shared key, create it by hand in the dashboard.
Does format conversion lose data?
Very little. The two-way converters are covered by hundreds of tests. A few rare parameters (e.g. stop_sequences when targeting Responses) have no field on the target protocol and are dropped — conversation content and tool calls always survive.
Why does my traffic still go to the old upstream after configuring?
Three usual causes: (1) an old tool environment variable still alive elsewhere overriding the config; (2) a more specific config file (a repo's .claude/settings.json, .aider.conf.yml) overriding the file you just edited; (3) the tool running from a shell that has not reloaded its environment. Running connector status shows exactly which config each tool reads.
Do prices change?
Prices track upstream cost and are re-checked on every sync (a few hours). Rates always show in dashboard → Models and /api/public/pricing — there is no unpublished pricing.
Are there volume discounts?
Yes: subscriptions carry a monthly usage discount (discountBps shown per plan), and coupons can be redeemed on the Redeem page. A minimum-margin floor guarantees we never sell below cost.
Is my data stored?
Request logs store metadata (model, token counts, cost, status, request id) for billing and debugging — not conversation content. Details in Legal → Privacy.
I need a model that is not listed.
The list grows continuously with upstream. Contact support (the chat widget, bottom right) with the model name and your use case — if a supplier carries it and the margin works, it lands in the next sync.