Loading...

Docs · Getting started

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.

TopxAI provides OpenAI- and Anthropic-compatible endpoints for the models listed below. Compatibility depends on the model and endpoint: some requests use the provider's native format, while others are converted, and documented fields can be adjusted or removed. A supported endpoint does not guarantee every SDK feature or server-side conversation storage.

Use this page for endpoint selection, authentication and conversion limits. The provider comparison lists field and system-prompt changes; the LangChain guide explains Claude's JSON Schema and tool-choice limits. /openapi.json provides the OpenAPI 3.1 specification for API tools and code generators.

Base URLs

Authentication

A TopxAI key (sk-…) from the API keys page, sent one of two ways:

The key's route decides which models it can call; an Auto-route key can call every model.

Endpoints

Endpoint Format Models Notes
POST /v1/chat/completions OpenAI Chat Completions every text model except Jev stream: true for SSE
POST /v1/responses OpenAI Responses gpt-6-astra, gpt-6.1-sol, gpt-6.1-terra, grok-4.7, deepseek-flash-Abliterated, kimi-k3.1-pro what Codex CLI uses
POST /v1/messages Anthropic Messages every text model except Jev Claude natively, the other models through a conversion (below); anthropic-version optional
POST /v1/images/generations OpenAI Images gpt-image-2.5-sunburst, gpt-image-2.5-flare priced per image by the size tier; n 1 to 128
POST /v1/images/edits OpenAI Images (multipart) the same two priced like generation
POST /v1/videos/generations video job grok-imagine-video-1.5 duration 1 to 15 s, resolution 480p/720p/1080p; billed on acceptance
GET /v1/videos/{request_id} job status keep polling on pending, queued, processing, running, in_progress
GET /v1/videos/{request_id}/content the file after done
POST /v1/systemone TypeSafe System One jev-1.14.0, jev-latest, jev-preview model, state, questions; images in assets, as base64 or multipart parts; also /v1/system_one
GET /v1/models OpenAI model list filtered to the key's route
GET /api/pricing JSON price table no key needed; the data behind /pricing

For deepseek-flash-Abliterated, native Responses supports stateless requests with full conversation context in input. Server-side conversation persistence is not promised for this deployment. If max_output_tokens is missing, TopxAI fills up to 262,144 tokens, bounded by the context window remaining after the estimated prompt. See the model guide.

kimi-k3.1-pro also accepts stateless Responses requests. Send the full conversation in input; server-side conversation persistence and a complete Codex workflow have not been verified. See the Kimi guide.

Model compatibility and verification

Reviewed on 2026-10-28 against the current catalogue and the linked model guides. This table describes documented support and known limits; it is not a fresh end-to-end test of every model and client version. Use the exact model ID from pricing, and validate the feature your application needs before moving a workload.

Model or family Interface to use Features and limits Setup or evidence
Claude Fable 5.1, Sonnet 5.5, Opus 5.5 Messages for native Claude features; Chat Completions for OpenAI clients Streaming and tool calls; forced tool choice is rejected. Chat JSON Schema is converted to Claude's supported subset. Native Messages preserves cache breakpoints. Claude Code setup, structured-output examples and limits
GPT-6 Astra, GPT-6.1 Sol and Terra, Grok 4.7 Chat Completions or Responses; Messages is converted Streaming is available. Cross-format calls can change reasoning and tool-result representation; the conversion rules below apply. Endpoint support alone does not verify every SDK option. SDK examples, field changes
Kimi K3.1 Pro Chat Completions; stateless Responses; converted Messages Preserve reasoning and tool-call fields across turns. Images use base64 data URIs, not public HTTP image URLs. Responses persistence and a complete Codex workflow remain unverified. Kimi guide
deepseek-flash-Abliterated Chat Completions, stateless Responses, converted Messages Private deployment with text, image input and streaming. Send full conversation context; server-side persistence is not promised. Endpoint support does not establish full Codex workflow acceptance. Flash guide and request example
GLM-5.3-Abliterated Chat Completions or converted Messages Private text-only deployment. Attachments become a text notice. Some JSON Schema string formats become description hints; validate the returned object in your application. GLM guide
Jev 1.14.0 System One Typed questions and answers through its own request format; not a Chat Completions, Responses or Messages model. Jev request examples

For a minimal integration check, start with the SDK request example, then enable streaming or add one tool/schema/image at a time. A successful text reply does not verify those other features. Record the model, route, client version, date and request ID when reporting a result; never publish your API key or private prompt.

Messages requests to other models

Claude models get a /v1/messages request in Anthropic's own format, cache_control breakpoints included; the few fields the relay changes on the way, such as a missing max_tokens set to the model's output limit, are listed in the comparison with the providers' APIs. Without anthropic-version the relay sends Claude 2023-06-01; the converted requests do not carry the header. For the other text models TopxAI converts the request: gpt-6.1-sol and gpt-6.1-terra go to the Responses API; gpt-6-astra, grok-4.7, kimi-k3.1-pro, GLM-5.3-Abliterated and deepseek-flash-Abliterated go to Chat Completions. The answer comes back as a Messages response or event stream either way. Where the converted models differ from Claude:

Status codes

400 the body failed validation, the message names the field; on System One it can also be TypeSafe's own rejection, passed through. 401 key missing or invalid. 402 balance empty. 403 model not sold here, not on this key's route, or excluded by the key's model limits. 404 the provider says the model does not exist, or an unknown video job. 413 a System One body or image over a size limit. 422 TypeSafe's validation detail (System One only). 429 rate limited, Retry-After in seconds. 503 no line can serve the model now; retry. Every error message ends with a request id; quote it to support@topxea.com.

Using the specification

curl -O https://ai.topxea.com/openapi.json

Import the file into Postman or Insomnia to get a request per endpoint with the examples filled in, or feed it to openapi-generator for a typed client. The file's servers entry is the production origin; nothing in it is specific to a key or an account.

Not served

Batch, fine-tuning, files, assistants, vector stores, realtime, audio and embeddings are not relayed; requests to those paths return 404. Keep them on the provider's own key. The comparison with the providers' APIs lists what else stays direct.

Related

Previous: Connect your SDK · Next: Claude Code with TopxAI: ANTHROPIC_BASE_URL and the key

Other languages: 简体中文