DOCS

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:

EndpointPathFormatSupported models
Chat CompletionsPOST /v1/chat/completionsOpenAI-compatible format, Authorization: Bearer <token>All 20 models
MessagesPOST /v1/messagesAnthropic Messages-compatible format, x-api-key: <token> + anthropic-version: 2023-06-01All 20 models

About the Messages endpoint: The Messages endpoint uses the native Anthropic API format. Unlike Chat Completions, it authenticates with the x-api-key header and requires the anthropic-version header. It supports Anthropic-specific features such as the top-level system parameter (instead of a system role inside the messages array), the required max_tokens parameter, and the stop_reason response field.

Messages Request Example

bash
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

json
{
  "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

bash
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 system parameter 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)

ModelDescription
Claude-Fable-5Latest flagship model with strong reasoning, coding and multimodal capabilities; supports web search
Claude-Opus-5Built for complex agentic coding and enterprise tasks, with strong long-horizon agent abilities
Claude-Opus-4.8The most capable general-purpose Opus model, 1M context window, supports caching
Claude-Opus-4.7Opus 4.7 flagship reasoning model; parameters such as temperature must be cleared when extended thinking is on
Claude-Opus-4.6Opus 4.6 flagship reasoning model, supports adaptive thinking
Claude-Sonnet-5Upgrade over Sonnet 4.6 at the same price, with significantly better coding and agent performance
Claude-Sonnet-4.6Cost-effective model balancing speed and quality

OpenAI GPT (7)

ModelDescription
GPT-5.6-SolFrontier model for complex professional work
GPT-5.6-TerraGPT-5.6 model balancing intelligence and cost
GPT-5.6-LunaGPT-5.6 model for cost-sensitive workloads
GPT-5.5Latest GPT model with upgraded reasoning, coding and multimodal capabilities
GPT-5.4Frontier model unifying the Codex and GPT lines, 1M+ context window
GPT-5.4-MiniLightweight, economical model that is fast and cheap, ideal for high-frequency chat
GPT-OSS-120BOpen-weight 120B model for hard reasoning, long text and programming

Google Gemini (5)

ModelDescription
Gemini-3.6-FlashBest token efficiency for coding, knowledge work and multimodal tasks
Gemini-3.5-FlashFast and efficient with strong agentic ability (near professional grade); a thinking model
Gemini-3.5-Flash-LiteLightweight version for low-latency, high-throughput agent tasks
Gemini-3.1-FlashFast reasoning model with low latency and multimodal input, balancing speed and quality
Gemini-3.1-ProFlagship reasoning model with Thinking Levels, media resolution up to ULTRA_HIGH, and streaming function calling

xAI Grok (1)

ModelDescription
Grok-4.5Handles 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

ModelDescriptionHighlights
Gemini-3.6-FlashGoogle Gemini 3.6 FlashBest token efficiency for coding, knowledge work and multimodal tasks
Gemini-3.5-FlashGoogle Gemini 3.5 FlashLightweight and fast, low latency, cost-effective, suited to high-frequency chat
Gemini-3.5-Flash-LiteGoogle Gemini 3.5 Flash LiteLightweight version for low-latency, high-throughput agent tasks
Gemini-3.1-FlashGoogle Gemini 3.1 FlashLightweight reasoning model at a low price; supports web search and code execution
Gemini-3.1-ProGoogle Gemini 3.1 ProFlagship 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

text
POST https://token.bytomdao.com/v1/chat/completions

Messages (native Anthropic format, works with every model)

text
POST https://token.bytomdao.com/v1/messages

The Messages endpoint is shared by all models. See Common Endpoints above for general notes and examples.

1.3 Request Parameters (Chat Completions)

Common parameters

ParameterTypeRequiredDefaultDescription
modelstringYes—Model name, such as Gemini-3.5-Flash, Gemini-3.1-Flash or Gemini-3.1-Pro
messagesarrayYes—Conversation messages; role can be system, user or assistant
temperaturenumberNo1.0Sampling randomness, range 0.0 – 2.0
top_pnumberNo—Nucleus sampling threshold, range 0.0 – 1.0
max_tokensintegerNoModel defaultMaximum number of output tokens
streambooleanNofalseEnable streaming output (SSE)
stopstring / arrayNo—Stop sequences, up to 5
seedintegerNo—Random seed for more reproducible results
toolsarrayNo—Tool definitions (Function Calling); also supports the special googleSearch and codeExecution tools
tool_choicestring / objectNoautoTool selection strategy: auto, none, required, or a specific function object
response_formatobjectNo—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.

