# TokenRa full model and API context TokenRa is an independent OpenAI-compatible AI API gateway. It provides one account-level API key for enabled model channels, model discovery, usage visibility, billing, and developer integrations. Model availability and pricing are dynamic; the live TokenRa console is authoritative. ## Public routes - Home: https://tokenra.io/ - Model catalog: https://tokenra.io/models.html - Chinese model catalog: https://tokenra.io/zh/models.html - English developer documentation: https://tokenra.io/docs.html (one page per model under https://tokenra.io/docs/) - Chinese developer documentation: https://tokenra.io/zh/docs.html (one page per model under https://tokenra.io/zh/docs/) - Console: https://tokenra.io/dashboard/overview - Robots: https://tokenra.io/robots.txt - Sitemap: https://tokenra.io/sitemap.xml ## Developer docs (one page per model) Request parameters, tested behaviour and code samples (cURL, Python, JavaScript, Java) for each model. - [Docs home](https://tokenra.io/docs.html) - [Quickstart](https://tokenra.io/docs/quickstart.html) - [API basics: base URL, auth, errors, retries](https://tokenra.io/docs/common.html) - [Model list](https://tokenra.io/docs/models.html) - [Seedance 2.0 Pro (seedance-2-0-pro)](https://tokenra.io/docs/seedance-2-0-pro.html) - [Seedance 2.0 Fast (seedance-2-0-fast)](https://tokenra.io/docs/seedance-2-0-fast.html) - [Seedance 2.0 Mini (seedance-2-0-mini)](https://tokenra.io/docs/seedance-2-0-mini.html) - [Seedance 2.5 Pro (artsdance-2-5-pro-260801)](https://tokenra.io/docs/artsdance-2-5-pro-260801.html) - [GPT Image 2.5 Flare (gpt-image-2.5-flare)](https://tokenra.io/docs/gpt-image-2.5-flare.html) - [GPT Image 2.5 Sunburst (gpt-image-2.5-sunburst)](https://tokenra.io/docs/gpt-image-2.5-sunburst.html) - [MiniMax M3.1 Flash (minimax-m3.1-flash)](https://tokenra.io/docs/minimax-m3.1-flash.html) - [MiniMax M3 (minimax-m3)](https://tokenra.io/docs/minimax-m3.html) - [Space Bunny Alpha (space-bunny-alpha)](https://tokenra.io/docs/space-bunny-alpha.html) - [Qwen3.8 Max (qwen3.8-max)](https://tokenra.io/docs/qwen3.8-max.html) - [Qwen3.8 Flash (qwen3.8-flash)](https://tokenra.io/docs/qwen3.8-flash.html) - [Qwen3.8 Omni Flash (qwen3.8-omni-flash)](https://tokenra.io/docs/qwen3.8-omni-flash.html) - [GLM-5.3 (glm-5.3)](https://tokenra.io/docs/glm-5.3.html) - [GLM-5.3 Flash (glm-5.3-flash, glm‑5.3‑flash‑discounted)](https://tokenra.io/docs/glm-5.3-flash.html) - [GLM-5.3 FlashX (glm-5.3-flashx)](https://tokenra.io/docs/glm-5.3-flashx.html) - [Kimi K3 (kimi-k3, kimi-k3-50off)](https://tokenra.io/docs/kimi-k3.html) - [Kimi K3.1 Pro (kimi-k3.1-pro)](https://tokenra.io/docs/kimi-k3.1-pro.html) - [DeepSeek V4.1 Flash (deepseek-v4.1-flash, deepseek-v4.1-flash-50off)](https://tokenra.io/docs/deepseek-v4.1-flash.html) - [DeepSeek V4.1 Flash 1017 (deepseek-v4.1-flash-1017)](https://tokenra.io/docs/deepseek-v4.1-flash-1017.html) - [DeepSeek V4 Flash (deepseek-v4-flash)](https://tokenra.io/docs/deepseek-v4-flash.html) - [DeepSeek V4 Flash 0731 Fast (deepseek-v4-flash-0731-fast)](https://tokenra.io/docs/deepseek-v4-flash-0731-fast.html) - [DeepSeek V4 Flash Vision Exp (deepseek-v4-flash-vision-exp)](https://tokenra.io/docs/deepseek-v4-flash-vision-exp.html) - [Gemini 3.8 Flash (gemini-3.8-flash)](https://tokenra.io/docs/gemini-3.8-flash.html) - [HY3 (hy3)](https://tokenra.io/docs/hy3.html) - [HY4 Preview (hy4-preview)](https://tokenra.io/docs/hy4-preview.html) - [Step 5 Preview (step-5-preview)](https://tokenra.io/docs/step-5-preview.html) - [MiMo V2.5 (mimo-v2.5)](https://tokenra.io/docs/mimo-v2.5.html) - [Union Alpha (union-alpha)](https://tokenra.io/docs/union-alpha.html) - [Ox Alpha (ox-alpha)](https://tokenra.io/docs/ox-alpha.html) - [Omen Alpha (omen-alpha)](https://tokenra.io/docs/omen-alpha.html) - [Jev (jev-latest)](https://tokenra.io/docs/jev-latest.html) Setup guides for coding tools (base URL, API key, model ID, tested models): - [Use TokenRa in Claude Code](https://tokenra.io/docs/claude-code.html) - [Use TokenRa in Cursor](https://tokenra.io/docs/cursor.html) - [Use TokenRa in Cline](https://tokenra.io/docs/cline.html) - [Use TokenRa in Codex CLI](https://tokenra.io/docs/codex-cli.html) - [Use TokenRa in CC Switch](https://tokenra.io/docs/cc-switch.html) - Chinese versions use /zh/docs/ instead of /docs/, for example https://tokenra.io/zh/docs/kimi-k3.html ## Current model guides ### GPT Image 2.5 URL: https://tokenra.io/models/gpt-image-2-5.html Chinese URL: https://tokenra.io/zh/models/gpt-image-2-5.html Model ID: gpt-image-2.5-flare Provider: OpenAI Capabilities: text-to-image and image-to-image generation and editing. Endpoint: https://tokenra.io/v1/images/generations Listed rates: $0.02 per request. Confirm live billing in the console. ### Kimi K2.8 Preview URL: https://tokenra.io/models/kimi-k2-8-preview.html Chinese URL: https://tokenra.io/zh/models/kimi-k2-8-preview.html Model ID: kimi-k2.8-preview on TokenRa; official Kimi Code default identifier remains kimi-for-coding. Provider: Moonshot AI. Positioning: coding-focused preview model with code completion, coding-agent workflows, adjustable thinking, multimodal input, and a 1M-token context window. Thinking levels: low, high, and max; max is the default described on the page. Listed rates: $0.80 per 1M input tokens, $3.35 per 1M output tokens, and $0.14 per 1M cached read tokens. ### Kimi K3 URL: https://tokenra.io/models/kimi-k3-api.html Chinese URL: https://tokenra.io/zh/models/kimi-k3-api.html Model ID: kimi-k3. Provider: Moonshot AI. Positioning: open-weight multimodal Agent model with long-context research, coding, tool calling, and image/video input. Listed rates: $2.54 per 1M input tokens and $12.69 per 1M output tokens. ### Kimi K3.1 Pro URL: https://tokenra.io/models/kimi-k3-1-pro-api.html Chinese URL: https://tokenra.io/zh/models/kimi-k3-1-pro-api.html Model ID: kimi-k3.1-pro. Provider: Moonshot AI. Positioning: October 2026 refresh of Kimi K3 with the same 1,048,576-token context and 2.8T sparse Mixture-of-Experts footprint (about 104B active), at a lower list price; long-document and repository review, multi-source research, and knowledge-base question answering. Listed rates: $1.60 per 1M input tokens, $8.00 per 1M output tokens, and $0.16 per 1M cached input tokens. ### GLM-5.3-Flash URL: https://tokenra.io/models/glm-5-3-flash.html Chinese URL: https://tokenra.io/zh/models/glm-5-3-flash.html Model ID: glm-5.3-flash. Provider: Z.ai (Zhipu AI). Positioning: native multimodal coding and agent model with long context, tools, structured output, and text/image/video input. Listed rates: $0.14 per 1M input tokens, $0.52 per 1M output tokens, and $0.04 per 1M cached read tokens. ### GLM-5.3-FlashX URL: https://tokenra.io/models/glm-5-3-flashx.html Chinese URL: https://tokenra.io/zh/models/glm-5-3-flashx.html Model ID: glm-5.3-flashx. Provider: Z.ai (Zhipu AI). Positioning: the fastest model in the GLM-5.3 family, up to 200 tokens/s with the same model intelligence as GLM-5.3-Flash. Listed rates: $0.14 per 1M input tokens, $0.52 per 1M output tokens, and $0.04 per 1M cached read tokens. ### DeepSeek V4.1 Flash URL: https://tokenra.io/models/deepseek-v4.1-flash-api.html Chinese URL: https://tokenra.io/zh/models/deepseek-v4.1-flash-api.html Model ID: deepseek-v4.1-flash (the stable identifier). Provider: DeepSeek. Positioning: coding, reasoning, native multimodal (text, image, and video input), and long-context API integration. Listed rates: $0.37 per 1M input tokens, $1.49 per 1M output tokens, and $0.04 per 1M cached input tokens. Dated release: DeepSeek-V4.1-Flash-1017 has its own guide below. ### DeepSeek-V4.1-Flash-1017 URL: https://tokenra.io/models/deepseek-v4.1-flash-1017.html Chinese URL: https://tokenra.io/zh/models/deepseek-v4.1-flash-1017.html Model ID: deepseek-v4.1-flash-1017; confirm the enabled identifier for the 1017 build in the console. Provider: DeepSeek. Positioning: dated point release of DeepSeek V4.1 Flash, published by DeepSeek on October 17, 2026. Reinforcement learning with self-feedback for end-to-end project development; higher coding, agentic, and visual benchmark scores than V4.1-Flash (vendor-reported, for example Terminal-Bench 4.0 42.3 and DeepSWE v1.1 77.0) with shorter outputs and lower task execution time. Keeps the 1M-token context and multimodal input. Recommended sampling: temperature 1.0, top_p 1.0, and max_tokens of at least 256K. Listed rates: $0.209 per 1M input tokens, $0.836 per 1M output tokens, and $0.005 per 1M cached input tokens, priced separately from DeepSeek V4.1 Flash. Confirm live billing in the console. ### Omen Alpha URL: https://tokenra.io/models/omen-alpha-api.html Chinese URL: https://tokenra.io/zh/models/omen-alpha-api.html Model ID: omen-alpha. Positioning: Omen Alpha / Ox Alpha 2.0 naming context, coding and agent workflows, with pricing and gateway details on the model page. Listed rates: $0.13 per 1M input tokens, $0.50 per 1M output tokens, and $0.03 per 1M cached read tokens. ### Ox Alpha URL: https://tokenra.io/models/ox-alpha.html Chinese URL: https://tokenra.io/zh/models/ox-alpha.html Model ID: ox-alpha. Provider: Z.ai (Zhipu AI); Ox Alpha is the preview code name of GLM-5.3-Flash. Positioning: coding, reasoning, and agent workflows. TokenRa is an independent gateway and not the model developer or owner. Listed rates: $0.14 per 1M input tokens and $0.52 per 1M output tokens. ### Qwen3.8-Omni-Flash URL: https://tokenra.io/models/qwen-3.8-omni-flash.html Model ID: qwen3.8-omni-flash. Provider: Alibaba's Qwen team. Positioning: omni-modal agentic work with native text, image, audio, and video input. Listed rates: $0.23 per 1M input tokens and $0.76 per 1M output tokens. ### MiniMax M3.1 Flash URL: https://tokenra.io/models/minimax-m3.1-flash-api.html Chinese URL: https://tokenra.io/zh/models/minimax-m3.1-flash-api.html Model ID: minimax-m3.1-flash. Provider: MiniMax. Released on October 19, 2026; MiniMax confirmed that Space Bunny was an early version of this model. Positioning: Flash-tier multimodal model (text, image, and video input; text output) for agentic tasks, tool calling, coding, computer use, and cybersecurity, with a 1M-token context window and 200+ TPS output speed. Vendor-reported benchmarks from MiniMax's comparison table: Automation-Bench v1.0.6 62.8, BankerToolBench 76.2, LOCA-Bench 256K 60.3, DeepSWE v1.1 73.7, OSWorld 2.0 61.7, Terminal Bench 4.0 38.1, and CyberGym 82.2. Versus DeepSeek V4.1 Flash-1017 (same MiniMax table): M3.1 Flash leads Automation-Bench v1.0.6 (62.8 vs 60.5) and trails DeepSWE v1.1 (73.7 vs 77.0), NL2Repo-Bench (61.2 vs 68.2), Terminal Bench 4.0 (38.1 vs 42.3), BabyVision with tools (91.0 vs 92.5), and HLE without tools (43.4 vs 44.0). DeepSeek lists V4.1 Flash-1017 at $0.30 input / $1.20 output per 1M tokens at peak hours and half that off-peak; TokenRa's rate for it is $0.209 / $0.836. Listed rates: free on TokenRa until 2026-10-31 ($0 per 1M input, output, and cached input tokens). MiniMax's list price is $0.15 per 1M input tokens, $0.60 per 1M output tokens, and $0.015 per 1M cached input tokens, half of MiniMax-M3's $0.30 / $1.20 standard rate for prompts up to 512K tokens. Confirm live billing in the console. Relationship: the Space Bunny Alpha guide (https://tokenra.io/models/space-bunny-alpha-api.html) covers the earlier stealth build of the same model under model ID space-bunny-alpha. It is a different version and entry point, not a separate product. Sources: MiniMax release post, https://www.minimax.io/blog/minimax-m31f; MiniMax API docs (models, 1M context window), https://platform.minimax.io/docs/guides/models-intro; MiniMax API docs (text generation, multimodal chat input), https://platform.minimax.io/docs/guides/text-generation; MiniMax pricing, https://platform.minimax.io/docs/pricing/overview; DeepSeek models and pricing, https://api-docs.deepseek.com/quick_start/pricing; Hacker News discussion, https://news.ycombinator.com/item?id=50154540. ### Space Bunny Alpha URL: https://tokenra.io/models/space-bunny-alpha-api.html Chinese URL: https://tokenra.io/zh/models/space-bunny-alpha-api.html Model ID: space-bunny-alpha. Provider: MiniMax, which confirmed on 2026-10-19 that Space Bunny was an early version of MiniMax M3.1 Flash (https://tokenra.io/models/minimax-m3.1-flash-api.html). Positioning: free model with a 1M-token context window and text, image, and video input. Listed rates: free on TokenRa at the time of writing. ### Union Alpha URL: https://tokenra.io/models/union-alpha.html Chinese URL: https://tokenra.io/zh/models/union-alpha.html Model ID: union-alpha. Provider: an undisclosed third-party provider listed as Stealth. Positioning: free multimodal model with a 262K context window and text plus image input. Listed rates: free on TokenRa at the time of writing. ### Jev URL: https://tokenra.io/models/jev-api.html Chinese URL: https://tokenra.io/zh/models/jev-api.html Model ID: jev-latest. Provider: TypeSafe. Positioning: TypeSafe's System One model. It returns typed Noul (boolean), Choice, and Score decisions with calibrated confidence instead of free text, with a 32,000-token context window. Endpoint: https://tokenra.io/v1/decisions (Jev does not use the OpenAI chat format). Billing: priced per 1M tokens, with input and output at the same rate ($0.042 per 1M tokens for both on 2026-10-24, i.e. input and output are charged alike). Confirm the live rate in the console. ### Seedance 2.0 Pro URL: https://tokenra.io/models/seedance-2-0-api.html Chinese URL: https://tokenra.io/zh/models/seedance-2-0-api.html Chinese API guide: https://tokenra.io/zh/docs/seedance-2-0-pro.html Model ID: seedance-2-0-pro. Model family: Seedance (ByteDance). Positioning: video generation through asynchronous tasks; submit a task, then poll its status. Endpoint: https://tokenra.io/v1/video/generations Listed rates: $6.85 per 1M tokens for both input and output. ### Seedance 2.0 Mini URL: https://tokenra.io/models/seedance-2-0-mini.html Chinese URL: https://tokenra.io/zh/models/seedance-2-0-mini.html Model ID: seedance-2-0-mini. Model family: Seedance (ByteDance). Positioning: video generation through asynchronous tasks; submit a task, then poll its status. Endpoint: https://tokenra.io/v1/video/generations Listed rates: $2.44 per 1M tokens for both input and output. ### Seedance 2.5 URL: https://tokenra.io/models/seedance-2-5-api.html Chinese URL: https://tokenra.io/zh/models/seedance-2-5-api.html Chinese API guide: https://tokenra.io/zh/docs/artsdance-2-5-pro-260801.html Model ID: artsdance-2-5-pro-260801. Model family: Seedance (ByteDance). Positioning: video generation through asynchronous tasks; submit a task, then poll its status. Endpoint: https://tokenra.io/v1/video/generations Listed rates: $8.88 per 1M tokens for both input and output. ## API endpoints Chat completions: `https://tokenra.io/v1/chat/completions` Image generation: `https://tokenra.io/v1/images/generations` Video generation (asynchronous tasks): `https://tokenra.io/v1/video/generations` Typed decisions (Jev): `https://tokenra.io/v1/decisions` Requests use `Authorization: Bearer YOUR_API_KEY` and an enabled model identifier. Keep credentials server-side. Confirm the live endpoint, model ID, supported modalities, context length, rate limits, and pricing before production use. ## Pricing Public model pages show reference rates and explain applicable billing units. Rates may vary by channel, account, or promotion. Do not assume a public page's historical price is permanent; use the live TokenRa console for current billing. ## Attribution TokenRa is an independent API gateway. OpenAI, Moonshot AI, Z.ai/Zhipu AI, DeepSeek, MiniMax, Alibaba (Qwen), ByteDance (Seedance), TypeSafe, and other provider names and models belong to their respective owners. TokenRa pages should not be interpreted as official vendor pages or endorsements. ## About TokenRa - English: https://tokenra.io/about.html - Chinese: https://tokenra.io/zh/about.html TokenRa is an independent API gateway. Contact: support@tokenra.io. ## Per-model guides (full text) The per-model guides (https://tokenra.io/docs//llms.txt, English) in the order of the model list. ### Seedance 2.0 Pro API on TokenRa Model ID: `seedance-2-0-pro` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > Seedance 2.0 Pro is ByteDance's highest-quality Seedance 2.0 video model. Video generation on TokenRa is asynchronous: you create a task, then poll it until the video URL is ready. - Provider: ByteDance - Type: Video model - Input: Text, images - Output: Video with audio - Mode: Async task #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `seedance-2-0-pro`: $6.85 per 1M tokens, input and output at the same rate (a video task is charged by the tokens it uses) #### Capabilities & endpoints Video generation is asynchronous: create a task, then poll it. A 4-second 480p clip took 3.5 to 4 minutes in testing. - `POST https://tokenra.io/v1/video/generations`: Create a task. Returns `task_id` immediately. - `GET https://tokenra.io/v1/video/generations/{task_id}`: Query the task. The video link is in `data.result_url` when `data.status` is `SUCCESS`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash # 1. Create the task. The response contains task_id. curl https://tokenra.io/v1/video/generations \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "seedance-2-0-pro", "prompt": "A paper boat drifting down a rainy neon street at night, cinematic close-up", "metadata": { "resolution": "720p", "ratio": "16:9", "duration": 5 } }' # 2. Poll every 10-15 s until data.status is SUCCESS or FAILURE. curl https://tokenra.io/v1/video/generations/TASK_ID \ -H "Authorization: Bearer $TOKENRA_API_KEY" ``` #### Generation modes All three request shapes produced a video on 2026-10-23. ##### A. Text to video Only a prompt. Output settings go in `metadata`. **POST /v1/video/generations** ```json { "model": "seedance-2-0-pro", "prompt": "A paper boat drifting down a rainy neon street at night, cinematic close-up", "metadata": { "resolution": "720p", "ratio": "16:9", "duration": 5 } } ``` ##### B. Image to video (first frame) Put image URLs in `images`; one image is used as the first frame. **POST /v1/video/generations** ```json { "model": "seedance-2-0-pro", "prompt": "The girl in the picture turns around and smiles", "images": ["https://example.com/first-frame.png"], "metadata": {"resolution": "720p", "duration": 5} } ``` ##### C. Reference images To give images a role, send Volcengine Ark `content` items inside `metadata`. The prompt is added as the text item automatically. **POST /v1/video/generations** ```json { "model": "seedance-2-0-pro", "prompt": "The character from image 1 walks into the room from image 2", "metadata": { "resolution": "720p", "ratio": "16:9", "content": [ { "type": "image_url", "image_url": {"url": "https://example.com/character.png"}, "role": "reference_image" }, { "type": "image_url", "image_url": {"url": "https://example.com/room.png"}, "role": "reference_image" } ] } } ``` #### Request parameters **Put output settings in metadata** Top-level `resolution`, `ratio` and `duration` are ignored for Seedance 2.0. A test on 2026-10-23 with top-level `ratio: "9:16"` and `duration: 4` produced a 16:9, 5-second video, while `metadata.resolution` was applied. With the same values in `metadata`, the video was 9:16 and 4 seconds long. ##### Top-level fields | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | `seedance-2-0-pro`. `seedance-2-0-fast` and `seedance-2-0-mini` take the same parameters. | | `prompt` | string | Yes | Describe the scene, the motion and the camera. | | `images` | string[] | No | Image URLs. Plain strings only; use `metadata.content` when you need roles. | | `metadata` | object | No | Output settings and Ark-native fields, see the next table. | ##### metadata fields | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `resolution` | string | No | `480p`, `720p` or `1080p`; `480p` was tested. Also decides the price. | | `ratio` | string | No | `16:9`, `9:16`, `4:3`, `3:4`, `1:1`, `21:9` or `adaptive`. `16:9` and `9:16` were tested. | | `duration` | integer | No | Length in seconds, 4 to 15. Default 5; `4` was tested. | | `generate_audio` | boolean | No | Generate a matching soundtrack. On by default: every test video had an audio track. | | `seed` | integer | No | Random seed for repeatable results. | | `camera_fixed` | boolean | No | Keep the camera still. | | `watermark` | boolean | No | Add the upstream watermark. | | `content` | array | No | Ark material items: `image_url` with `role` such as `first_frame`, `last_frame` or `reference_image`. | #### Response format ##### Create response **200 OK** ```json { "id": "task_FUhA4FK80TV1p70mpHlyZXCxeHR0dPPa", "task_id": "task_FUhA4FK80TV1p70mpHlyZXCxeHR0dPPa", "object": "video", "model": "seedance-2-0-pro", "status": "queued", "progress": 0, "created_at": 1792766873 } ``` ##### Query response **200 OK** ```json { "code": "success", "message": "", "data": { "task_id": "task_FUhA4FK80TV1p70mpHlyZXCxeHR0dPPa", "action": "generate", "status": "SUCCESS", "fail_reason": "", "result_url": "https://example.com/output.mp4", "submit_time": 1792766873, "start_time": 1792766890, "finish_time": 1792767085, "progress": "100%", "data": {"resolution": "720p", "ratio": "16:9", "duration": 5, "...": "..."} } } ``` `data.data` holds the raw upstream task, including the resolution, ratio and duration that were actually used. | data.status | Meaning | | --- | --- | | `NOT_START` / `SUBMITTED` / `QUEUED` | Accepted, waiting to start. | | `IN_PROGRESS` | Generating. | | `SUCCESS` | Done. Download `result_url`. | | `FAILURE` | Failed. The reason is in `fail_reason`; the pre-charged amount is refunded. | #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Poll every 10-15 seconds. Test tasks (4 s, 480p) finished in 3.5 to 4 minutes. - `result_url` is a temporary link. Download and store the video yourself. - The price depends on `metadata.resolution` and on whether a video reference is included. See the live rate in the Model Square. #### More - [Seedance 2.0 Pro API docs page](https://tokenra.io/docs/seedance-2-0-pro.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [Seedance 2.0 Pro overview and pricing page](https://tokenra.io/models/seedance-2-0-api.html) - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/seedance-2-0-pro/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/seedance-2-0-pro/llms.txt ### Seedance 2.0 Fast API on TokenRa Model ID: `seedance-2-0-fast` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > Seedance 2.0 Fast is the lower-cost Fast model of ByteDance's Seedance 2.0 series. It takes the same requests as Seedance 2.0 Pro: create a task, then poll it until the video URL is ready. - Provider: ByteDance - Type: Video model - Input: Text, images - Output: Video with audio - Mode: Async task #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `seedance-2-0-fast`: $5.15 per 1M tokens, input and output at the same rate (a video task is charged by the tokens it uses) #### Capabilities & endpoints Video generation is asynchronous: create a task, then poll it. A 4-second 480p clip took 3.5 to 4 minutes in testing. - `POST https://tokenra.io/v1/video/generations`: Create a task. Returns `task_id` immediately. - `GET https://tokenra.io/v1/video/generations/{task_id}`: Query the task. The video link is in `data.result_url` when `data.status` is `SUCCESS`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash # 1. Create the task. The response contains task_id. curl https://tokenra.io/v1/video/generations \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "seedance-2-0-fast", "prompt": "A paper boat drifting down a rainy neon street at night, cinematic close-up", "metadata": { "resolution": "720p", "ratio": "16:9", "duration": 5 } }' # 2. Poll every 10-15 s until data.status is SUCCESS or FAILURE. curl https://tokenra.io/v1/video/generations/TASK_ID \ -H "Authorization: Bearer $TOKENRA_API_KEY" ``` #### Generation modes All three request shapes produced a video on 2026-10-23. ##### A. Text to video Only a prompt. Output settings go in `metadata`. **POST /v1/video/generations** ```json { "model": "seedance-2-0-fast", "prompt": "A paper boat drifting down a rainy neon street at night, cinematic close-up", "metadata": { "resolution": "720p", "ratio": "16:9", "duration": 5 } } ``` ##### B. Image to video (first frame) Put image URLs in `images`; one image is used as the first frame. **POST /v1/video/generations** ```json { "model": "seedance-2-0-fast", "prompt": "The girl in the picture turns around and smiles", "images": ["https://example.com/first-frame.png"], "metadata": {"resolution": "720p", "duration": 5} } ``` ##### C. Reference images To give images a role, send Volcengine Ark `content` items inside `metadata`. The prompt is added as the text item automatically. **POST /v1/video/generations** ```json { "model": "seedance-2-0-fast", "prompt": "The character from image 1 walks into the room from image 2", "metadata": { "resolution": "720p", "ratio": "16:9", "content": [ { "type": "image_url", "image_url": {"url": "https://example.com/character.png"}, "role": "reference_image" }, { "type": "image_url", "image_url": {"url": "https://example.com/room.png"}, "role": "reference_image" } ] } } ``` #### Request parameters **Put output settings in metadata** Top-level `resolution`, `ratio` and `duration` are ignored for Seedance 2.0. A test on 2026-10-23 with top-level `ratio: "9:16"` and `duration: 4` produced a 16:9, 5-second video, while `metadata.resolution` was applied. With the same values in `metadata`, the video was 9:16 and 4 seconds long. ##### Top-level fields | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | `seedance-2-0-fast`. `seedance-2-0-pro` and `seedance-2-0-mini` take the same parameters. | | `prompt` | string | Yes | Describe the scene, the motion and the camera. | | `images` | string[] | No | Image URLs. Plain strings only; use `metadata.content` when you need roles. | | `metadata` | object | No | Output settings and Ark-native fields, see the next table. | ##### metadata fields | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `resolution` | string | No | `480p`, `720p` or `1080p`; `480p` was tested. Also decides the price. | | `ratio` | string | No | `16:9`, `9:16`, `4:3`, `3:4`, `1:1`, `21:9` or `adaptive`. `16:9` and `9:16` were tested. | | `duration` | integer | No | Length in seconds, 4 to 15. Default 5; `4` was tested. | | `generate_audio` | boolean | No | Generate a matching soundtrack. On by default: every test video had an audio track. | | `seed` | integer | No | Random seed for repeatable results. | | `camera_fixed` | boolean | No | Keep the camera still. | | `watermark` | boolean | No | Add the upstream watermark. | | `content` | array | No | Ark material items: `image_url` with `role` such as `first_frame`, `last_frame` or `reference_image`. | #### Response format ##### Create response **200 OK** ```json { "id": "task_FUhA4FK80TV1p70mpHlyZXCxeHR0dPPa", "task_id": "task_FUhA4FK80TV1p70mpHlyZXCxeHR0dPPa", "object": "video", "model": "seedance-2-0-fast", "status": "queued", "progress": 0, "created_at": 1792766873 } ``` ##### Query response **200 OK** ```json { "code": "success", "message": "", "data": { "task_id": "task_FUhA4FK80TV1p70mpHlyZXCxeHR0dPPa", "action": "generate", "status": "SUCCESS", "fail_reason": "", "result_url": "https://example.com/output.mp4", "submit_time": 1792766873, "start_time": 1792766890, "finish_time": 1792767085, "progress": "100%", "data": {"resolution": "720p", "ratio": "16:9", "duration": 5, "...": "..."} } } ``` `data.data` holds the raw upstream task, including the resolution, ratio and duration that were actually used. | data.status | Meaning | | --- | --- | | `NOT_START` / `SUBMITTED` / `QUEUED` | Accepted, waiting to start. | | `IN_PROGRESS` | Generating. | | `SUCCESS` | Done. Download `result_url`. | | `FAILURE` | Failed. The reason is in `fail_reason`; the pre-charged amount is refunded. | #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Poll every 10-15 seconds. Test tasks (4 s, 480p) finished in 3.5 to 4 minutes. - `result_url` is a temporary link. Download and store the video yourself. - The price depends on `metadata.resolution` and on whether a video reference is included. See the live rate in the Model Square. #### More - [Seedance 2.0 Fast API docs page](https://tokenra.io/docs/seedance-2-0-fast.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [Seedance 2.0 Fast overview and pricing page](https://tokenra.io/models/seedance-2-0-api.html) - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/seedance-2-0-fast/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/seedance-2-0-fast/llms.txt ### Seedance 2.0 Mini API on TokenRa Model ID: `seedance-2-0-mini` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > Seedance 2.0 Mini is the lowest-cost model of ByteDance's Seedance 2.0 series, meant for high-volume video production. It takes the same requests as Seedance 2.0 Pro. - Provider: ByteDance - Type: Video model - Input: Text, images - Output: Video with audio - Mode: Async task #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `seedance-2-0-mini`: $2.44 per 1M tokens, input and output at the same rate (a video task is charged by the tokens it uses) #### Capabilities & endpoints Video generation is asynchronous: create a task, then poll it. A 4-second 480p clip took 3.5 to 4 minutes in testing. - `POST https://tokenra.io/v1/video/generations`: Create a task. Returns `task_id` immediately. - `GET https://tokenra.io/v1/video/generations/{task_id}`: Query the task. The video link is in `data.result_url` when `data.status` is `SUCCESS`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash # 1. Create the task. The response contains task_id. curl https://tokenra.io/v1/video/generations \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "seedance-2-0-mini", "prompt": "A paper boat drifting down a rainy neon street at night, cinematic close-up", "metadata": { "resolution": "720p", "ratio": "16:9", "duration": 5 } }' # 2. Poll every 10-15 s until data.status is SUCCESS or FAILURE. curl https://tokenra.io/v1/video/generations/TASK_ID \ -H "Authorization: Bearer $TOKENRA_API_KEY" ``` #### Generation modes All three request shapes produced a video on 2026-10-23. ##### A. Text to video Only a prompt. Output settings go in `metadata`. **POST /v1/video/generations** ```json { "model": "seedance-2-0-mini", "prompt": "A paper boat drifting down a rainy neon street at night, cinematic close-up", "metadata": { "resolution": "720p", "ratio": "16:9", "duration": 5 } } ``` ##### B. Image to video (first frame) Put image URLs in `images`; one image is used as the first frame. **POST /v1/video/generations** ```json { "model": "seedance-2-0-mini", "prompt": "The girl in the picture turns around and smiles", "images": ["https://example.com/first-frame.png"], "metadata": {"resolution": "720p", "duration": 5} } ``` ##### C. Reference images To give images a role, send Volcengine Ark `content` items inside `metadata`. The prompt is added as the text item automatically. **POST /v1/video/generations** ```json { "model": "seedance-2-0-mini", "prompt": "The character from image 1 walks into the room from image 2", "metadata": { "resolution": "720p", "ratio": "16:9", "content": [ { "type": "image_url", "image_url": {"url": "https://example.com/character.png"}, "role": "reference_image" }, { "type": "image_url", "image_url": {"url": "https://example.com/room.png"}, "role": "reference_image" } ] } } ``` #### Request parameters **Put output settings in metadata** Top-level `resolution`, `ratio` and `duration` are ignored for Seedance 2.0. A test on 2026-10-23 with top-level `ratio: "9:16"` and `duration: 4` produced a 16:9, 5-second video, while `metadata.resolution` was applied. With the same values in `metadata`, the video was 9:16 and 4 seconds long. ##### Top-level fields | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | `seedance-2-0-mini`. `seedance-2-0-pro` and `seedance-2-0-fast` take the same parameters. | | `prompt` | string | Yes | Describe the scene, the motion and the camera. | | `images` | string[] | No | Image URLs. Plain strings only; use `metadata.content` when you need roles. | | `metadata` | object | No | Output settings and Ark-native fields, see the next table. | ##### metadata fields | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `resolution` | string | No | `480p`, `720p` or `1080p`; `480p` was tested. Also decides the price. | | `ratio` | string | No | `16:9`, `9:16`, `4:3`, `3:4`, `1:1`, `21:9` or `adaptive`. `16:9` and `9:16` were tested. | | `duration` | integer | No | Length in seconds, 4 to 15. Default 5; `4` was tested. | | `generate_audio` | boolean | No | Generate a matching soundtrack. On by default: every test video had an audio track. | | `seed` | integer | No | Random seed for repeatable results. | | `camera_fixed` | boolean | No | Keep the camera still. | | `watermark` | boolean | No | Add the upstream watermark. | | `content` | array | No | Ark material items: `image_url` with `role` such as `first_frame`, `last_frame` or `reference_image`. | #### Response format ##### Create response **200 OK** ```json { "id": "task_FUhA4FK80TV1p70mpHlyZXCxeHR0dPPa", "task_id": "task_FUhA4FK80TV1p70mpHlyZXCxeHR0dPPa", "object": "video", "model": "seedance-2-0-mini", "status": "queued", "progress": 0, "created_at": 1792766873 } ``` ##### Query response **200 OK** ```json { "code": "success", "message": "", "data": { "task_id": "task_FUhA4FK80TV1p70mpHlyZXCxeHR0dPPa", "action": "generate", "status": "SUCCESS", "fail_reason": "", "result_url": "https://example.com/output.mp4", "submit_time": 1792766873, "start_time": 1792766890, "finish_time": 1792767085, "progress": "100%", "data": {"resolution": "720p", "ratio": "16:9", "duration": 5, "...": "..."} } } ``` `data.data` holds the raw upstream task, including the resolution, ratio and duration that were actually used. | data.status | Meaning | | --- | --- | | `NOT_START` / `SUBMITTED` / `QUEUED` | Accepted, waiting to start. | | `IN_PROGRESS` | Generating. | | `SUCCESS` | Done. Download `result_url`. | | `FAILURE` | Failed. The reason is in `fail_reason`; the pre-charged amount is refunded. | #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Poll every 10-15 seconds. Test tasks (4 s, 480p) finished in 3.5 to 4 minutes. - `result_url` is a temporary link. Download and store the video yourself. - The price depends on `metadata.resolution` and on whether a video reference is included. See the live rate in the Model Square. #### More - [Seedance 2.0 Mini API docs page](https://tokenra.io/docs/seedance-2-0-mini.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [Seedance 2.0 Mini overview and pricing page](https://tokenra.io/models/seedance-2-0-mini.html) - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/seedance-2-0-mini/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/seedance-2-0-mini/llms.txt ### Seedance 2.5 Pro API on TokenRa Model ID: `artsdance-2-5-pro-260801` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > Seedance 2.5 Pro is ByteDance's Seedance 2.5 video model, served on TokenRa under the ID `artsdance-2-5-pro-260801`. It takes text and reference images and returns a video with audio. The request format differs from Seedance 2.0. - Provider: ByteDance - Type: Video model - Input: Text, reference images - Output: 720p or 1080p video - Mode: Async task #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `artsdance-2-5-pro-260801`: $8.88 per 1M tokens, input and output at the same rate (a video task is charged by the tokens it uses) #### Capabilities & endpoints Video generation is asynchronous: create a task, then poll it. A 4-5 second 720p clip took about 5 minutes in testing. - `POST https://tokenra.io/v1/video/generations`: Create a task. Returns `task_id` immediately. - `GET https://tokenra.io/v1/video/generations/{task_id}`: Query the task. The video link is in `data.result_url` when `data.status` is `SUCCESS`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash # 1. Create the task. The response contains task_id. curl https://tokenra.io/v1/video/generations \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "artsdance-2-5-pro-260801", "prompt": "A paper boat drifting down a rainy neon street at night, cinematic close-up", "resolution": "720p", "ratio": "16:9", "duration": 5 }' # 2. Poll every 10-15 s until data.status is SUCCESS or FAILURE. curl https://tokenra.io/v1/video/generations/TASK_ID \ -H "Authorization: Bearer $TOKENRA_API_KEY" ``` #### Generation modes ##### A. Text to video Output settings sit at the top level of the request. Tested on 2026-10-23: the video came back 720x1280, 4.08 seconds long and without an audio track. **POST /v1/video/generations** ```json { "model": "artsdance-2-5-pro-260801", "prompt": "A paper boat drifting down a rainy neon street at night, cinematic close-up", "resolution": "720p", "ratio": "9:16", "duration": 4, "generate_audio": false } ``` ##### B. Reference images Image URLs in `images` are sent to the model as reference images. Tested on 2026-10-23: a 1280x720, 5-second video with audio, the defaults when `ratio`, `duration` and `generate_audio` are left out. **POST /v1/video/generations** ```json { "model": "artsdance-2-5-pro-260801", "prompt": "The logo card slowly zooms in while a soft light sweeps across it", "images": ["https://example.com/logo-card.png"], "resolution": "720p" } ``` ##### C. content array To control each item, send `content` instead of `prompt` and `images`: 1 to 16 items of type `text` or `image_url`, with at least one `text` item. `role` is passed to the model as given. Mode B is converted into this same request. **POST /v1/video/generations** ```json { "model": "artsdance-2-5-pro-260801", "resolution": "720p", "content": [ {"type": "text", "text": "The character from image 1 walks into the room from image 2"}, { "type": "image_url", "image_url": {"url": "https://example.com/character.png"}, "role": "reference_image" }, { "type": "image_url", "image_url": {"url": "https://example.com/room.png"}, "role": "reference_image" } ] } ``` #### Request parameters **Output settings go at the top level** Seedance 2.5 reads `resolution`, `ratio`, `duration` and `generate_audio` from the top level of the request. This is the opposite of [Seedance 2.0](https://tokenra.io/docs/seedance-2-0-pro.html), which reads them from `metadata`. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | `artsdance-2-5-pro-260801` | | `prompt` | string | Yes | Describe the scene, the motion and the camera. Optional when `content` contains a `text` item. | | `resolution` | string | Yes | `720p` or `1080p`. Required; `480p` and a missing value are rejected. Also decides the price. | | `ratio` | string | No | Aspect ratio such as `16:9` or `9:16`; `9:16` was tested. | | `duration` | integer | No | Length in seconds. Default 5; `4` was tested. | | `generate_audio` | boolean | No | Generate a soundtrack. On by default; `false` produced a silent video. | | `images` | string[] | No | Reference image URLs, see mode B. | | `content` | array | No | Text and image items, see mode C. Replaces `prompt` and `images`. | **Not supported on TokenRa** - `metadata` is ignored. A request that put `resolution` only in `metadata` was rejected with `invalid_resolution`. - Video and audio references are not available: `video_url` and `audio_url` items fail with `unsupported content type`. - Only the fields in the table are sent to the model. Others, such as `seed`, `watermark`, `return_last_frame` or `callback_url`, are dropped without an error. #### Response format ##### Create response **200 OK** ```json { "id": "task_FUhA4FK80TV1p70mpHlyZXCxeHR0dPPa", "task_id": "task_FUhA4FK80TV1p70mpHlyZXCxeHR0dPPa", "object": "video", "model": "artsdance-2-5-pro-260801", "status": "queued", "progress": 0, "created_at": 1792766873 } ``` ##### Query response **200 OK** ```json { "code": "success", "message": "", "data": { "task_id": "task_FUhA4FK80TV1p70mpHlyZXCxeHR0dPPa", "action": "generate", "status": "SUCCESS", "fail_reason": "", "result_url": "https://example.com/output.mp4", "submit_time": 1792766873, "start_time": 1792766890, "finish_time": 1792767085, "progress": "100%", "data": { "id": "cgt-20261023154938-amaq7", "object": "video.generation", "status": "completed", "data": [{"url": "https://example.com/output.mp4"}], "usage": {"total_tokens": 104140, "completion_tokens": 104140} } } } ``` `data.data` holds the raw upstream task. Unlike Seedance 2.0 it does not repeat the resolution, ratio or duration; `usage.total_tokens` is the billed video token count. | data.status | Meaning | | --- | --- | | `NOT_START` / `SUBMITTED` / `QUEUED` | Accepted, waiting to start. | | `IN_PROGRESS` | Generating. | | `SUCCESS` | Done. Download `result_url`. | | `FAILURE` | Failed. The reason is in `fail_reason`; the pre-charged amount is refunded. | #### Errors & limits ##### Errors from this model | HTTP | code | Message | Cause | | --- | --- | --- | --- | | `400` | `invalid_resolution` | `resolution must be 720p or 1080p` | `resolution` missing, `480p`, or only inside `metadata`. | | `400` | `invalid_request` | `prompt is required` | No `prompt` and no `text` item in `content`. | | `500` | `build_request_failed` | `unsupported content type: video_url` | A `content` item other than `text` or `image_url`. | ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Poll every 10-15 seconds. Test tasks (4-5 s, 720p) finished in about 5 minutes. - `result_url` is a temporary link. Download and store the video yourself. - The price depends on `resolution` (720p or 1080p). See the live rate in the Model Square. #### More - [Seedance 2.5 Pro API docs page](https://tokenra.io/docs/artsdance-2-5-pro-260801.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [Seedance 2.5 Pro overview and pricing page](https://tokenra.io/models/seedance-2-5-api.html) - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/artsdance-2-5-pro-260801/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/artsdance-2-5-pro-260801/llms.txt ### GPT Image 2.5 Flare API on TokenRa Model ID: `gpt-image-2.5-flare` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > GPT Image 2.5 Flare generates and edits images through the OpenAI-compatible image endpoints. A request returns finished images in about 30 seconds, base64-encoded by default. - Provider: OpenAI - Type: Image model - Input: Text, image (edits) - Output: PNG image - Billing: Per request #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `gpt-image-2.5-flare`: $0.02 per request #### Capabilities & endpoints Both endpoints are OpenAI-compatible, so the OpenAI SDKs work with `base_url=https://tokenra.io/v1`. Both were called successfully on 2026-10-23. - `POST https://tokenra.io/v1/images/generations`: Text to image. JSON body. Returns finished images in the response. - `POST https://tokenra.io/v1/images/edits`: Image to image and editing. `multipart/form-data` with the source image in `image`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/images/generations \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-image-2.5-flare", "prompt": "A watercolor fox reading a book under a desk lamp", "size": "1024x1536", "quality": "low", "response_format": "url" }' ``` #### Request parameters ##### Generate: POST /v1/images/generations | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | Model ID: `gpt-image-2.5-flare`. | | `prompt` | string | Yes | What to draw. | | `size` | string | No | `auto` (default) or a size such as `1024x1536`. With `auto` the test returned a 1254x1254 image. | | `quality` | string | No | `auto` (default), `low`, `medium` or `high`. | | `n` | integer | No | Number of images, default 1. `n: 2` was tested. | | `response_format` | string | No | `b64_json` (default) returns base64 data; `url` returns a temporary link. | ##### Edit: POST /v1/images/edits | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | Model ID: `gpt-image-2.5-flare`. | | `prompt` | string | Yes | How to change the image. | | `image` | file | Yes | Source image (PNG tested). | | `response_format` | string | No | `b64_json` (default) or `url`, as for generation. | #### Response format **Example response (base64 shortened)** ```json { "created": 1792766203, "data": [ {"b64_json": "iVBORw0KGgoAAAANSUhEUgAABOYAAATm..."} ], "background": "auto", "output_format": "png", "quality": "auto", "size": "auto", "usage": { "input_tokens": 180, "input_tokens_details": {"image_tokens": 0, "text_tokens": 180}, "output_tokens": 1056, "total_tokens": 1236 } } ``` | Field | Type | Description | | --- | --- | --- | | `created` | integer | Unix timestamp. | | `data[].b64_json` | string | Base64 PNG (default). Decode and save it. | | `data[].url` | string | Temporary link when `response_format` is `url`. Download it promptly. | | `size / quality / output_format` | string | Settings that were applied. | | `usage` | object | Token usage reported by the model. | #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Each request took about 30 seconds in testing. Set the client timeout to at least 120 seconds. - A base64 PNG is roughly 1-3 MB of JSON. Use `response_format: "url"` if you only need a link. - Billing is per request, not per token. See the live rate in the Model Square. #### More - [GPT Image 2.5 Flare API docs page](https://tokenra.io/docs/gpt-image-2.5-flare.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [GPT Image 2.5 Flare overview and pricing page](https://tokenra.io/models/gpt-image-2-5.html) - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/gpt-image-2.5-flare/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/gpt-image-2.5-flare/llms.txt ### GPT Image 2.5 Sunburst API on TokenRa Model ID: `gpt-image-2.5-sunburst` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > GPT Image 2.5 Sunburst is a second GPT Image 2.5 model on TokenRa. It uses the same OpenAI-compatible endpoints and parameters as GPT Image 2.5 Flare and returned finished images in about 30 seconds in testing. - Provider: OpenAI - Type: Image model - Input: Text, image (edits) - Output: PNG image - Billing: Per request #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `gpt-image-2.5-sunburst`: $0.02 per request #### Capabilities & endpoints Both endpoints are OpenAI-compatible, so the OpenAI SDKs work with `base_url=https://tokenra.io/v1`. Both were called successfully on 2026-10-23. - `POST https://tokenra.io/v1/images/generations`: Text to image. JSON body. Returns finished images in the response. - `POST https://tokenra.io/v1/images/edits`: Image to image and editing. `multipart/form-data` with the source image in `image`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/images/generations \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-image-2.5-sunburst", "prompt": "A watercolor fox reading a book under a desk lamp", "size": "1024x1536", "quality": "low", "response_format": "url" }' ``` #### Request parameters ##### Generate: POST /v1/images/generations | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | Model ID: `gpt-image-2.5-sunburst`. | | `prompt` | string | Yes | What to draw. | | `size` | string | No | `auto` (default) or a size such as `1024x1536`. With `auto` the test returned a 1254x1254 image. | | `quality` | string | No | `auto` (default), `low`, `medium` or `high`. | | `n` | integer | No | Number of images, default 1. `n: 2` was tested. | | `response_format` | string | No | `b64_json` (default) returns base64 data; `url` returns a temporary link. | ##### Edit: POST /v1/images/edits | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | Model ID: `gpt-image-2.5-sunburst`. | | `prompt` | string | Yes | How to change the image. | | `image` | file | Yes | Source image (PNG tested). | | `response_format` | string | No | `b64_json` (default) or `url`, as for generation. | #### Response format **Example response (base64 shortened)** ```json { "created": 1792766203, "data": [ {"b64_json": "iVBORw0KGgoAAAANSUhEUgAABOYAAATm..."} ], "background": "auto", "output_format": "png", "quality": "auto", "size": "auto", "usage": { "input_tokens": 180, "input_tokens_details": {"image_tokens": 0, "text_tokens": 180}, "output_tokens": 1056, "total_tokens": 1236 } } ``` | Field | Type | Description | | --- | --- | --- | | `created` | integer | Unix timestamp. | | `data[].b64_json` | string | Base64 PNG (default). Decode and save it. | | `data[].url` | string | Temporary link when `response_format` is `url`. Download it promptly. | | `size / quality / output_format` | string | Settings that were applied. | | `usage` | object | Token usage reported by the model. | #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Each request took about 30 seconds in testing. Set the client timeout to at least 120 seconds. - A base64 PNG is roughly 1-3 MB of JSON. Use `response_format: "url"` if you only need a link. - Billing is per request, not per token. See the live rate in the Model Square. #### More - [GPT Image 2.5 Sunburst API docs page](https://tokenra.io/docs/gpt-image-2.5-sunburst.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [GPT Image 2.5 Sunburst overview and pricing page](https://tokenra.io/models/gpt-image-2-5.html) - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/gpt-image-2.5-sunburst/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/gpt-image-2.5-sunburst/llms.txt ### MiniMax M3.1 Flash API on TokenRa Model ID: `minimax-m3.1-flash` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > MiniMax M3.1 Flash is MiniMax's multimodal reasoning model for agents, coding and tool use, with a 1M-token context window. On TokenRa you can call it in three API formats with the same key. - Provider: MiniMax - Type: Text model - Context: 1M tokens - Input: Text, image, video - Output: Text with reasoning #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `minimax-m3.1-flash`: free on TokenRa until 2026-10-31, a limited-time offer ($0 for input, output and cached tokens) #### Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "minimax-m3.1-flash", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `minimax-m3.1-flash`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. `content` can be a string or an array of `text` and `image_url` parts. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Upper limit for generated tokens. Reasoning tokens count toward it: if it is too low the model can spend it all on reasoning and return no text (`finish_reason: "length"`). | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `response_format` | object | No | `{"type": "json_object"}` asks for a JSON object. | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `parallel_tool_calls` | boolean | No | Allow several tool calls in one response. | | `reasoning_effort` | string | No | Reasoning depth such as `low`, `medium` or `high`. The model accepted it in testing; how much it changes the reasoning varies by model. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | **Not supported by this model** - `max_completion_tokens` is ignored by this model. Use `max_tokens` to cap the output. - `response_format` with `json_schema` is not enforced: plain text came back. Use `json_object` and describe the fields in the prompt. ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "minimax-m3.1-flash", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging.", "reasoning_content": "The user wants two sentences about API gateways..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 21 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.reasoning_content` | string | The model's reasoning, returned separately from the answer. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input was tested with an `image_url` part that points to a public HTTPS image. - Reasoning is returned in `reasoning_content`, separate from the answer in `content`. Keep it out of what you show users unless you want to display it. - MiniMax also lists video input; image input was tested on TokenRa, so test video requests on your account before relying on them. - A short request reports about 200 `prompt_tokens` because the upstream adds its own system prompt; most of them are counted as cached tokens. #### More - [MiniMax M3.1 Flash API docs page](https://tokenra.io/docs/minimax-m3.1-flash.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [MiniMax M3.1 Flash overview and pricing page](https://tokenra.io/models/minimax-m3.1-flash-api.html) - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/minimax-m3.1-flash/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/minimax-m3.1-flash/llms.txt ### MiniMax M3 API on TokenRa Model ID: `minimax-m3` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > MiniMax M3 is MiniMax's open-weight model for coding and agent work, with a 1M-token context window and native multimodal input, according to MiniMax. By default it writes its reasoning into the answer inside `` tags; `reasoning_split` returns it separately. - Provider: MiniMax - Type: Text model - Context: 1M tokens - Input: Text, image - Output: Text with reasoning #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `minimax-m3`: $0.38 per 1M input tokens, $1.50 per 1M output tokens #### Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "minimax-m3", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `minimax-m3`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. `content` can be a string or an array of `text` and `image_url` parts. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Upper limit for generated tokens. Reasoning tokens count toward it: if it is too low the model can spend it all on reasoning and return no text (`finish_reason: "length"`). | | `max_completion_tokens` | integer | No | Upper limit for all generated tokens, reasoning included. If it is too low the answer can be empty (`finish_reason: "length"`). | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `response_format` | object | No | `{"type": "json_object"}` asks for a JSON object. | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `parallel_tool_calls` | boolean | No | Allow several tool calls in one response. | | `reasoning_effort` | string | No | Reasoning depth such as `low`, `medium` or `high`. The model accepted it in testing; how much it changes the reasoning varies by model. | | `reasoning_split` | boolean | No | `true` moves the reasoning out of `content` into `reasoning_content` (plus `reasoning_details`). Without it the reasoning is inside `content`, wrapped in `` tags. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | **Not supported by this model** - `response_format` with `json_schema` is not enforced: the answer came back as text, with the reasoning in `` tags. Use `json_object` and describe the fields in the prompt. ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "minimax-m3", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "The user wants two sentences about API gateways...\n\nAn API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 21 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input was tested with an `image_url` part that points to a public HTTPS image. - By default the reasoning comes inside `content`, wrapped in `...`. Send `reasoning_split: true` to receive it in `reasoning_content`, or strip the tags before showing the answer. - A short request reports about 200 `prompt_tokens` because the upstream adds its own system prompt; most of them are counted as cached tokens. #### More - [MiniMax M3 API docs page](https://tokenra.io/docs/minimax-m3.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/minimax-m3/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/minimax-m3/llms.txt ### Space Bunny Alpha API on TokenRa Model ID: `space-bunny-alpha` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > Space Bunny Alpha is the anonymous early version of MiniMax M3.1 Flash; MiniMax confirmed this on October 19, 2026. The ID still works on TokenRa and behaved like MiniMax M3.1 Flash in every test. Use `minimax-m3.1-flash` for new integrations. - Provider: MiniMax - Type: Text model - Context: 1M tokens - Input: Text, image - Output: Text with reasoning #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `space-bunny-alpha`: free on TokenRa until 2026-10-31, a limited-time offer ($0 for input, output and cached tokens) #### Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "space-bunny-alpha", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `space-bunny-alpha`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. `content` can be a string or an array of `text` and `image_url` parts. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Upper limit for generated tokens. Reasoning tokens count toward it: if it is too low the model can spend it all on reasoning and return no text (`finish_reason: "length"`). | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `response_format` | object | No | `{"type": "json_object"}` asks for a JSON object. | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `parallel_tool_calls` | boolean | No | Allow several tool calls in one response. | | `reasoning_effort` | string | No | Reasoning depth such as `low`, `medium` or `high`. The model accepted it in testing; how much it changes the reasoning varies by model. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | **Not supported by this model** - `max_completion_tokens` is ignored by this model. Use `max_tokens` to cap the output. - `response_format` with `json_schema` is not enforced: plain text came back. Use `json_object` and describe the fields in the prompt. ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "space-bunny-alpha", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging.", "reasoning_content": "The user wants two sentences about API gateways..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 21 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.reasoning_content` | string | The model's reasoning, returned separately from the answer. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input was tested with an `image_url` part that points to a public HTTPS image. - Reasoning is returned in `reasoning_content`, separate from the answer in `content`. Keep it out of what you show users unless you want to display it. - A short request reports about 200 `prompt_tokens` because the upstream adds its own system prompt; most of them are counted as cached tokens. #### More - [Space Bunny Alpha API docs page](https://tokenra.io/docs/space-bunny-alpha.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [Space Bunny Alpha overview and pricing page](https://tokenra.io/models/space-bunny-alpha-api.html) - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/space-bunny-alpha/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/space-bunny-alpha/llms.txt ### Qwen3.8 Max API on TokenRa Model ID: `qwen3.8-max` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > Qwen3.8 Max is the flagship of Alibaba's Qwen3.8 series, which Alibaba describes as a 2.4-trillion-parameter MoE model with a 1M-token context window and up to 64K output tokens. It thinks by default and returns the reasoning in `reasoning_content`; `enable_thinking: false` turns that off. - Provider: Alibaba Qwen - Type: Text model - Context: 1M tokens - Input: Text, image - Output: Text with reasoning #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `qwen3.8-max`: $1.61 per 1M input tokens, $4.84 per 1M output tokens #### Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "qwen3.8-max", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `qwen3.8-max`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. `content` can be a string or an array of `text` and `image_url` parts. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Caps the answer text only. Reasoning is not limited by it: in testing `max_tokens: 16` still produced about 2,000 reasoning tokens, which are billed as output. | | `max_completion_tokens` | integer | No | Upper limit for all generated tokens, reasoning included. If it is too low the answer can be empty (`finish_reason: "length"`). | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `response_format` | object | No | `{"type": "json_object"}` returns a JSON object. `{"type": "json_schema", "json_schema": {...}}` returns JSON that matches your schema (tested with `strict: true`). | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `parallel_tool_calls` | boolean | No | Allow several tool calls in one response. | | `reasoning_effort` | string | No | Reasoning depth such as `low`, `medium` or `high`. The model accepted it in testing; how much it changes the reasoning varies by model. | | `enable_thinking` | boolean | No | Thinking is on by default. `false` skips it: in testing the answer then used 4 completion tokens instead of about 70. | | `top_k` | integer | No | Qwen sampling parameter: sample only from the k most likely tokens. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | **Not supported by this model** - `thinking_budget` is accepted but did not limit the reasoning in testing: a budget of 64 still produced about 1,500 reasoning tokens. Use `enable_thinking: false` or `max_completion_tokens` instead. ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "qwen3.8-max", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging.", "reasoning_content": "The user wants two sentences about API gateways..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 21 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.reasoning_content` | string | The model's reasoning, returned separately from the answer. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input was tested with an `image_url` part that points to a public HTTPS image. - Reasoning is returned in `reasoning_content`, separate from the answer in `content`. Keep it out of what you show users unless you want to display it. #### More - [Qwen3.8 Max API docs page](https://tokenra.io/docs/qwen3.8-max.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/qwen3.8-max/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/qwen3.8-max/llms.txt ### Qwen3.8 Flash API on TokenRa Model ID: `qwen3.8-flash` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > Qwen3.8 Flash is the fast, lower-cost model of Alibaba's Qwen3.8 series, with native multimodal input and a 1M-token context window, according to Alibaba. Like Qwen3.8 Max it thinks by default; `enable_thinking: false` turns that off. - Provider: Alibaba Qwen - Type: Text model - Context: 1M tokens - Input: Text, image - Output: Text with reasoning #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `qwen3.8-flash`: $0.08 per 1M input tokens, $0.235 per 1M output tokens, $0.01 per 1M cached input tokens #### Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "qwen3.8-flash", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `qwen3.8-flash`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. `content` can be a string or an array of `text` and `image_url` parts. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Caps the answer text only. Reasoning is not limited by it: in testing `max_tokens: 16` still produced about 2,000 reasoning tokens, which are billed as output. | | `max_completion_tokens` | integer | No | Upper limit for all generated tokens, reasoning included. If it is too low the answer can be empty (`finish_reason: "length"`). | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `response_format` | object | No | `{"type": "json_object"}` returns a JSON object. `{"type": "json_schema", "json_schema": {...}}` returns JSON that matches your schema (tested with `strict: true`). | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `parallel_tool_calls` | boolean | No | Allow several tool calls in one response. | | `reasoning_effort` | string | No | Reasoning depth such as `low`, `medium` or `high`. The model accepted it in testing; how much it changes the reasoning varies by model. | | `enable_thinking` | boolean | No | Thinking is on by default. `false` skips it: in testing the answer then used 4 completion tokens instead of about 70. | | `top_k` | integer | No | Qwen sampling parameter: sample only from the k most likely tokens. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | **Not supported by this model** - `thinking_budget` is accepted but did not limit the reasoning in testing: a budget of 64 still produced about 5,600 reasoning tokens. Use `enable_thinking: false` or `max_completion_tokens` instead. ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "qwen3.8-flash", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging.", "reasoning_content": "The user wants two sentences about API gateways..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 21 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.reasoning_content` | string | The model's reasoning, returned separately from the answer. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input was tested with an `image_url` part that points to a public HTTPS image. - Reasoning is returned in `reasoning_content`, separate from the answer in `content`. Keep it out of what you show users unless you want to display it. #### More - [Qwen3.8 Flash API docs page](https://tokenra.io/docs/qwen3.8-flash.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/qwen3.8-flash/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/qwen3.8-flash/llms.txt ### Qwen3.8 Omni Flash API on TokenRa Model ID: `qwen3.8-omni-flash` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > Qwen3.8 Omni Flash is Qwen's natively omni-modal model. Alibaba lists text, image, audio and video input and a 1M-token context window; image input was tested on TokenRa. It thinks by default, and `enable_thinking: false` turns that off. - Provider: Alibaba Qwen - Type: Text model - Context: 1M tokens - Input: Text, image - Output: Text with reasoning #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `qwen3.8-omni-flash`: $0.23 per 1M input tokens, $0.76 per 1M output tokens, $0.03 per 1M cached input tokens #### Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "qwen3.8-omni-flash", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `qwen3.8-omni-flash`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. `content` can be a string or an array of `text` and `image_url` parts. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Caps the answer text only. Reasoning is not limited by it: in testing `max_tokens: 16` still produced about 2,000 reasoning tokens, which are billed as output. | | `max_completion_tokens` | integer | No | Behaves like `max_tokens` on this model: it caps the answer, not the reasoning. | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `response_format` | object | No | `{"type": "json_object"}` asks for a JSON object. | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `parallel_tool_calls` | boolean | No | Allow several tool calls in one response. | | `reasoning_effort` | string | No | Reasoning depth such as `low`, `medium` or `high`. The model accepted it in testing; how much it changes the reasoning varies by model. | | `enable_thinking` | boolean | No | Thinking is on by default. `false` skips it: in testing the answer then used 4 completion tokens instead of about 70. | | `top_k` | integer | No | Qwen sampling parameter: sample only from the k most likely tokens. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | **Not supported by this model** - `response_format` with `json_schema` is not enforced: an array that contains the object came back instead of the object. Use `json_object` and describe the fields in the prompt. - Neither `max_tokens` nor `max_completion_tokens` limits the reasoning on this model. For short, cheap answers send `enable_thinking: false`. - `thinking_budget` is accepted but did not limit the reasoning in testing: a budget of 64 still produced about 2,300 reasoning tokens. Use `enable_thinking: false` or `max_completion_tokens` instead. ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "qwen3.8-omni-flash", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging.", "reasoning_content": "The user wants two sentences about API gateways..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 21 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.reasoning_content` | string | The model's reasoning, returned separately from the answer. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input was tested with an `image_url` part that points to a public HTTPS image. - Reasoning is returned in `reasoning_content`, separate from the answer in `content`. Keep it out of what you show users unless you want to display it. #### More - [Qwen3.8 Omni Flash API docs page](https://tokenra.io/docs/qwen3.8-omni-flash.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [Qwen3.8 Omni Flash overview and pricing page](https://tokenra.io/models/qwen-3.8-omni-flash.html) - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/qwen3.8-omni-flash/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/qwen3.8-omni-flash/llms.txt ### GLM-5.3 API on TokenRa Model ID: `glm-5.3` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > GLM-5.3 is Z.ai's flagship text model. Z.ai lists a 1M-token context window and up to 128K output tokens, and says it is text-only: image input is rejected. Thinking is always on and `reasoning_effort` sets its depth. - Provider: Zhipu AI - Type: Text model - Context: 1M tokens - Input: Text - Output: Text with reasoning #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `glm-5.3`: $1.02 per 1M input tokens, $3.56 per 1M output tokens, $0.26 per 1M cached input tokens #### Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "glm-5.3", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `glm-5.3`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. This model takes text only, so `content` should be a string. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Upper limit for generated tokens. Reasoning tokens count toward it: if it is too low the model can spend it all on reasoning and return no text (`finish_reason: "length"`). | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `response_format` | object | No | `{"type": "json_object"}` returns a JSON object. `{"type": "json_schema", "json_schema": {...}}` returns JSON that matches your schema (tested with `strict: true`). | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `parallel_tool_calls` | boolean | No | Allow several tool calls in one response. | | `reasoning_effort` | string | No | Thinking depth: `low`, `high` or `max`. The vendor default is `max`. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | **Not supported by this model** - `max_completion_tokens` is ignored by this model. Use `max_tokens` to cap the output. - Thinking cannot be turned off: `thinking: {"type": "disabled"}` is rejected with `The value of the enable_thinking parameter is restricted to True`. Use `reasoning_effort: "low"` to make the reasoning short. ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "glm-5.3", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging.", "reasoning_content": "The user wants two sentences about API gateways..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 21 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.reasoning_content` | string | The model's reasoning, returned separately from the answer. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input is not supported: in testing the model replied that it could not see the image. Send text only. - Reasoning is returned in `reasoning_content`, separate from the answer in `content`. Keep it out of what you show users unless you want to display it. - In testing, `reasoning_effort` `low` or `high` answered a short question with 0-3 reasoning tokens; the default `max` used about 100. #### More - [GLM-5.3 API docs page](https://tokenra.io/docs/glm-5.3.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/glm-5.3/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/glm-5.3/llms.txt ### GLM-5.3 Flash API on TokenRa Model ID: `glm-5.3-flash` Other model IDs: `glm‑5.3‑flash‑discounted` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > GLM-5.3 Flash is Z.ai's first natively multimodal GLM-5 model. Z.ai lists 320B total and 18B active parameters, a 1M-token context window and up to 128K output tokens. Thinking is always on and `reasoning_effort` sets its depth. It previewed under the code name Ox Alpha. - Provider: Zhipu AI - Type: Text model - Context: 1M tokens - Input: Text, image - Output: Text with reasoning #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `glm-5.3-flash`: $0.14 per 1M input tokens, $0.52 per 1M output tokens, $0.04 per 1M cached input tokens - `glm‑5.3‑flash‑discounted`: $0.05 per 1M input tokens, $0.194 per 1M output tokens, $0.01 per 1M cached input tokens #### Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. ##### Model IDs | Model ID | Notes | | --- | --- | | `glm-5.3-flash` | Main ID. Everything on this page was tested with it. | | `glm‑5.3‑flash‑discounted` | Same model at a discounted rate; it behaved the same in every test. The ID is written with non-breaking hyphens (U+2011), so copy it from this page: typing ordinary hyphens returns `model_not_found`. | #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "glm-5.3-flash", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `glm-5.3-flash`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. `content` can be a string or an array of `text` and `image_url` parts. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Upper limit for generated tokens. Reasoning tokens count toward it: if it is too low the model can spend it all on reasoning and return no text (`finish_reason: "length"`). | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `response_format` | object | No | `{"type": "json_object"}` returns a JSON object. `{"type": "json_schema", "json_schema": {...}}` returns JSON that matches your schema (tested with `strict: true`). | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `parallel_tool_calls` | boolean | No | Allow several tool calls in one response. | | `reasoning_effort` | string | No | Thinking depth: `low`, `high` or `max`. The vendor default is `max`. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | **Not supported by this model** - `max_completion_tokens` is ignored by this model. Use `max_tokens` to cap the output. ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "glm-5.3-flash", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging.", "reasoning_content": "The user wants two sentences about API gateways..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 21 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.reasoning_content` | string | The model's reasoning, returned separately from the answer. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input was tested with an `image_url` part that points to a public HTTPS image. - Reasoning is returned in `reasoning_content`, separate from the answer in `content`. Keep it out of what you show users unless you want to display it. - In testing, `reasoning_effort` `low` or `high` answered a short question with 0-3 reasoning tokens; the default `max` used about 100. #### More - [GLM-5.3 Flash API docs page](https://tokenra.io/docs/glm-5.3-flash.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [GLM-5.3 Flash overview and pricing page](https://tokenra.io/models/glm-5-3-flash.html) - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/glm-5.3-flash/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/glm-5.3-flash/llms.txt ### GLM-5.3 FlashX API on TokenRa Model ID: `glm-5.3-flashx` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > GLM-5.3 FlashX is the high-speed version of GLM-5.3 Flash, launched by Z.ai on September 18, 2026. Z.ai quotes up to 200 output tokens per second with the same capabilities as GLM-5.3 Flash. Thinking is always on and `reasoning_effort` sets its depth. - Provider: Zhipu AI - Type: Text model - API formats: Chat Completions, Responses, Messages - Input: Text, image - Output: Text with reasoning #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `glm-5.3-flashx`: $0.49 per 1M input tokens, $1.63 per 1M output tokens, $0.10 per 1M cached input tokens #### Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "glm-5.3-flashx", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `glm-5.3-flashx`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. `content` can be a string or an array of `text` and `image_url` parts. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Upper limit for generated tokens. Reasoning tokens count toward it: if it is too low the model can spend it all on reasoning and return no text (`finish_reason: "length"`). | | `max_completion_tokens` | integer | No | Upper limit for all generated tokens, reasoning included. If it is too low the answer can be empty (`finish_reason: "length"`). | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `response_format` | object | No | `{"type": "json_object"}` returns a JSON object. `{"type": "json_schema", "json_schema": {...}}` returns JSON that matches your schema (tested with `strict: true`). | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `parallel_tool_calls` | boolean | No | Allow several tool calls in one response. | | `reasoning_effort` | string | No | Thinking depth: `low`, `high` or `max`. The vendor default is `max`. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "glm-5.3-flashx", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging.", "reasoning_content": "The user wants two sentences about API gateways..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 21 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.reasoning_content` | string | The model's reasoning, returned separately from the answer. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input was tested with an `image_url` part that points to a public HTTPS image. - Reasoning is returned in `reasoning_content`, separate from the answer in `content`. Keep it out of what you show users unless you want to display it. - In testing, `reasoning_effort` `low` or `high` answered a short question with 0-3 reasoning tokens; the default `max` used about 100. #### More - [GLM-5.3 FlashX API docs page](https://tokenra.io/docs/glm-5.3-flashx.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [GLM-5.3 FlashX overview and pricing page](https://tokenra.io/models/glm-5-3-flashx.html) - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/glm-5.3-flashx/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/glm-5.3-flashx/llms.txt ### Kimi K3 API on TokenRa Model ID: `kimi-k3` Other model IDs: `kimi-k3-50off` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > Kimi K3 is Moonshot AI's open-weight multimodal reasoning model, released on July 16, 2026, with a 1M-token context window, according to Moonshot. Thinking is always on and `reasoning_effort` sets its depth. - Provider: Moonshot AI - Type: Text model - Context: 1M tokens - Input: Text, image - Output: Text with reasoning #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `kimi-k3`: $2.54 per 1M input tokens, $12.69 per 1M output tokens - `kimi-k3-50off`: $1.4925 per 1M input tokens, $7.4627 per 1M output tokens, $0.1493 per 1M cached input tokens #### Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. ##### Model IDs | Model ID | Notes | | --- | --- | | `kimi-k3` | Main ID. Everything on this page was tested with it. | | `kimi-k3-50off` | Discounted ID on a separate channel. Differences measured: `top_p` other than 0.95 or a non-zero penalty returns HTTP 400, `max_tokens` and `max_completion_tokens` are ignored, and `usage` has no reasoning or cached token details. | #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "kimi-k3", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `kimi-k3`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. `content` can be a string or an array of `text` and `image_url` parts. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Upper limit for generated tokens. Reasoning tokens count toward it: if it is too low the model can spend it all on reasoning and return no text (`finish_reason: "length"`). | | `max_completion_tokens` | integer | No | Upper limit for all generated tokens, reasoning included. If it is too low the answer can be empty (`finish_reason: "length"`). | | `temperature` | number | No | Sampling temperature. | | `response_format` | object | No | `{"type": "json_object"}` returns a JSON object. `{"type": "json_schema", "json_schema": {...}}` returns JSON that matches your schema (tested with `strict: true`). | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `parallel_tool_calls` | boolean | No | Allow several tool calls in one response. | | `reasoning_effort` | string | No | Thinking depth: `low`, `high` or `max`. The vendor default is `max`. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | **Not supported by this model** - Moonshot fixes `top_p` at 0.95 and both penalties at 0, so leave them out. `kimi-k3` accepted other values in testing; `kimi-k3-50off` rejects them with HTTP 400, for example `top_p must be 0.95`. ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "kimi-k3", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging.", "reasoning_content": "The user wants two sentences about API gateways..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 21 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.reasoning_content` | string | The model's reasoning, returned separately from the answer. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input was tested with an `image_url` part that points to a public HTTPS image. - Reasoning is returned in `reasoning_content`, separate from the answer in `content`. Keep it out of what you show users unless you want to display it. - A few requests in testing took about two minutes before the first byte. Use a client timeout of at least 180 seconds, or stream. #### More - [Kimi K3 API docs page](https://tokenra.io/docs/kimi-k3.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [Kimi K3 overview and pricing page](https://tokenra.io/models/kimi-k3-api.html) - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/kimi-k3/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/kimi-k3/llms.txt ### Kimi K3.1 Pro API on TokenRa Model ID: `kimi-k3.1-pro` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > Kimi K3.1 Pro is the Pro build of Moonshot's K3 line. It reasons before every answer, accepts text and images, and works in all three API formats on TokenRa. The reasoning comes back in `reasoning`, not in `reasoning_content`. - Provider: Moonshot AI - Type: Text model - API formats: Chat Completions, Responses, Messages - Input: Text, image - Output: Text #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `kimi-k3.1-pro`: $1.60 per 1M input tokens, $8.00 per 1M output tokens, $0.16 per 1M cached input tokens #### Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "kimi-k3.1-pro", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `kimi-k3.1-pro`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. `content` can be a string or an array of `text` and `image_url` parts. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Upper limit for generated tokens. Reasoning tokens count toward it: if it is too low the model can spend it all on reasoning and return no text (`finish_reason: "length"`). | | `max_completion_tokens` | integer | No | Upper limit for all generated tokens, reasoning included. If it is too low the answer can be empty (`finish_reason: "length"`). | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `response_format` | object | No | `{"type": "json_object"}` returns a JSON object. `{"type": "json_schema", "json_schema": {...}}` returns JSON that matches your schema (tested with `strict: true`). | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `parallel_tool_calls` | boolean | No | Allow several tool calls in one response. | | `reasoning_effort` | string | No | Reasoning depth such as `low`, `medium` or `high`. The model accepted it in testing; how much it changes the reasoning varies by model. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | **Not supported by this model** - Thinking cannot be turned off. `thinking: {"type": "disabled"}` and `enable_thinking: false` were both accepted, and the reasoning tokens stayed at 66-71. ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "kimi-k3.1-pro", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging.", "reasoning": "The user wants two sentences about API gateways...", "reasoning_details": [ { "type": "reasoning.text", "text": "The user wants two sentences about API gateways...", "format": "unknown", "index": 0 } ] }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 21 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.reasoning` | string | Some models return the reasoning under `reasoning` instead of `reasoning_content`, and repeat the same text in `reasoning_details`. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input was tested with an `image_url` part that points to a public HTTPS image. - Reasoning is returned in `reasoning` (a string) with the same text in `reasoning_details`, and the answer in `content`. Read `reasoning`, not `reasoning_content`, which this model leaves empty. - Responses took 6.6-19.6 seconds in testing, the image question the longest. Use a client timeout of at least 120 seconds, or stream. - `reasoning_effort` `low`, `high` and `max` were all accepted, but the depth did not scale with the level on a short question (61, 4 and 132 reasoning tokens), so treat it as a hint rather than a hard control. - Unlike `kimi-k3`, this model accepted `top_p: 0.9` and non-zero penalties without an error. #### More - [Kimi K3.1 Pro API docs page](https://tokenra.io/docs/kimi-k3.1-pro.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [Kimi K3.1 Pro overview and pricing page](https://tokenra.io/models/kimi-k3-api.html) - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/kimi-k3.1-pro/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/kimi-k3.1-pro/llms.txt ### DeepSeek V4.1 Flash API on TokenRa Model ID: `deepseek-v4.1-flash` Other model IDs: `deepseek-v4.1-flash-50off` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > DeepSeek V4.1 Flash is DeepSeek's natively multimodal reasoning model for coding and agent work. Third-party platforms list it as a roughly 304B-parameter MoE with a context window of about 1.31M tokens. It thinks by default; `thinking: {"type": "disabled"}` turns that off. - Provider: DeepSeek - Type: Text model - Context: About 1.31M tokens - Input: Text, image - Output: Text with reasoning #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `deepseek-v4.1-flash`: $0.209 per 1M input tokens, $0.836 per 1M output tokens, $0.005 per 1M cached input tokens - `deepseek-v4.1-flash-50off`: $0.09 per 1M input tokens, $0.36 per 1M output tokens, $0.0018 per 1M cached input tokens #### Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. ##### Model IDs | Model ID | Notes | | --- | --- | | `deepseek-v4.1-flash` | Main ID. Everything on this page was tested with it. | | `deepseek-v4.1-flash-50off` | Discounted ID; it behaved the same as `deepseek-v4.1-flash` in every test. | #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "deepseek-v4.1-flash", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `deepseek-v4.1-flash`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. `content` can be a string or an array of `text` and `image_url` parts. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Upper limit for generated tokens. Reasoning tokens count toward it: if it is too low the model can spend it all on reasoning and return no text (`finish_reason: "length"`). | | `max_completion_tokens` | integer | No | Upper limit for all generated tokens, reasoning included. If it is too low the answer can be empty (`finish_reason: "length"`). | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `response_format` | object | No | `{"type": "json_object"}` returns a JSON object. `{"type": "json_schema", "json_schema": {...}}` returns JSON that matches your schema (tested with `strict: true`). | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `parallel_tool_calls` | boolean | No | Allow several tool calls in one response. | | `reasoning_effort` | string | No | Reasoning depth such as `low`, `medium` or `high`. The model accepted it in testing; how much it changes the reasoning varies by model. | | `thinking` | object | No | `{"type": "disabled"}` turns thinking off. In testing the answer then used 3 completion tokens and returned no `reasoning_content`. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "deepseek-v4.1-flash", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging.", "reasoning_content": "The user wants two sentences about API gateways..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 21 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.reasoning_content` | string | The model's reasoning, returned separately from the answer. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input was tested with an `image_url` part that points to a public HTTPS image. - Reasoning is returned in `reasoning_content`, separate from the answer in `content`. Keep it out of what you show users unless you want to display it. #### More - [DeepSeek V4.1 Flash API docs page](https://tokenra.io/docs/deepseek-v4.1-flash.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [DeepSeek V4.1 Flash overview and pricing page](https://tokenra.io/models/deepseek-v4.1-flash-api.html) - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/deepseek-v4.1-flash/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/deepseek-v4.1-flash/llms.txt ### DeepSeek V4.1 Flash 1017 API on TokenRa Model ID: `deepseek-v4.1-flash-1017` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > DeepSeek V4.1 Flash 1017 is the October 17 update of DeepSeek V4.1 Flash. DeepSeek reports higher benchmark scores with shorter outputs; the API, parameters and multimodal input are the same as V4.1 Flash. - Provider: DeepSeek - Type: Text model - API formats: Chat Completions, Responses, Messages - Input: Text, image - Output: Text with reasoning #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `deepseek-v4.1-flash-1017`: $0.209 per 1M input tokens, $0.836 per 1M output tokens, $0.005 per 1M cached input tokens #### Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "deepseek-v4.1-flash-1017", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `deepseek-v4.1-flash-1017`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. `content` can be a string or an array of `text` and `image_url` parts. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Upper limit for generated tokens. Reasoning tokens count toward it: if it is too low the model can spend it all on reasoning and return no text (`finish_reason: "length"`). | | `max_completion_tokens` | integer | No | Upper limit for all generated tokens, reasoning included. If it is too low the answer can be empty (`finish_reason: "length"`). | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `response_format` | object | No | `{"type": "json_object"}` returns a JSON object. `{"type": "json_schema", "json_schema": {...}}` returns JSON that matches your schema (tested with `strict: true`). | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `parallel_tool_calls` | boolean | No | Allow several tool calls in one response. | | `reasoning_effort` | string | No | Reasoning depth such as `low`, `medium` or `high`. The model accepted it in testing; how much it changes the reasoning varies by model. | | `thinking` | object | No | `{"type": "disabled"}` turns thinking off. In testing the answer then used 3 completion tokens and returned no `reasoning_content`. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "deepseek-v4.1-flash-1017", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging.", "reasoning_content": "The user wants two sentences about API gateways..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 21 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.reasoning_content` | string | The model's reasoning, returned separately from the answer. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input was tested with an `image_url` part that points to a public HTTPS image. - Reasoning is returned in `reasoning_content`, separate from the answer in `content`. Keep it out of what you show users unless you want to display it. - Leave room for the reasoning: with `max_tokens: 600` an image question came back with an empty answer, while 4,000 was enough. #### More - [DeepSeek V4.1 Flash 1017 API docs page](https://tokenra.io/docs/deepseek-v4.1-flash-1017.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [DeepSeek V4.1 Flash 1017 overview and pricing page](https://tokenra.io/models/deepseek-v4.1-flash-1017.html) - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/deepseek-v4.1-flash-1017/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/deepseek-v4.1-flash-1017/llms.txt ### DeepSeek V4 Flash API on TokenRa Model ID: `deepseek-v4-flash` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > DeepSeek V4 Flash is DeepSeek's fast general-purpose V4 model. On TokenRa it answers directly, without a reasoning step, and takes text input only. - Provider: DeepSeek - Type: Text model - API formats: Chat Completions, Responses, Messages - Input: Text - Output: Text #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `deepseek-v4-flash`: $0.22 per 1M input tokens, $0.57 per 1M output tokens, $0.22 per 1M cached input tokens #### Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "deepseek-v4-flash", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `deepseek-v4-flash`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. This model takes text only, so `content` should be a string. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Upper limit for generated tokens. | | `max_completion_tokens` | integer | No | Upper limit for all generated tokens, reasoning included. If it is too low the answer can be empty (`finish_reason: "length"`). | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `response_format` | object | No | `{"type": "json_object"}` returns a JSON object. `{"type": "json_schema", "json_schema": {...}}` returns JSON that matches your schema (tested with `strict: true`). | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `parallel_tool_calls` | boolean | No | Allow several tool calls in one response. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "deepseek-v4-flash", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input is not supported: in testing the model replied that it could not see the image. Send text only. - The model answers directly; responses contain no `reasoning_content`. #### More - [DeepSeek V4 Flash API docs page](https://tokenra.io/docs/deepseek-v4-flash.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/deepseek-v4-flash/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/deepseek-v4-flash/llms.txt ### DeepSeek V4 Flash 0731 Fast API on TokenRa Model ID: `deepseek-v4-flash-0731-fast` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > DeepSeek V4 Flash 0731 Fast serves the 0731 release of DeepSeek V4 Flash with thinking on. It returns its reasoning in `reasoning_content` and takes text input only. - Provider: DeepSeek - Type: Text model - API formats: Chat Completions, Responses, Messages - Input: Text - Output: Text with reasoning #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `deepseek-v4-flash-0731-fast`: $0.42 per 1M input tokens, $0.84 per 1M output tokens, $0.11 per 1M cached input tokens #### Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "deepseek-v4-flash-0731-fast", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `deepseek-v4-flash-0731-fast`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. This model takes text only, so `content` should be a string. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `response_format` | object | No | `{"type": "json_object"}` returns a JSON object. `{"type": "json_schema", "json_schema": {...}}` returns JSON that matches your schema (tested with `strict: true`). | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `parallel_tool_calls` | boolean | No | Allow several tool calls in one response. | | `reasoning_effort` | string | No | Reasoning depth such as `low`, `medium` or `high`. The model accepted it in testing; how much it changes the reasoning varies by model. | | `thinking` | object | No | `{"type": "disabled"}` turns thinking off. In testing the answer then used 3 completion tokens and returned no `reasoning_content`. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | **Not supported by this model** - Neither `max_tokens` nor `max_completion_tokens` limits the output: both were ignored in testing. Keep the task specific, or stop reading a stream once you have enough. ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "deepseek-v4-flash-0731-fast", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging.", "reasoning_content": "The user wants two sentences about API gateways..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 21 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.reasoning_content` | string | The model's reasoning, returned separately from the answer. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input is not supported: in testing the model replied that it could not see the image. Send text only. - Reasoning is returned in `reasoning_content`, separate from the answer in `content`. Keep it out of what you show users unless you want to display it. #### More - [DeepSeek V4 Flash 0731 Fast API docs page](https://tokenra.io/docs/deepseek-v4-flash-0731-fast.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/deepseek-v4-flash-0731-fast/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/deepseek-v4-flash-0731-fast/llms.txt ### DeepSeek V4 Flash Vision Exp API on TokenRa Model ID: `deepseek-v4-flash-vision-exp` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > DeepSeek V4 Flash Vision Exp is an experimental build of DeepSeek V4 Flash that accepts image input. It thinks before answering and returns the reasoning in `reasoning_content`. - Provider: DeepSeek - Type: Text model - API formats: Chat Completions, Responses, Messages - Input: Text, image - Output: Text with reasoning #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `deepseek-v4-flash-vision-exp`: $0.62 per 1M input tokens, $1.86 per 1M output tokens, $0.02 per 1M cached input tokens #### Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "deepseek-v4-flash-vision-exp", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `deepseek-v4-flash-vision-exp`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. `content` can be a string or an array of `text` and `image_url` parts. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Upper limit for generated tokens. Reasoning tokens count toward it: if it is too low the model can spend it all on reasoning and return no text (`finish_reason: "length"`). | | `max_completion_tokens` | integer | No | Upper limit for all generated tokens, reasoning included. If it is too low the answer can be empty (`finish_reason: "length"`). | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `response_format` | object | No | `{"type": "json_object"}` returns a JSON object. `{"type": "json_schema", "json_schema": {...}}` returns JSON that matches your schema (tested with `strict: true`). | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `parallel_tool_calls` | boolean | No | Allow several tool calls in one response. | | `reasoning_effort` | string | No | Reasoning depth such as `low`, `medium` or `high`. The model accepted it in testing; how much it changes the reasoning varies by model. | | `thinking` | object | No | `{"type": "disabled"}` turns thinking off. In testing the answer then used 3 completion tokens and returned no `reasoning_content`. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "deepseek-v4-flash-vision-exp", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging.", "reasoning_content": "The user wants two sentences about API gateways..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 21 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.reasoning_content` | string | The model's reasoning, returned separately from the answer. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input was tested with an `image_url` part that points to a public HTTPS image. - Reasoning is returned in `reasoning_content`, separate from the answer in `content`. Keep it out of what you show users unless you want to display it. - Leave room for the reasoning: with `max_tokens: 600` an image question came back with an empty answer, while 4,000 was enough. #### More - [DeepSeek V4 Flash Vision Exp API docs page](https://tokenra.io/docs/deepseek-v4-flash-vision-exp.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/deepseek-v4-flash-vision-exp/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/deepseek-v4-flash-vision-exp/llms.txt ### Gemini 3.8 Flash API on TokenRa Model ID: `gemini-3.8-flash` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > Gemini 3.8 Flash is Google's fast multimodal Gemini model. On TokenRa it answers through OpenAI Chat Completions and Anthropic Messages. It thinks before answering but does not return the reasoning text. - Provider: Google - Type: Text model - API formats: Chat Completions, Messages - Input: Text, image - Output: Text #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `gemini-3.8-flash`: $0.94 per 1M input tokens, $4.70 per 1M output tokens, $0.09 per 1M cached input tokens #### Capabilities & endpoints Chat generation through two API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. **Format not available** - OpenAI Responses (`/v1/responses`) is not available for this model: requests fail with HTTP 400 `contents is required`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gemini-3.8-flash", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `gemini-3.8-flash`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. `content` can be a string or an array of `text` and `image_url` parts. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Upper limit for generated tokens. Reasoning tokens count toward it: if it is too low the model can spend it all on reasoning and return no text (`finish_reason: "length"`). | | `max_completion_tokens` | integer | No | Upper limit for all generated tokens, reasoning included. If it is too low the answer can be empty (`finish_reason: "length"`). | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `reasoning_effort` | string | No | Reasoning depth such as `low`, `medium` or `high`. The model accepted it in testing; how much it changes the reasoning varies by model. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | **Not supported by this model** - Neither `json_object` nor `json_schema` is enforced: plain text, or JSON inside a Markdown code block, came back. Ask for JSON in the prompt and strip Markdown code fences before parsing. - Function calling is not available: requests with `tools` return HTTP 400 from the upstream. ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "gemini-3.8-flash", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging." }, "finish_reason": "STOP" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 21 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input was tested with an `image_url` part that points to a public HTTPS image. - The model reasons before answering but returns no reasoning text. `usage.completion_tokens_details.reasoning_tokens` shows how many reasoning tokens were used; they count toward `max_tokens` and are billed as output. - Some requests in testing failed with HTTP 504 (`bad_response_status_code`) and a few took about two minutes. Retry 504 responses and use a client timeout of at least 180 seconds. - `finish_reason` comes back in upper case (`STOP`) instead of `stop`. #### More - [Gemini 3.8 Flash API docs page](https://tokenra.io/docs/gemini-3.8-flash.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/gemini-3.8-flash/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/gemini-3.8-flash/llms.txt ### HY3 API on TokenRa Model ID: `hy3` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > HY3 is a Tencent Hunyuan reasoning model. On TokenRa it answers in all three API formats, returns its reasoning in `reasoning_content` and takes text input only. - Provider: Tencent Hunyuan - Type: Text model - API formats: Chat Completions, Responses, Messages - Input: Text - Output: Text with reasoning #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `hy3`: $0.14 per 1M input tokens, $0.57 per 1M output tokens, $0.04 per 1M cached input tokens #### Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "hy3", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `hy3`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. This model takes text only, so `content` should be a string. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Upper limit for generated tokens. Reasoning tokens count toward it: if it is too low the model can spend it all on reasoning and return no text (`finish_reason: "length"`). | | `max_completion_tokens` | integer | No | Upper limit for all generated tokens, reasoning included. If it is too low the answer can be empty (`finish_reason: "length"`). | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `response_format` | object | No | `{"type": "json_object"}` returns a JSON object. `{"type": "json_schema", "json_schema": {...}}` returns JSON that matches your schema (tested with `strict: true`). | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `parallel_tool_calls` | boolean | No | Allow several tool calls in one response. | | `reasoning_effort` | string | No | Reasoning depth such as `low`, `medium` or `high`. The model accepted it in testing; how much it changes the reasoning varies by model. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "hy3", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging.", "reasoning_content": "The user wants two sentences about API gateways..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 21 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.reasoning_content` | string | The model's reasoning, returned separately from the answer. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input is not supported: in testing the model replied that it could not see the image. Send text only. - Reasoning is returned in `reasoning_content`, separate from the answer in `content`. Keep it out of what you show users unless you want to display it. #### More - [HY3 API docs page](https://tokenra.io/docs/hy3.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/hy3/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/hy3/llms.txt ### HY4 Preview API on TokenRa Model ID: `hy4-preview` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > HY4 Preview is a preview of Tencent Hunyuan's next model. It reasons at length before answering, returns the reasoning in `reasoning_content` and takes text input only. - Provider: Tencent Hunyuan - Type: Text model - API formats: Chat Completions, Responses, Messages - Input: Text - Output: Text with reasoning #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `hy4-preview`: $1.02 per 1M input tokens, $3.04 per 1M output tokens, $0.05 per 1M cached input tokens #### Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "hy4-preview", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `hy4-preview`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. This model takes text only, so `content` should be a string. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Upper limit for generated tokens. Reasoning tokens count toward it: if it is too low the model can spend it all on reasoning and return no text (`finish_reason: "length"`). | | `max_completion_tokens` | integer | No | Upper limit for all generated tokens, reasoning included. If it is too low the answer can be empty (`finish_reason: "length"`). | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `response_format` | object | No | `{"type": "json_object"}` returns a JSON object. `{"type": "json_schema", "json_schema": {...}}` returns JSON that matches your schema (tested with `strict: true`). | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `reasoning_effort` | string | No | Reasoning depth such as `low`, `medium` or `high`. The model accepted it in testing; how much it changes the reasoning varies by model. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "hy4-preview", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging.", "reasoning_content": "The user wants two sentences about API gateways..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 21 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.reasoning_content` | string | The model's reasoning, returned separately from the answer. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input is not supported. In testing the model described an image it had not received, so do not send images. - Reasoning is returned in `reasoning_content`, separate from the answer in `content`. Keep it out of what you show users unless you want to display it. - Reasoning can be long: an image request spent all 4,000 tokens on reasoning, and a request that needed two tool calls did not finish within 240 seconds. Leave a generous `max_tokens` and timeout. #### More - [HY4 Preview API docs page](https://tokenra.io/docs/hy4-preview.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/hy4-preview/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/hy4-preview/llms.txt ### Step 5 Preview API on TokenRa Model ID: `step-5-preview` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > Step 5 Preview is a preview of StepFun's Step 5 model. On TokenRa it reasons before answering (`reasoning_content`), accepts image input and works in all three API formats. - Provider: StepFun - Type: Text model - API formats: Chat Completions, Responses, Messages - Input: Text, image - Output: Text with reasoning #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `step-5-preview`: $1.62 per 1M input tokens, $4.63 per 1M output tokens, $0.08 per 1M cached input tokens #### Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "step-5-preview", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `step-5-preview`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. `content` can be a string or an array of `text` and `image_url` parts. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Upper limit for generated tokens. Reasoning tokens count toward it: if it is too low the model can spend it all on reasoning and return no text (`finish_reason: "length"`). | | `max_completion_tokens` | integer | No | Upper limit for all generated tokens, reasoning included. If it is too low the answer can be empty (`finish_reason: "length"`). | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `response_format` | object | No | `{"type": "json_object"}` returns a JSON object. `{"type": "json_schema", "json_schema": {...}}` returns JSON that matches your schema (tested with `strict: true`). | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `parallel_tool_calls` | boolean | No | Allow several tool calls in one response. | | `reasoning_effort` | string | No | Reasoning depth such as `low`, `medium` or `high`. The model accepted it in testing; how much it changes the reasoning varies by model. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "step-5-preview", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging.", "reasoning_content": "The user wants two sentences about API gateways..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 21 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.reasoning_content` | string | The model's reasoning, returned separately from the answer. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input was tested with an `image_url` part that points to a public HTTPS image. - Reasoning is returned in `reasoning_content`, separate from the answer in `content`. Keep it out of what you show users unless you want to display it. - `usage.completion_tokens_details.reasoning_tokens` is reported as 0 even when reasoning comes back; the reasoning is still counted in `completion_tokens`. #### More - [Step 5 Preview API docs page](https://tokenra.io/docs/step-5-preview.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/step-5-preview/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/step-5-preview/llms.txt ### MiMo V2.5 API on TokenRa Model ID: `mimo-v2.5` Updated: 2026-10-30 > MiMo V2.5 is Xiaomi's multimodal reasoning model. TokenRa retired it on October 30, 2026, so requests that use `mimo-v2.5` now fail with `model_not_found`. The page below is kept as an archive of how it behaved. **Retired on October 30, 2026** This model is no longer served: requests that use `mimo-v2.5` return HTTP 503 with `model_not_found`. The parameters and examples on this page describe how it behaved while it was available. For replacements and migration steps, see [Model Retirements](https://tokenra.io/models/retirements#mimo-v2-5). - Provider: Xiaomi - Type: Text model - API formats: Chat Completions, Responses, Messages - Input: Text, image - Output: Text with reasoning #### Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `mimo-v2.5`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. `content` can be a string or an array of `text` and `image_url` parts. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Upper limit for generated tokens. Reasoning tokens count toward it: if it is too low the model can spend it all on reasoning and return no text (`finish_reason: "length"`). | | `max_completion_tokens` | integer | No | Upper limit for all generated tokens, reasoning included. If it is too low the answer can be empty (`finish_reason: "length"`). | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `response_format` | object | No | `{"type": "json_object"}` returns a JSON object. `{"type": "json_schema", "json_schema": {...}}` returns JSON that matches your schema (tested with `strict: true`). | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `parallel_tool_calls` | boolean | No | Allow several tool calls in one response. | | `reasoning_effort` | string | No | Reasoning depth such as `low`, `medium` or `high`. The model accepted it in testing; how much it changes the reasoning varies by model. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "mimo-v2.5", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging.", "reasoning_content": "The user wants two sentences about API gateways..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 21 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.reasoning_content` | string | The model's reasoning, returned separately from the answer. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input was tested with an `image_url` part that points to a public HTTPS image. - Reasoning is returned in `reasoning_content`, separate from the answer in `content`. Keep it out of what you show users unless you want to display it. - Responses were slow in testing: most calls took 5-25 seconds, one about 34 seconds. Use a client timeout of at least 120 seconds, or stream. - `reasoning_effort` `low`, `high` and `max` behaved alike on a short question, and `thinking: {"type": "disabled"}` was accepted with the reasoning unchanged. #### More - [MiMo V2.5 API docs page](https://tokenra.io/docs/mimo-v2.5.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/mimo-v2.5/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/mimo-v2.5/llms.txt ### Union Alpha API on TokenRa Model ID: `union-alpha` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > Union Alpha is an anonymous multimodal model with a 262K-token context window and up to 131K output tokens. It accepts text and images and answers directly, without a reasoning step. - Type: Text model - Context: 262K tokens - Input: Text, image - Output: Text #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `union-alpha`: $5.00 per 1M input tokens, $14.00 per 1M output tokens #### Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "union-alpha", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `union-alpha`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. `content` can be a string or an array of `text` and `image_url` parts. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Upper limit for generated tokens. | | `max_completion_tokens` | integer | No | Upper limit for all generated tokens, reasoning included. If it is too low the answer can be empty (`finish_reason: "length"`). | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `response_format` | object | No | `{"type": "json_object"}` asks for a JSON object. | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `parallel_tool_calls` | boolean | No | Allow several tool calls in one response. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | **Not supported by this model** - `response_format` with `json_schema` is not enforced: plain text came back. Use `json_object` and describe the fields in the prompt. ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "union-alpha", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input was tested with an `image_url` part that points to a public HTTPS image. - The model answers directly; responses contain no `reasoning_content`. #### More - [Union Alpha API docs page](https://tokenra.io/docs/union-alpha.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [Union Alpha overview and pricing page](https://tokenra.io/models/union-alpha.html) - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/union-alpha/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/union-alpha/llms.txt ### Ox Alpha API on TokenRa Model ID: `ox-alpha` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > Ox Alpha is the preview code name of Z.ai's GLM-5.3 Flash. The ID still works on TokenRa and behaved like GLM-5.3 Flash in testing; use `glm-5.3-flash` for new integrations. - Type: Text model - API formats: Chat Completions, Responses, Messages - Input: Text, image - Output: Text with reasoning #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `ox-alpha`: $0.14 per 1M input tokens, $0.52 per 1M output tokens, $0.04 per 1M cached input tokens #### Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "ox-alpha", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `ox-alpha`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. `content` can be a string or an array of `text` and `image_url` parts. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Upper limit for generated tokens. Reasoning tokens count toward it: if it is too low the model can spend it all on reasoning and return no text (`finish_reason: "length"`). | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `response_format` | object | No | `{"type": "json_object"}` returns a JSON object. `{"type": "json_schema", "json_schema": {...}}` returns JSON that matches your schema (tested with `strict: true`). | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `parallel_tool_calls` | boolean | No | Allow several tool calls in one response. | | `reasoning_effort` | string | No | Thinking depth: `low`, `high` or `max`. The vendor default is `max`. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | **Not supported by this model** - `max_completion_tokens` is ignored by this model. Use `max_tokens` to cap the output. ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "ox-alpha", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging.", "reasoning_content": "The user wants two sentences about API gateways..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 21 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.reasoning_content` | string | The model's reasoning, returned separately from the answer. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input was tested with an `image_url` part that points to a public HTTPS image. - Reasoning is returned in `reasoning_content`, separate from the answer in `content`. Keep it out of what you show users unless you want to display it. - In testing, `reasoning_effort` `low` or `high` answered a short question with 0-3 reasoning tokens; the default `max` used about 100. #### More - [Ox Alpha API docs page](https://tokenra.io/docs/ox-alpha.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [Ox Alpha overview and pricing page](https://tokenra.io/models/ox-alpha.html) - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/ox-alpha/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/ox-alpha/llms.txt ### Omen Alpha API on TokenRa Model ID: `omen-alpha` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > Omen Alpha is an anonymous reasoning model for coding and agent work with a 1M-token context window; its developer has not been disclosed. It reasons before answering, and `reasoning_effort` `low` or `high` keeps the reasoning short. - Type: Text model - Context: 1M tokens - Input: Text, image - Output: Text with reasoning #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `omen-alpha`: $0.13 per 1M input tokens, $0.50 per 1M output tokens, $0.03 per 1M cached input tokens #### Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "omen-alpha", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` #### Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `omen-alpha`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. `content` can be a string or an array of `text` and `image_url` parts. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Upper limit for generated tokens. Reasoning tokens count toward it: if it is too low the model can spend it all on reasoning and return no text (`finish_reason: "length"`). | | `max_completion_tokens` | integer | No | Upper limit for all generated tokens, reasoning included. If it is too low the answer can be empty (`finish_reason: "length"`). | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `response_format` | object | No | `{"type": "json_object"}` returns a JSON object. `{"type": "json_schema", "json_schema": {...}}` returns JSON that matches your schema (tested with `strict: true`). | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `parallel_tool_calls` | boolean | No | Allow several tool calls in one response. | | `reasoning_effort` | string | No | Reasoning depth such as `low`, `medium` or `high`. The model accepted it in testing; how much it changes the reasoning varies by model. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | ##### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | #### Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "omen-alpha", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging.", "reasoning_content": "The user wants two sentences about API gateways..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 21 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.reasoning_content` | string | The model's reasoning, returned separately from the answer. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. #### Errors & limits ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Image input was tested with an `image_url` part that points to a public HTTPS image. - Reasoning is returned in `reasoning_content`, separate from the answer in `content`. Keep it out of what you show users unless you want to display it. - In testing, `reasoning_effort` `low` or `high` answered a short question with about 3 reasoning tokens, against about 30 without it. - Responses on 2026-10-24 reported `"model": "glm-5.3-flash"`, so the serving model identifies itself as GLM-5.3 Flash. Do not depend on the `model` field to tell providers apart. #### More - [Omen Alpha API docs page](https://tokenra.io/docs/omen-alpha.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [Omen Alpha overview and pricing page](https://tokenra.io/models/omen-alpha-api.html) - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/omen-alpha/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/omen-alpha/llms.txt ### Jev API on TokenRa Model ID: `jev-latest` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > Jev is TypeSafe AI's decision model. It does not write text: you send a state (the text or JSON to judge) plus named questions, and every answer comes back typed, with probabilities and a confidence value. - Provider: TypeSafe AI - Type: Decision model - Input: Text or JSON state - Output: Typed answers - Latency: Under 1 s #### Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `jev-latest`: $0.042 per 1M tokens, input and output at the same rate #### Capabilities & endpoints One synchronous endpoint. Jev does not use the chat format, so the OpenAI and Anthropic SDKs do not apply; send plain HTTPS requests. Calling `jev-latest` on `/v1/chat/completions` returns an error. - `POST https://tokenra.io/v1/decisions`: Send a `state` and named `questions`; every answer comes back typed. Auth: `Authorization: Bearer`. #### Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/decisions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "jev-latest", "state": "Help! My payouts have been failing for 3 days.", "questions": { "is_urgent": { "type": "noul", "instructions": "Does this message convey urgency?", "criteria": { "true": "Explicitly time-sensitive", "false": "No urgency expressed" } }, "department": { "type": "choice", "instructions": "Which team should handle this?", "criteria": { "billing": "Payments, invoicing, refunds", "technical": "Bugs, outages, integrations", "sales": "Pricing, upgrades, new accounts" } }, "frustration": { "type": "score", "instructions": "How frustrated is the customer?", "criteria": [ "Calm", "Frustrated", "Very angry" ] } } }' ``` #### Question types Each question has a name you choose, a `type`, `instructions` and, depending on the type, `criteria`. All three types were answered on 2026-10-23. | type | criteria | Answer fields | | --- | --- | --- | | `noul` | Optional. Object with exactly the keys `"true"` and `"false"`, each describing when it applies. | `noul`: probability (0-1) that the answer is true. | | `choice` | Required. Object that maps each option key to its description, at least one option. | `choice` (the most likely key), `probabilities` per option, `confidence`. | | `score` | Required. Array of at least two level descriptions, from the lowest to the highest. | `score` (0 to number of levels - 1, can be fractional), `legend`, `probabilities` per level, `confidence`. | #### Request parameters | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | `jev-latest`. The response reports the version that answered, for example `typesafe/jev-1.14-20261014` or `jev-1.14.0`. | | `state` | string / object / array | Yes | What to judge, shared by every question: text, or JSON such as a ticket or a record. Chinese text was tested. | | `questions` | object | Yes | Your question names mapped to question objects; at least one. Each answer comes back under the same name. | | `questions.*.type` | string | Yes | `noul`, `choice` or `score`. | | `questions.*.instructions` | string / object / array | Yes | The question itself. | | `questions.*.criteria` | object / array | No | Depends on the type, see the table above. Required for `choice` and `score`. | | `stream` | boolean | No | Not supported. Leave it out; `true` returns an error. | #### Response format **Response from the example request (2026-10-24)** ```json { "model": "typesafe/jev-1.14-20261014", "answers": { "department": { "type": "choice", "choice": "billing", "probabilities": { "billing": 0.88, "technical": 0.12, "sales": 0 }, "confidence": 0.82 }, "frustration": { "type": "score", "score": 1.02, "legend": { "0": "Calm", "1": "Frustrated", "2": "Very angry" }, "probabilities": { "0": 0, "1": 0.98, "2": 0.02 }, "confidence": 0.97 }, "is_urgent": {"type": "noul", "noul": 0.95} }, "usage": {"input_tokens": 427, "output_tokens": 73}, "id": "gen-dec-1792772733-dG0LU2uG8E83JEMaXCmh", "provider": "TypeSafe" } ``` | Field | Type | Description | | --- | --- | --- | | `model` | string | The Jev version that answered. | | `answers..type` | string | The question type. | | `answers..noul` | number | noul only: probability that the answer is true. | | `answers..choice` | string | choice only: the most likely option key. | | `answers..score` | number | score only: expected level, from 0 to the number of levels - 1. | | `answers..probabilities` | object | choice and score: probability of each option or level; they add up to 1. | | `answers..legend` | object | score only: level index to your level description. | | `answers..confidence` | number | choice and score: confidence from 0 to 1. Use it to route unsure cases to a person. | | `usage` | object | `input_tokens` and `output_tokens` used for billing. | | `id / provider` | string | Request ID and serving provider, when the upstream includes them. | The answers are keyed by your question names; do not rely on their order. In testing they came back sorted by name, not in request order. During testing the upstream answered in two shapes: with `model` like `typesafe/jev-1.14-20261014` plus `id` and `provider`, or with `model` like `jev-1.14.0` and no extra fields. `answers` and `usage` were the same in both, so read only the fields you need. #### Errors & limits ##### Request validation Invalid requests return HTTP `400` with `error.code` `invalid_request` and one of these messages. Do not retry them; fix the request. | Message | Cause | | --- | --- | | `questions must not be empty` | `questions` is missing or empty. | | `state must be a string, object or array` | `state` is missing, for example when a chat `messages` body is sent instead. | | `unsupported question type; expected noul, choice or score` | Unknown `type`. | | `choice criteria must be a nonempty object of choices` | A choice question without options. | | `score criteria must contain at least two string levels` | A score question with fewer than two levels. | | `noul criteria must contain only true and false string descriptions` | Other keys in noul criteria. | | `decisions do not support streaming` | `stream: true` was sent. | ##### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ##### Limits and notes - Requests took 0.35 to 1 second in testing. - Billing: input and output tokens are both charged at $0.042 per 1M tokens (checked 2026-10-24). A test request with 358 input and 60 output tokens was charged 9 quota units, that is $0.000018. Question definitions count as input tokens. Rates can change; the live rate is on the Model Square. - A one-sentence state with the three example questions used 427 input and 73 output tokens; question definitions count as input. #### More - [Jev API docs page](https://tokenra.io/docs/jev-latest.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [Jev overview and pricing page](https://tokenra.io/models/jev-api.html) - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/jev-latest/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/jev-latest/llms.txt ## Note on the per-model guides Each guide states its own Updated date. Rates are the console rates on that date; model availability and prices change, so check https://tokenra.io/api/pricing before relying on a number.