Other Model API Guide
Native endpoints for Gemini, Claude, GPT and Grok models, plus SDK setup.
- Base URL:
https://token.bytomdao.com/v1- Routing follows the standard OpenAI conventions
- Authentication:
Authorization: Bearer YOUR_API_TOKEN
Common Endpoints
All models support the following two endpoint styles:
| Endpoint | Path | Format | Supported models |
|---|---|---|---|
| Chat Completions | POST /v1/chat/completions | OpenAI-compatible format, Authorization: Bearer <token> | All 20 models |
| Messages | POST /v1/messages | Anthropic Messages-compatible format, x-api-key: <token> + anthropic-version: 2023-06-01 | All 20 models |
About the Messages endpoint: The Messages endpoint uses the native Anthropic API format. Unlike Chat Completions, it authenticates with the
x-api-keyheader and requires theanthropic-versionheader. It supports Anthropic-specific features such as the top-levelsystemparameter (instead of a system role inside themessagesarray), the requiredmax_tokensparameter, and thestop_reasonresponse field.
Messages Request Example
curl https://token.bytomdao.com/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_TOKEN" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "Claude-Sonnet-4.6",
"max_tokens": 1024,
"system": "You are a helpful assistant.",
"messages": [
{"role": "user", "content": "Hello!"}
]
}'Messages Response Format
{
"id": "chatcmpl-xxx",
"type": "message",
"role": "assistant",
"model": "claude-4.6-sonnet",
"content": [
{"type": "text", "text": "Hello! How can I help you today?"}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 19,
"output_tokens": 75
}
}Messages Streaming
curl https://token.bytomdao.com/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_TOKEN" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "Claude-Sonnet-4.6",
"max_tokens": 1024,
"stream": true,
"messages": [
{"role": "user", "content": "Write a short poem about spring in English"}
]
}'Streaming responses follow the Anthropic SSE event format (message_start, content_block_start, content_block_delta, message_delta, message_stop).
Cross-model support: Besides the Claude family, the Messages endpoint also works with every GPT, Gemini and Grok model. The
systemparameter works on all models.
Supported Models
The platform currently offers 20 text models from 4 providers: Anthropic Claude (7), OpenAI GPT (7), Google Gemini (5) and xAI Grok (1). All models support both Chat Completions and Messages. See Common Endpoints for authentication and parameters.
Anthropic Claude (7)
| Model | Description |
|---|---|
| Claude-Fable-5 | Latest flagship model with strong reasoning, coding and multimodal capabilities; supports web search |
| Claude-Opus-5 | Built for complex agentic coding and enterprise tasks, with strong long-horizon agent abilities |
| Claude-Opus-4.8 | The most capable general-purpose Opus model, 1M context window, supports caching |
| Claude-Opus-4.7 | Opus 4.7 flagship reasoning model; parameters such as temperature must be cleared when extended thinking is on |
| Claude-Opus-4.6 | Opus 4.6 flagship reasoning model, supports adaptive thinking |
| Claude-Sonnet-5 | Upgrade over Sonnet 4.6 at the same price, with significantly better coding and agent performance |
| Claude-Sonnet-4.6 | Cost-effective model balancing speed and quality |
OpenAI GPT (7)
| Model | Description |
|---|---|
| GPT-5.6-Sol | Frontier model for complex professional work |
| GPT-5.6-Terra | GPT-5.6 model balancing intelligence and cost |
| GPT-5.6-Luna | GPT-5.6 model for cost-sensitive workloads |
| GPT-5.5 | Latest GPT model with upgraded reasoning, coding and multimodal capabilities |
| GPT-5.4 | Frontier model unifying the Codex and GPT lines, 1M+ context window |
| GPT-5.4-Mini | Lightweight, economical model that is fast and cheap, ideal for high-frequency chat |
| GPT-OSS-120B | Open-weight 120B model for hard reasoning, long text and programming |
Google Gemini (5)
| Model | Description |
|---|---|
| Gemini-3.6-Flash | Best token efficiency for coding, knowledge work and multimodal tasks |
| Gemini-3.5-Flash | Fast and efficient with strong agentic ability (near professional grade); a thinking model |
| Gemini-3.5-Flash-Lite | Lightweight version for low-latency, high-throughput agent tasks |
| Gemini-3.1-Flash | Fast reasoning model with low latency and multimodal input, balancing speed and quality |
| Gemini-3.1-Pro | Flagship reasoning model with Thinking Levels, media resolution up to ULTRA_HIGH, and streaming function calling |
xAI Grok (1)
| Model | Description |
|---|---|
| Grok-4.5 | Handles long-horizon, complex tasks that require creative tool use; suited to software engineering, data science, finance, legal and more |
For each model's endpoint, request parameters and examples, see the corresponding section below.
1. Google Gemini Models
1.1 Supported Models
| Model | Description | Highlights |
|---|---|---|
| Gemini-3.6-Flash | Google Gemini 3.6 Flash | Best token efficiency for coding, knowledge work and multimodal tasks |
| Gemini-3.5-Flash | Google Gemini 3.5 Flash | Lightweight and fast, low latency, cost-effective, suited to high-frequency chat |
| Gemini-3.5-Flash-Lite | Google Gemini 3.5 Flash Lite | Lightweight version for low-latency, high-throughput agent tasks |
| Gemini-3.1-Flash | Google Gemini 3.1 Flash | Lightweight reasoning model at a low price; supports web search and code execution |
| Gemini-3.1-Pro | Google Gemini 3.1 Pro | Flagship reasoning model with Thinking Levels, media resolution up to ULTRA_HIGH, and streaming function calling |
1.2 Endpoints
Gemini models support two endpoint styles:
Chat Completions
POST https://token.bytomdao.com/v1/chat/completionsMessages (native Anthropic format, works with every model)
POST https://token.bytomdao.com/v1/messagesThe Messages endpoint is shared by all models. See Common Endpoints above for general notes and examples.
1.3 Request Parameters (Chat Completions)
Common parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Yes | — | Model name, such as Gemini-3.5-Flash, Gemini-3.1-Flash or Gemini-3.1-Pro |
messages | array | Yes | — | Conversation messages; role can be system, user or assistant |
temperature | number | No | 1.0 | Sampling randomness, range 0.0 – 2.0 |
top_p | number | No | — | Nucleus sampling threshold, range 0.0 – 1.0 |
max_tokens | integer | No | Model default | Maximum number of output tokens |
stream | boolean | No | false | Enable streaming output (SSE) |
stop | string / array | No | — | Stop sequences, up to 5 |
seed | integer | No | — | Random seed for more reproducible results |
tools | array | No | — | Tool definitions (Function Calling); also supports the special googleSearch and codeExecution tools |
tool_choice | string / object | No | auto | Tool selection strategy: auto, none, required, or a specific function object |
response_format | object | No | — | Output format control: { "type": "json_object" } or { "type": "json_schema", "json_schema": {...} } |
Gemini-specific parameters (via extra_body)
Gemini-specific parameters are passed through extra_body.google and do not affect OpenAI compatibility.
{
"model": "Gemini-3.1-Pro",
"messages": [...],
"extra_body": {
"google": {
"thinking_config": {
"thinking_level": "HIGH",
"include_thoughts": true
}
}
}
}thinking_config parameters
| Parameter | Type | Description |
|---|---|---|
thinking_level | string | Thinking intensity. "HIGH" (default, for complex reasoning), "MEDIUM" (balanced), "LOW" (fast responses, for high-throughput tasks). Supported by Gemini-3.1-Pro only. |
thinking_budget | integer | Thinking budget in tokens. Set to 0 to disable thinking. |
include_thoughts | boolean | Whether to include the thinking process in the response. |
1.4 Multimodal Input
Gemini models natively accept several media types, passed through the OpenAI-compatible content array:
| Type | Example |
|---|---|
| Text | { "type": "text", "text": "..." } |
| Image | { "type": "image_url", "image_url": { "url": "https://..." } } |
| Image (Base64) | { "type": "image_url", "image_url": { "url": "data:image/jpeg;base64,..." } } |
Supported image MIME types: image/png, image/jpeg, image/webp, image/heic, image/heif.
1.5 Examples
All examples below use curl. Replace YOUR_API_TOKEN with your own API key to try them.
Basic chat (Gemini-3.1-Pro)
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "Gemini-3.1-Pro",
"messages": [
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": "Describe the core capabilities of Gemini 3.1 Pro" }
],
"temperature": 0.7,
"max_tokens": 2048
}'Basic chat (Gemini-3.5-Flash)
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "Gemini-3.5-Flash",
"messages": [
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": "Explain quantum computing in one sentence" }
],
"temperature": 0.7,
"max_tokens": 1024
}'Basic chat (Gemini-3.1-Flash)
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "Gemini-3.1-Flash",
"messages": [
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": "Explain quantum computing in one sentence" }
],
"temperature": 0.7,
"max_tokens": 1024
}'Enable deep thinking (Gemini-3.1-Pro)
Control the thinking level with extra_body.google.thinking_config:
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "Gemini-3.1-Pro",
"messages": [
{ "role": "user", "content": "Design the architecture of a high-concurrency message queue that supports millions of QPS" }
],
"extra_body": {
"google": {
"thinking_config": {
"thinking_level": "HIGH",
"include_thoughts": true
}
}
}
}'Streaming
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "Gemini-3.5-Flash",
"messages": [
{ "role": "user", "content": "Write a short poem about spring in English" }
],
"stream": true
}'Multimodal input (image understanding)
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "Gemini-3.1-Pro",
"messages": [
{
"role": "user",
"content": [
{ "type": "text", "text": "Please describe this image in detail" },
{ "type": "image_url", "image_url": { "url": "https://example.com/image.jpg" } }
]
}
],
"max_tokens": 1024
}'Function Calling
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "Gemini-3.1-Pro",
"messages": [
{ "role": "user", "content": "What's the weather like in Shanghai today?" }
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get weather information for a given city",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "City name"
}
},
"required": ["city"]
}
}
}
],
"tool_choice": "auto"
}'Web search (Google Search)
Gemini enables web search through the special tool name googleSearch:
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "Gemini-3.5-Flash",
"messages": [
{ "role": "user", "content": "What are the latest AI technology trends in 2026?" }
],
"tools": [
{
"type": "function",
"function": {
"name": "googleSearch",
"description": "Search the web for the latest information",
"parameters": {
"type": "object",
"properties": {}
}
}
}
]
}'Structured output (JSON Schema)
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "Gemini-3.1-Pro",
"messages": [
{ "role": "user", "content": "List 5 science fiction novels with title, author and publication year" }
],
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "books",
"strict": true,
"schema": {
"type": "object",
"properties": {
"books": {
"type": "array",
"items": {
"type": "object",
"properties": {
"title": { "type": "string" },
"author": { "type": "string" },
"year": { "type": "integer" }
},
"required": ["title", "author", "year"]
}
}
},
"required": ["books"]
}
}
}
}'1.6 Response Format
Standard OpenAI Chat Completions response format:
{
"id": "chatcmpl-xxx",
"object": "chat.completion",
"created": 1718000000,
"model": "Gemini-3.1-Pro",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Gemini 3.1 Pro is Google's latest reasoning model..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 50,
"completion_tokens": 200,
"total_tokens": 250
}
}1.7 Model Comparison
| Feature | Gemini-3.5-Flash | Gemini-3.1-Flash | Gemini-3.1-Pro |
|---|---|---|---|
| Positioning | Lightweight, fast model | Lightweight, economical model | Flagship reasoning model |
| Thinking Levels | Limited support | Not supported | LOW / MEDIUM / HIGH |
| Media resolution | Standard | Standard | ULTRA_HIGH |
| Function Calling | Supported | Supported | Supported (including streaming) |
| Web search | Supported | Supported | Supported |
| Code execution | Supported | Supported | Supported |
| Structured output | Supported | Supported | Supported |
| Latency | Low | Lowest | Higher (when thinking deeply) |
| Best for | High-frequency chat, fast responses, cost-sensitive use | High-throughput economical workloads, simple reasoning | Complex reasoning, code generation, multi-step planning, advanced analysis |
1.8 Notes
- Model names are case-sensitive. Use exactly
Gemini-3.5-Flash,Gemini-3.1-FlashandGemini-3.1-Pro - For Gemini-3.1-Pro, the thinking level (
thinking_level) cannot be combined with the legacythinking_budget, otherwise a 400 error is returned; Gemini-3.1-Flash does not support thinking configuration - When streaming, thinking content is returned before text content, so clients must handle it correctly
- Web search (
googleSearch) and code execution (codeExecution) are enabled through specially named Function Calling tools - Safety settings are configured automatically by the platform; no manual setup is needed
- Gemini strictly validates the MIME types of images and files; unsupported formats return an error
2. Claude Models
2.1 Supported Models
| Model | Description | Highlights |
|---|---|---|
| Claude-Fable-5 | Anthropic Claude Fable 5 | Latest flagship model with strong reasoning, coding and multimodal capabilities; supports web search |
| Claude-Opus-5 | Anthropic Claude Opus 5 | Built for complex agentic coding and enterprise tasks, with strong long-horizon agent abilities |
| Claude-Opus-4.8 | Anthropic Claude Opus 4.8 | Latest Opus model, strong performance, supports caching |
| Claude-Opus-4.7 | Anthropic Claude Opus 4.7 | Opus 4.7 flagship reasoning model; parameters such as temperature must be cleared when extended thinking is on |
| Claude-Opus-4.6 | Anthropic Claude Opus 4.6 | Opus 4.6 flagship reasoning model, supports adaptive thinking |
| Claude-Sonnet-5 | Anthropic Claude Sonnet 5 | Upgrade over Sonnet 4.6 at the same price, with significantly better coding and agent performance |
| Claude-Sonnet-4.6 | Anthropic Claude Sonnet 4.6 | Cost-effective model balancing speed and quality |
2.2 Endpoints
Claude models support two endpoint styles:
Chat Completions
POST https://token.bytomdao.com/v1/chat/completionsMessages (native Anthropic format, recommended)
POST https://token.bytomdao.com/v1/messagesThe Messages endpoint is recommended for Claude models. It uses the native Anthropic API format: authenticate with the x-api-key header (not Authorization: Bearer) and send the anthropic-version: 2023-06-01 header. System prompts go in the top-level system parameter rather than a system role inside messages. See Common Endpoints above for general notes and examples.
2.3 Request Parameters (Chat Completions)
Common parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Yes | — | Model name, such as Claude-Sonnet-4.6 |
messages | array | Yes | — | Conversation messages; role can be system, user, assistant or tool |
max_tokens | integer | No | Model default | Maximum number of output tokens |
temperature | number | No | 1.0 | Sampling randomness, range 0.0 – 1.0 |
top_p | number | No | — | Nucleus sampling threshold, range 0.0 – 1.0 |
top_k | integer | No | — | Top-K sampling |
stream | boolean | No | false | Enable streaming output (SSE) |
stop | string / array | No | — | Stop sequences, up to 4 |
tools | array | No | — | Tool definitions (Function Calling) |
tool_choice | string / object | No | auto | Tool selection strategy: auto, any, none, or {"type":"tool","name":"..."} |
parallel_tool_calls | boolean | No | true | Whether to allow parallel tool calls |
response_format | object | No | — | Output format control: { "type": "json_object" } |
Extended thinking parameters
Control the thinking depth with the reasoning_effort parameter:
| Value | Description |
|---|---|
"low" | Low thinking budget (1280 tokens) |
"medium" | Medium thinking budget (2048 tokens) |
"high" | High thinking budget (4096 tokens) |
Web search
Enable web search with the web_search_options parameter:
{
"web_search_options": {
"search_context_size": "medium"
}
}search_context_size values:
| Value | Description |
|---|---|
"low" | Up to 1 search call |
"medium" | Up to 5 search calls |
"high" | Up to 10 search calls |
Multimodal input
Claude models accept images and PDFs, passed through the OpenAI-compatible content array:
| Type | Example |
|---|---|
| Text | { "type": "text", "text": "..." } |
| Image | { "type": "image_url", "image_url": { "url": "https://..." } } |
| Image (Base64) | { "type": "image_url", "image_url": { "url": "data:image/jpeg;base64,..." } } |
Supported image MIME types: image/png, image/jpeg, image/webp, image/gif.
2.4 Examples
All examples below use curl. Replace YOUR_API_TOKEN with your own API key to try them.
Basic chat
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "Claude-Sonnet-4.6",
"messages": [
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": "Describe the core capabilities of Claude Sonnet 4.6" }
],
"temperature": 0.7,
"max_tokens": 1024
}'Enable extended thinking (reasoning_effort)
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "Claude-Opus-4.6",
"messages": [
{ "role": "user", "content": "Design the architecture of a high-concurrency message queue" }
],
"max_tokens": 2048,
"reasoning_effort": "high"
}'Streaming
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "Claude-Sonnet-4.6",
"messages": [
{ "role": "user", "content": "Write a short poem about spring in English" }
],
"stream": true,
"max_tokens": 1024
}'Web search
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "Claude-Sonnet-4.6",
"messages": [
{ "role": "user", "content": "What are the latest AI technology trends in 2026?" }
],
"web_search_options": {
"search_context_size": "medium"
},
"max_tokens": 2048
}'Function Calling
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "Claude-Sonnet-4.6",
"messages": [
{ "role": "user", "content": "What's the weather like in Beijing today?" }
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get weather information for a given city",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "City name"
}
},
"required": ["city"]
}
}
}
],
"tool_choice": "auto",
"max_tokens": 1024
}'Multimodal input (image understanding)
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "Claude-Sonnet-4.6",
"messages": [
{
"role": "user",
"content": [
{ "type": "text", "text": "Please describe this image in detail" },
{ "type": "image_url", "image_url": { "url": "https://example.com/image.jpg" } }
]
}
],
"max_tokens": 1024
}'2.5 Response Format
Standard OpenAI Chat Completions response format:
{
"id": "chatcmpl-xxx",
"object": "chat.completion",
"created": 1718000000,
"model": "claude-4.6-sonnet",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Claude Sonnet 4.6 is Anthropic's latest..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 50,
"completion_tokens": 200,
"total_tokens": 250
}
}When extended thinking is enabled, the response includes a reasoning_content field:
{
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Final output text...",
"reasoning_content": "Thinking process..."
},
"finish_reason": "end_turn"
}
]
}2.6 Model Comparison
| Feature | Claude-Fable-5 | Claude-Opus-5 | Claude-Opus-4.8 | Claude-Opus-4.7 | Claude-Opus-4.6 | Claude-Sonnet-5 | Claude-Sonnet-4.6 |
|---|---|---|---|---|---|---|---|
| Positioning | Latest flagship | Agentic coding flagship | Latest Opus | Opus flagship | Opus flagship | Cost-effective upgrade | Cost-effective |
| Extended thinking | Supported | Supported | Supported | Supported | Supported | Supported | - |
| adaptive thinking | - | - | - | Supported | Supported | - | - |
| Web search | Supported | Supported | Supported | Supported | Supported | Supported | Supported |
| Image understanding | Supported | Supported | Supported | Supported | Supported | Supported | Supported |
| Function Calling | Supported | Supported | Supported | Supported | Supported | Supported | Supported |
| Streaming | Supported | Supported | Supported | Supported | Supported | Supported | Supported |
| Structured output | Supported | Supported | Supported | Supported | Supported | Supported | Supported |
| Caching | Supported | Supported | Supported | - | - | Supported | - |
| Latency | Medium | Medium | Medium | Higher | Higher | Low | Low |
2.7 Notes
- Model names are case-sensitive. Use exactly the names shown in the tables
- When extended thinking is enabled, Claude-Opus-4.7 automatically clears
temperature,top_pandtop_k(Opus 4.7 rejects these parameters in thinking mode) - For extended thinking,
budget_tokensmust be >= 1024 and less thanmax_tokens - Web search (
web_search_options) is a top-level parameter, not a tool inside thetoolsarray - Prompt caching applies automatically to the system prompt; no manual setup is needed
- Image inputs are automatically converted to Base64 before being sent upstream
3. GPT Models
3.1 Supported Models
| Model | Description | Highlights |
|---|---|---|
| GPT-5.6-Sol | OpenAI GPT-5.6 Sol | Frontier model for complex professional work |
| GPT-5.6-Terra | OpenAI GPT-5.6 Terra | GPT-5.6 model balancing intelligence and cost |
| GPT-5.6-Luna | OpenAI GPT-5.6 Luna | GPT-5.6 model for cost-sensitive workloads |
| GPT-5.5 | OpenAI GPT-5.5 | Latest GPT model with upgraded reasoning, coding and multimodal capabilities |
| GPT-5.4 | OpenAI GPT-5.4 | Flagship reasoning model unifying the Codex and GPT lines, 1M+ context window, supports deep reasoning (reasoning_effort) |
| GPT-5.4-Mini | OpenAI GPT-5.4 Mini | Lightweight, economical model that is fast and cheap, ideal for high-frequency chat |
| GPT-OSS-120B | OpenAI GPT-OSS 120B | Open-weight 120B model for hard reasoning, long text and programming |
3.2 Endpoints
GPT models support two endpoint styles:
Chat Completions (all GPT models)
POST https://token.bytomdao.com/v1/chat/completionsResponse API (GPT-5.5 only)
POST https://token.bytomdao.com/v1/responsesAbout the Response API: The Response API is OpenAI's next-generation interface. It authenticates with
Authorization: Bearer <token>, accepts aninputfield instead ofmessages, and returns anoutputarray. Currently only GPT-5.5 supports it. Other online models, including GPT-5.4, GPT-5.4-Mini, GPT-5.6-Luna, GPT-5.6-Sol, GPT-5.6-Terra and GPT-OSS-120B, do not support it yet.
Response API request example
curl https://token.bytomdao.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "GPT-5.5",
"input": "Explain quantum computing in one sentence"
}'Response API response format
{
"id": "resp_xxx",
"object": "response",
"status": "completed",
"model": "gpt-5.5",
"output": [
{
"type": "message",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Quantum computing uses the principles of quantum mechanics..."
}
]
}
],
"usage": {
"input_tokens": 5093,
"output_tokens": 47,
"total_tokens": 5140
}
}Response API streaming
curl https://token.bytomdao.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "GPT-5.5",
"input": "Write a short poem about spring in English",
"stream": true
}'Streaming responses follow the OpenAI Response API SSE event format (response.created, response.in_progress, response.output_text.delta, response.completed).
3.3 Request Parameters (Chat Completions)
Common parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Yes | — | Model name, such as GPT-5.5 |
messages | array | Yes | — | Conversation messages; role can be system, user, assistant or developer |
max_tokens | integer | No | Model default | Maximum number of output tokens (Chat Completions format) |
max_completion_tokens | integer | No | — | Maximum number of output tokens (recommended for GPT-5.5) |
temperature | number | No | 1.0 | Sampling randomness, range 0.0 – 2.0 |
top_p | number | No | — | Nucleus sampling threshold, range 0.0 – 1.0 |
stream | boolean | No | false | Enable streaming output (SSE) |
stop | string / array | No | — | Stop sequences |
tools | array | No | — | Tool definitions (Function Calling); also supports special tools such as web_search_preview |
tool_choice | string / object | No | auto | Tool selection strategy: auto, none, required, or a specific function object |
parallel_tool_calls | boolean | No | true | Whether to allow parallel tool calls |
response_format | object | No | — | Output format control: { "type": "json_object" } |
seed | integer | No | — | Random seed for more reproducible results |
Reasoning parameters
Control reasoning depth with reasoning_effort:
| Value | Description |
|---|---|
"none" | Reasoning disabled |
"low" | Low reasoning budget |
"medium" | Medium reasoning budget |
"high" | High reasoning budget |
"xhigh" | Maximum reasoning budget |
Web search
Enable web search with the web_search_preview tool in the tools array:
{
"tools": [
{ "type": "web_search_preview" }
],
"tool_choice": "auto"
}3.4 Examples
All examples below use curl. Replace YOUR_API_TOKEN with your own API key to try them.
Basic chat (GPT-5.5)
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "GPT-5.5",
"messages": [
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": "Describe the core capabilities of GPT-5.5" }
],
"temperature": 0.7,
"max_tokens": 1024
}'Basic chat (GPT-5.4-Mini)
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "GPT-5.4-Mini",
"messages": [
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": "Explain quantum computing in one sentence" }
],
"temperature": 0.7,
"max_tokens": 1024
}'Enable deep reasoning (reasoning_effort)
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "GPT-5.5",
"messages": [
{ "role": "user", "content": "Design the architecture of a high-concurrency message queue" }
],
"reasoning_effort": "high",
"max_tokens": 2048
}'Streaming
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "GPT-5.5",
"messages": [
{ "role": "user", "content": "Write a short poem about spring in English" }
],
"stream": true,
"max_tokens": 1024
}'Web search
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "GPT-5.5",
"messages": [
{ "role": "user", "content": "What are the latest AI technology trends in 2026?" }
],
"tools": [
{ "type": "web_search_preview" }
],
"tool_choice": "auto",
"max_tokens": 2048
}'Function Calling
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "GPT-5.5",
"messages": [
{ "role": "user", "content": "What's the weather like in Shanghai today?" }
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get weather information for a given city",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "City name"
}
},
"required": ["city"]
}
}
}
],
"tool_choice": "auto"
}'Structured output (JSON Object)
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "GPT-5.5",
"messages": [
{ "role": "user", "content": "List 5 science fiction novels with title, author and publication year, and return them as JSON" }
],
"response_format": {
"type": "json_object"
}
}'3.5 Response Format
Standard OpenAI Chat Completions response format:
{
"id": "chatcmpl-xxx",
"object": "chat.completion",
"created": 1718000000,
"model": "gpt-5.5",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "GPT-5.5 is OpenAI's latest..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 50,
"completion_tokens": 200,
"total_tokens": 250,
"prompt_tokens_details": {
"cached_tokens": 0
}
}
}3.6 Model Comparison
| Model | Positioning | Best for |
|---|---|---|
| GPT-5.6-Sol | Frontier professional model | Complex professional work, intensive reasoning |
| GPT-5.6-Terra | Balanced intelligence and cost | General tasks balancing quality and cost |
| GPT-5.6-Luna | Cost-sensitive | High-frequency, cost-sensitive workloads |
| GPT-5.5 | Latest all-round model | General chat, reasoning, coding, multimodal |
| GPT-5.4 | Flagship reasoning model (1M+ context) | Complex reasoning, coding, long-document analysis |
| GPT-5.4-Mini | Lightweight, economical model | High-frequency chat, simple tasks |
| GPT-OSS-120B | Open-weight 120B model | Hard reasoning, long text, programming |
All GPT-5.x models support deep reasoning (
reasoning_effort), web search, Function Calling, structured output and streaming. The Response API is currently supported by GPT-5.5 only.
3.7 Notes
- Model names are case-sensitive. Use exactly the names shown in the tables
reasoning_effortacceptsnone,low,medium,highandxhigh; some models may not support every level- Web search is enabled with
type: "web_search_preview"intools, not in the function-calling format max_completion_tokensis the recommended output limit parameter for GPT-5.5;max_tokensis also supported- Prompt caching applies automatically; no manual setup is needed
- GPT-5.5 supports structured output through
response_format: { "type": "json_object" }; json_schema is not supported yet
4. Grok Models
4.1 Supported Models
| Model | Description | Highlights |
|---|---|---|
| Grok-4.5 | xAI Grok 4.5 | Handles long-horizon, complex tasks that require creative tool use; suited to software engineering, data science, finance, legal and more |
4.2 Endpoints
Grok models support two endpoint styles:
Chat Completions
POST https://token.bytomdao.com/v1/chat/completionsMessages (native Anthropic format, works with every model)
POST https://token.bytomdao.com/v1/messagesThe Messages endpoint is shared by all models. See Common Endpoints above for general notes and examples.
4.3 Request Parameters (Chat Completions)
Common parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Yes | — | Model name, such as Grok-4.5 |
messages | array | Yes | — | Conversation messages; role can be system, user or assistant |
max_tokens | integer | No | Model default | Maximum number of output tokens |
temperature | number | No | 1.0 | Sampling randomness, range 0.0 – 2.0 |
top_p | number | No | — | Nucleus sampling threshold, range 0.0 – 1.0 |
stream | boolean | No | false | Enable streaming output (SSE) |
stop | string / array | No | — | Stop sequences |
tools | array | No | — | Tool definitions (Function Calling) |
tool_choice | string / object | No | auto | Tool selection strategy: auto, none, required, or a specific function object |
response_format | object | No | — | Output format control: { "type": "json_object" } |
seed | integer | No | — | Random seed for more reproducible results |
Reasoning parameters
Grok-4.5 supports controlling reasoning depth with reasoning_effort:
| Value | Description |
|---|---|
"low" | Low reasoning budget |
"medium" | Medium reasoning budget |
"high" | High reasoning budget |
4.4 Examples
All examples below use curl. Replace YOUR_API_TOKEN with your own API key to try them.
Basic chat (Grok-4.5)
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "Grok-4.5",
"messages": [
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": "Describe the core capabilities of Grok 4.5" }
],
"temperature": 0.7,
"max_tokens": 1024
}'Enable deep reasoning (Grok-4.5)
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "Grok-4.5",
"messages": [
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": "Design the architecture of a high-concurrency message queue" }
],
"reasoning_effort": "high",
"max_tokens": 2048
}'Streaming
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "Grok-4.5",
"messages": [
{ "role": "user", "content": "Write a short poem about spring in English" }
],
"stream": true,
"max_tokens": 1024
}'Function Calling
curl https://token.bytomdao.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"model": "Grok-4.5",
"messages": [
{ "role": "user", "content": "What's the weather like in Shanghai today?" }
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get weather information for a given city",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "City name"
}
},
"required": ["city"]
}
}
}
],
"tool_choice": "auto"
}'4.5 Response Format
Standard OpenAI Chat Completions response format:
{
"id": "chatcmpl-xxx",
"object": "chat.completion",
"created": 1718000000,
"model": "Grok-4.5",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Grok 4.5 is xAI's latest..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 50,
"completion_tokens": 200,
"total_tokens": 250
}
}4.6 Model Capabilities
| Feature | Grok-4.5 |
|---|---|
| Positioning | Agent model for long-horizon complex tasks, good at creative tool use |
| Deep reasoning | Supported (reasoning_effort: low / medium / high) |
| Function Calling | Supported |
| Streaming | Supported |
| Structured output | Supported |
| Best for | Complex tasks requiring multi-step tool calls, such as software engineering, data science, finance and legal |
4.7 Notes
- Model names are case-sensitive. Use exactly the names shown in the tables
- When reasoning is enabled on Grok-4.5, the response includes a
reasoning_contentfield - Compatible with the standard OpenAI request format, and also supports the Messages endpoint
5. Pricing
Standard per-token billing applies:
- Cost = (input tokens ÷ 1,000,000) × input price + (output tokens ÷ 1,000,000) × output price
- When thinking mode is enabled, thinking tokens are billed as output tokens
- Multimedia input is billed after being converted to tokens
- See the Model Catalog for exact prices
6. Recommended SDK Setup
Chat Completions (OpenAI SDK)
The BytomDAO API is compatible with the OpenAI specification. We recommend the official OpenAI SDK; you only need to override base_url:
Python
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_TOKEN",
base_url="https://token.bytomdao.com/v1"
)
response = client.chat.completions.create(
model="Gemini-3.5-Flash",
messages=[
{"role": "user", "content": "Hello!"}
]
)Node.js
import OpenAI from "openai";
const openai = new OpenAI({
apiKey: "YOUR_API_TOKEN",
baseURL: "https://token.bytomdao.com/v1"
});
const completion = await openai.chat.completions.create({
model: "Gemini-3.5-Flash",
messages: [{ role: "user", content: "Hello!" }]
});Messages (Anthropic SDK)
The Messages endpoint is compatible with the official Anthropic SDK; you only need to override base_url:
Python
from anthropic import Anthropic
client = Anthropic(
api_key="YOUR_API_TOKEN",
base_url="https://token.bytomdao.com/v1"
)
message = client.messages.create(
model="Claude-Sonnet-4.6",
max_tokens=1024,
system="You are a helpful assistant.",
messages=[
{"role": "user", "content": "Hello!"}
]
)
print(message.content[0].text)Node.js
import Anthropic from "@anthropic-ai/sdk";
const anthropic = new Anthropic({
apiKey: "YOUR_API_TOKEN",
baseURL: "https://token.bytomdao.com/v1"
});
const message = await anthropic.messages.create({
model: "Claude-Sonnet-4.6",
max_tokens: 1024,
system: "You are a helpful assistant.",
messages: [{ role: "user", content: "Hello!" }]
});
console.log(message.content[0].text);Response API (OpenAI SDK)
GPT-5.5 supports OpenAI's latest Response API, which you can call with the responses.create method of the OpenAI SDK:
Python
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_TOKEN",
base_url="https://token.bytomdao.com/v1"
)
response = client.responses.create(
model="GPT-5.5",
input="Explain quantum computing in one sentence"
)
print(response.output[0].content[0].text)