json
{
  "model": "Gemini-3.1-Pro",
  "messages": [...],
  "extra_body": {
    "google": {
      "thinking_config": {
        "thinking_level": "HIGH",
        "include_thoughts": true
      }
    }
  }
}

thinking_config parameters

ParameterTypeDescription
thinking_levelstringThinking intensity. "HIGH" (default, for complex reasoning), "MEDIUM" (balanced), "LOW" (fast responses, for high-throughput tasks). Supported by Gemini-3.1-Pro only.
thinking_budgetintegerThinking budget in tokens. Set to 0 to disable thinking.
include_thoughtsbooleanWhether 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:

TypeExample
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)

bash
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)

bash
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)

bash
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:

bash
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

bash
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)

bash
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

bash
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"
  }'

Gemini enables web search through the special tool name googleSearch:

bash
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)

bash
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:

json
{
  "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

FeatureGemini-3.5-FlashGemini-3.1-FlashGemini-3.1-Pro
PositioningLightweight, fast modelLightweight, economical modelFlagship reasoning model
Thinking LevelsLimited supportNot supportedLOW / MEDIUM / HIGH
Media resolutionStandardStandardULTRA_HIGH
Function CallingSupportedSupportedSupported (including streaming)
Web searchSupportedSupportedSupported
Code executionSupportedSupportedSupported
Structured outputSupportedSupportedSupported
LatencyLowLowestHigher (when thinking deeply)
Best forHigh-frequency chat, fast responses, cost-sensitive useHigh-throughput economical workloads, simple reasoningComplex reasoning, code generation, multi-step planning, advanced analysis

1.8 Notes

  1. Model names are case-sensitive. Use exactly Gemini-3.5-Flash, Gemini-3.1-Flash and Gemini-3.1-Pro
  2. For Gemini-3.1-Pro, the thinking level (thinking_level) cannot be combined with the legacy thinking_budget, otherwise a 400 error is returned; Gemini-3.1-Flash does not support thinking configuration
  3. When streaming, thinking content is returned before text content, so clients must handle it correctly
  4. Web search (googleSearch) and code execution (codeExecution) are enabled through specially named Function Calling tools
  5. Safety settings are configured automatically by the platform; no manual setup is needed
  6. Gemini strictly validates the MIME types of images and files; unsupported formats return an error

2. Claude Models

2.1 Supported Models

ModelDescriptionHighlights
Claude-Fable-5Anthropic Claude Fable 5Latest flagship model with strong reasoning, coding and multimodal capabilities; supports web search
Claude-Opus-5Anthropic Claude Opus 5Built for complex agentic coding and enterprise tasks, with strong long-horizon agent abilities
Claude-Opus-4.8Anthropic Claude Opus 4.8Latest Opus model, strong performance, supports caching
Claude-Opus-4.7Anthropic Claude Opus 4.7Opus 4.7 flagship reasoning model; parameters such as temperature must be cleared when extended thinking is on
Claude-Opus-4.6Anthropic Claude Opus 4.6Opus 4.6 flagship reasoning model, supports adaptive thinking
Claude-Sonnet-5Anthropic Claude Sonnet 5Upgrade over Sonnet 4.6 at the same price, with significantly better coding and agent performance
Claude-Sonnet-4.6Anthropic Claude Sonnet 4.6Cost-effective model balancing speed and quality

2.2 Endpoints

Claude models support two endpoint styles:

Chat Completions

text
POST https://token.bytomdao.com/v1/chat/completions

Messages (native Anthropic format, recommended)

text
POST https://token.bytomdao.com/v1/messages

The 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

ParameterTypeRequiredDefaultDescription
modelstringYes—Model name, such as Claude-Sonnet-4.6
messagesarrayYes—Conversation messages; role can be system, user, assistant or tool
max_tokensintegerNoModel defaultMaximum number of output tokens
temperaturenumberNo1.0Sampling randomness, range 0.0 – 1.0
top_pnumberNo—Nucleus sampling threshold, range 0.0 – 1.0
top_kintegerNo—Top-K sampling
streambooleanNofalseEnable streaming output (SSE)
stopstring / arrayNo—Stop sequences, up to 4
toolsarrayNo—Tool definitions (Function Calling)
tool_choicestring / objectNoautoTool selection strategy: auto, any, none, or {"type":"tool","name":"..."}
parallel_tool_callsbooleanNotrueWhether to allow parallel tool calls
response_formatobjectNo—Output format control: { "type": "json_object" }

Extended thinking parameters

Control the thinking depth with the reasoning_effort parameter:

ValueDescription
"low"Low thinking budget (1280 tokens)
"medium"Medium thinking budget (2048 tokens)
"high"High thinking budget (4096 tokens)

Enable web search with the web_search_options parameter:

json
{
  "web_search_options": {
    "search_context_size": "medium"
  }
}

search_context_size values:

ValueDescription
"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:

TypeExample
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

bash
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)

bash
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

bash
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

bash
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

bash
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)

bash
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:

json
{
  "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:

json
{
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Final output text...",
        "reasoning_content": "Thinking process..."
      },
      "finish_reason": "end_turn"
    }
  ]
}

2.6 Model Comparison

FeatureClaude-Fable-5Claude-Opus-5Claude-Opus-4.8Claude-Opus-4.7Claude-Opus-4.6Claude-Sonnet-5Claude-Sonnet-4.6
PositioningLatest flagshipAgentic coding flagshipLatest OpusOpus flagshipOpus flagshipCost-effective upgradeCost-effective
Extended thinkingSupportedSupportedSupportedSupportedSupportedSupported-
adaptive thinking---SupportedSupported--
Web searchSupportedSupportedSupportedSupportedSupportedSupportedSupported
Image understandingSupportedSupportedSupportedSupportedSupportedSupportedSupported
Function CallingSupportedSupportedSupportedSupportedSupportedSupportedSupported
StreamingSupportedSupportedSupportedSupportedSupportedSupportedSupported
Structured outputSupportedSupportedSupportedSupportedSupportedSupportedSupported
CachingSupportedSupportedSupported--Supported-
LatencyMediumMediumMediumHigherHigherLowLow

2.7 Notes

  1. Model names are case-sensitive. Use exactly the names shown in the tables
  2. When extended thinking is enabled, Claude-Opus-4.7 automatically clears temperature, top_p and top_k (Opus 4.7 rejects these parameters in thinking mode)
  3. For extended thinking, budget_tokens must be >= 1024 and less than max_tokens
  4. Web search (web_search_options) is a top-level parameter, not a tool inside the tools array
  5. Prompt caching applies automatically to the system prompt; no manual setup is needed
  6. Image inputs are automatically converted to Base64 before being sent upstream

3. GPT Models

3.1 Supported Models

ModelDescriptionHighlights
GPT-5.6-SolOpenAI GPT-5.6 SolFrontier model for complex professional work
GPT-5.6-TerraOpenAI GPT-5.6 TerraGPT-5.6 model balancing intelligence and cost
GPT-5.6-LunaOpenAI GPT-5.6 LunaGPT-5.6 model for cost-sensitive workloads
GPT-5.5OpenAI GPT-5.5Latest GPT model with upgraded reasoning, coding and multimodal capabilities
GPT-5.4OpenAI GPT-5.4Flagship reasoning model unifying the Codex and GPT lines, 1M+ context window, supports deep reasoning (reasoning_effort)
GPT-5.4-MiniOpenAI GPT-5.4 MiniLightweight, economical model that is fast and cheap, ideal for high-frequency chat
GPT-OSS-120BOpenAI GPT-OSS 120BOpen-weight 120B model for hard reasoning, long text and programming

3.2 Endpoints

GPT models support two endpoint styles:

Chat Completions (all GPT models)

text
POST https://token.bytomdao.com/v1/chat/completions

Response API (GPT-5.5 only)

text
POST https://token.bytomdao.com/v1/responses

About the Response API: The Response API is OpenAI's next-generation interface. It authenticates with Authorization: Bearer <token>, accepts an input field instead of messages, and returns an output array. 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

bash
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

json
{
  "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

bash
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

ParameterTypeRequiredDefaultDescription
modelstringYes—Model name, such as GPT-5.5
messagesarrayYes—Conversation messages; role can be system, user, assistant or developer
max_tokensintegerNoModel defaultMaximum number of output tokens (Chat Completions format)
max_completion_tokensintegerNo—Maximum number of output tokens (recommended for GPT-5.5)
temperaturenumberNo1.0Sampling randomness, range 0.0 – 2.0
top_pnumberNo—Nucleus sampling threshold, range 0.0 – 1.0
streambooleanNofalseEnable streaming output (SSE)
stopstring / arrayNo—Stop sequences
toolsarrayNo—Tool definitions (Function Calling); also supports special tools such as web_search_preview
tool_choicestring / objectNoautoTool selection strategy: auto, none, required, or a specific function object
parallel_tool_callsbooleanNotrueWhether to allow parallel tool calls
response_formatobjectNo—Output format control: { "type": "json_object" }
seedintegerNo—Random seed for more reproducible results

Reasoning parameters

Control reasoning depth with reasoning_effort:

ValueDescription
"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:

json
{
  "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)

bash
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)

bash
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)

bash
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

bash
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

bash
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

bash
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)

bash
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:

json
{
  "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

ModelPositioningBest for
GPT-5.6-SolFrontier professional modelComplex professional work, intensive reasoning
GPT-5.6-TerraBalanced intelligence and costGeneral tasks balancing quality and cost
GPT-5.6-LunaCost-sensitiveHigh-frequency, cost-sensitive workloads
GPT-5.5Latest all-round modelGeneral chat, reasoning, coding, multimodal
GPT-5.4Flagship reasoning model (1M+ context)Complex reasoning, coding, long-document analysis
GPT-5.4-MiniLightweight, economical modelHigh-frequency chat, simple tasks
GPT-OSS-120BOpen-weight 120B modelHard 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

  1. Model names are case-sensitive. Use exactly the names shown in the tables
  2. reasoning_effort accepts none, low, medium, high and xhigh; some models may not support every level
  3. Web search is enabled with type: "web_search_preview" in tools, not in the function-calling format
  4. max_completion_tokens is the recommended output limit parameter for GPT-5.5; max_tokens is also supported
  5. Prompt caching applies automatically; no manual setup is needed
  6. 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

ModelDescriptionHighlights
Grok-4.5xAI Grok 4.5Handles 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

text
POST https://token.bytomdao.com/v1/chat/completions

Messages (native Anthropic format, works with every model)

text
POST https://token.bytomdao.com/v1/messages

The Messages endpoint is shared by all models. See Common Endpoints above for general notes and examples.

4.3 Request Parameters (Chat Completions)

Common parameters

ParameterTypeRequiredDefaultDescription
modelstringYes—Model name, such as Grok-4.5
messagesarrayYes—Conversation messages; role can be system, user or assistant
max_tokensintegerNoModel defaultMaximum number of output tokens
temperaturenumberNo1.0Sampling randomness, range 0.0 – 2.0
top_pnumberNo—Nucleus sampling threshold, range 0.0 – 1.0
streambooleanNofalseEnable streaming output (SSE)
stopstring / arrayNo—Stop sequences
toolsarrayNo—Tool definitions (Function Calling)
tool_choicestring / objectNoautoTool selection strategy: auto, none, required, or a specific function object
response_formatobjectNo—Output format control: { "type": "json_object" }
seedintegerNo—Random seed for more reproducible results

Reasoning parameters

Grok-4.5 supports controlling reasoning depth with reasoning_effort:

ValueDescription
"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)

bash
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)

bash
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

bash
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

bash
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:

json
{
  "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

FeatureGrok-4.5
PositioningAgent model for long-horizon complex tasks, good at creative tool use
Deep reasoningSupported (reasoning_effort: low / medium / high)
Function CallingSupported
StreamingSupported
Structured outputSupported
Best forComplex tasks requiring multi-step tool calls, such as software engineering, data science, finance and legal

4.7 Notes

  1. Model names are case-sensitive. Use exactly the names shown in the tables
  2. When reasoning is enabled on Grok-4.5, the response includes a reasoning_content field
  3. 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

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

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

javascript
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

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

javascript
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

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)