Skip to main content
POST
/
v1
/
responses
curl -X POST https://www.qingbo.dev/v1/responses \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5",
    "input": "解释一下冒泡排序算法。"
  }'
{
  "id": "resp_09e342953eda0be6006905acbcvoik1nhmezpmzzl7lex552vq",
  "object": "response",
  "created_at": 1761979488,
  "model": "gpt-5-2025-08-07",
  "status": "completed",
  "output": [
    {
      "id": "rs_09e342953eda0be6006905ac62b6f48197aefa292b7dcdd477",
      "type": "reasoning",
      "summary": []
    },
    {
      "id": "msg_09e342953eda0be6006905ac649e0081979f9859a09c70d4db",
      "type": "message",
      "role": "assistant",
      "status": "completed",
      "content": [
        {
          "type": "output_text",
          "text": "一幅温暖的插画:一只灰色虎斑猫正抱着一只带红色围巾的水獭,两只动物都闭着眼微笑,呈现亲密友好的场景。",
          "annotations": [],
          "logprobs": []
        }
      ]
  }
],
"usage": {
    "input_tokens": 642,
    "output_tokens": 184,
    "total_tokens": 826,
    "input_tokens_details": {
      "cached_tokens": 0
    },
    "output_tokens_details": {
      "reasoning_tokens": 128
    }
  },
  "reasoning": {
    "effort": "medium",
    "summary": null
  },
  "temperature": 1,
  "top_p": 1,
  "tool_choice": "auto",
  "tools": [],
  "parallel_tool_calls": true,
  "store": true,
  "service_tier": "default",
  "truncation": "disabled",
  "background": false,
  "content_filters": null,
  "error": null,
  "incomplete_details": null,
  "instructions": null,
  "max_output_tokens": null,
  "max_tool_calls": null,
  "metadata": {},
  "previous_response_id": null,
  "prompt_cache_key": null,
  "safety_identifier": null,
  "text": {
    "format": {
      "type": "text"
    },
    "verbosity": "medium"
  },
  "top_logprobs": 0,
  "user": null
}

Documentation Index

Fetch the complete documentation index at: https://docs.qingbo.dev/llms.txt

Use this file to discover all available pages before exploring further.

  • Fully compatible with the OpenAI Responses API format
  • Supports multimodal input (text and images)
  • Supports tool extensions: web search, file search, function calling, remote MCP
curl -X POST https://www.qingbo.dev/v1/responses \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5",
    "input": "解释一下冒泡排序算法。"
  }'
{
  "id": "resp_09e342953eda0be6006905acbcvoik1nhmezpmzzl7lex552vq",
  "object": "response",
  "created_at": 1761979488,
  "model": "gpt-5-2025-08-07",
  "status": "completed",
  "output": [
    {
      "id": "rs_09e342953eda0be6006905ac62b6f48197aefa292b7dcdd477",
      "type": "reasoning",
      "summary": []
    },
    {
      "id": "msg_09e342953eda0be6006905ac649e0081979f9859a09c70d4db",
      "type": "message",
      "role": "assistant",
      "status": "completed",
      "content": [
        {
          "type": "output_text",
          "text": "一幅温暖的插画:一只灰色虎斑猫正抱着一只带红色围巾的水獭,两只动物都闭着眼微笑,呈现亲密友好的场景。",
          "annotations": [],
          "logprobs": []
        }
      ]
  }
],
"usage": {
    "input_tokens": 642,
    "output_tokens": 184,
    "total_tokens": 826,
    "input_tokens_details": {
      "cached_tokens": 0
    },
    "output_tokens_details": {
      "reasoning_tokens": 128
    }
  },
  "reasoning": {
    "effort": "medium",
    "summary": null
  },
  "temperature": 1,
  "top_p": 1,
  "tool_choice": "auto",
  "tools": [],
  "parallel_tool_calls": true,
  "store": true,
  "service_tier": "default",
  "truncation": "disabled",
  "background": false,
  "content_filters": null,
  "error": null,
  "incomplete_details": null,
  "instructions": null,
  "max_output_tokens": null,
  "max_tool_calls": null,
  "metadata": {},
  "previous_response_id": null,
  "prompt_cache_key": null,
  "safety_identifier": null,
  "text": {
    "format": {
      "type": "text"
    },
    "verbosity": "medium"
  },
  "top_logprobs": 0,
  "user": null
}

Authorizations

Authorization
string
required
All endpoints require Bearer Token authentication.Get your API Key:Visit the API Key management page to obtain your API Key.Add it to the request header:
Authorization: Bearer YOUR_API_KEY

Body

model
string
required
Model name.Supported models include:
  • gpt-5 — GPT-5 base model
  • gpt-5-pro — GPT-5 Pro (this endpoint only)
  • gpt-5-codex — GPT-5 Codex code model (this endpoint only)
  • gpt-5.1-codex — GPT-5.1 Codex code model (this endpoint only)
  • gpt-5.1-codex-mini — GPT-5.1 Codex Mini (this endpoint only)
  • gpt-5.2-codex — GPT-5.2 Codex code model (this endpoint only)
  • gpt-5.3-codex — GPT-5.3 Codex code model (this endpoint only)
  • Plus every model supported by /v1/chat/completions
gpt-5-pro and all Codex models are only available on this endpoint (/v1/responses). They are not supported on /v1/chat/completions.
input
string or array
required
Input content. Accepts a string or an array of messages.A string is treated as plain text input; the array form supports multi-turn conversations and multimodal content:
tools
array
Tool list (optional).Supported tool types:
  • web_search — Web search
  • file_search — File search
  • function — Function calling
  • remote_mcp — Remote MCP service
temperature
number
Controls output randomness, range 0–2.Default: 1.0
max_tokens
integer
Maximum number of tokens to generate.
stream
boolean
Whether to use streaming output.Default: false

Response

id
string
Unique identifier of the response.
object
string
Object type, always response.
created_at
integer
Creation timestamp.
model
string
Name of the model that actually served the request (e.g., gpt-5-2025-08-07).
status
string
Response status.Possible values:
  • completed — Done
  • in_progress — Processing
  • failed — Failed
  • cancelled — Cancelled
output
array
Output content array.
usage
object
Token usage statistics.
reasoning
object
Reasoning configuration (thinking models only).
temperature
number
The sampling temperature actually used.
top_p
number
The nucleus sampling parameter actually used.
tool_choice
string
Tool selection strategy.
tools
array
List of tools used.
parallel_tool_calls
boolean
Whether parallel tool calls are allowed.
store
boolean
Whether the conversation history is stored.
service_tier
string
Service tier.
truncation
string
Truncation strategy.
text
object
Text format configuration.
background
boolean
Whether this is a background task.
error
object
Error info, if any.
metadata
object
Metadata.

Examples

Image analysis

{
  "model": "gpt-5",
  "input": [
    {
      "role": "user",
      "content": [
        {
          "type": "input_text",
          "text": "这张图片里有什么?请详细描述"
        },
        {
          "type": "input_image",
          "image_url": "https://example.com/image.jpg"
        }
      ]
    }
  ]
}

Video analysis

{
  "model": "gemini-2.5-pro",
  "input": [
    {
      "role": "user",
      "content": [
        {
          "type": "input_text",
          "text": "分析一下这个视频的内容"
        },
        {
          "type": "input_video",
          "video_url": "https://example.com/video.mp4"
        }
      ]
    }
  ],
  "max_tokens": 5000
}

Using the web search tool

{
  "model": "gpt-5",
  "tools": [
    {"type": "web_search"}
  ],
  "input": [
    {
      "role": "user",
      "content": [
        {
          "type": "input_text",
          "text": "2025年最新的AI技术趋势是什么?"
        }
      ]
    }
  ]
}

Using function calling

{
  "model": "gpt-5",
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "get_weather",
        "description": "获取城市天气信息",
        "parameters": {
          "type": "object",
          "properties": {
            "city": {
              "type": "string",
              "description": "城市名称,例如:北京"
            }
          },
          "required": ["city"]
        }
      }
    }
  ],
  "input": "北京今天天气怎么样?"
}

Content Types

input_text

Text input. Properties:
  • type: always "input_text"
  • text: text content (string)

input_image

Image input. Properties:
  • type: always "input_image"
  • image_url: image URL or base64-encoded data URI
Supported image formats:
  • JPEG
  • PNG
  • GIF
  • WebP
Image size limits:
  • Max file size: 20MB
  • Recommended resolution: up to 2048x2048 pixels

input_video

Video input (supported by some models). Properties:
  • type: always "input_video"
  • video_url: video URL
Supported video formats:
  • MP4
  • MOV
  • AVI
  • WebM
Video size limits:
  • Max file size: 200MB
  • Max duration: 10 minutes
  • Recommended resolution: 1080p

Tools in Detail

The web search tool gives the model access to real-time information from the internet. Configuration example:
{
  "tools": [{"type": "web_search"}]
}
Use cases:
  • Latest news and current events
  • Real-time data (stocks, weather, exchange rates, etc.)
  • Latest technical docs and references
  • Fact verification
The file search tool lets the model search through documents you have uploaded. Configuration example:
{
  "tools": [{"type": "file_search"}]
}
Use cases:
  • Analyzing internal company documents
  • Searching technical specifications and manuals
  • Querying contracts and legal documents
  • Knowledge-base Q&A systems

Function calling

Define custom functions so the model can call external APIs or perform specific actions. Full configuration example:
{
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "get_stock_price",
        "description": "获取股票的实时价格",
        "parameters": {
          "type": "object",
          "properties": {
            "symbol": {
              "type": "string",
              "description": "股票代码,例如:AAPL"
            },
            "currency": {
              "type": "string",
              "enum": ["USD", "CNY"],
              "description": "货币单位",
              "default": "USD"
            }
          },
          "required": ["symbol"]
        }
      }
    }
  ]
}
Parameters:
  • name: function name (required)
  • description: function description (required)
  • parameters: parameter definitions in JSON Schema format
    • type: parameter type
    • properties: parameter property definitions
    • required: list of required parameters
Use cases:
  • Calling third-party APIs
  • Running database queries
  • Triggering business workflows
  • Integrating with internal systems

Remote MCP

Connect to a remote Model Context Protocol (MCP) service to extend the model’s capabilities. Configuration example:
{
  "tools": [
    {
      "type": "remote_mcp",
      "remote_mcp": {
        "url": "https://your-mcp-server.com/api",
        "auth_token": "your_auth_token",
        "timeout": 30
      }
    }
  ]
}
Parameters:
  • url: MCP server URL (required)
  • auth_token: authentication token (optional)
  • timeout: timeout in seconds, default 30
Use cases:
  • Connecting to enterprise AI services
  • Using domain-specific models
  • Accessing protected data sources
  • Integrating distributed AI systems

Tool Response Format

When the model uses a tool, the response includes tool call information:
{
  "id": "resp-123456",
  "object": "response",
  "created": 1677652288,
  "model": "gpt-5",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": null,
        "tool_calls": [
          {
            "id": "call_abc123",
            "type": "function",
            "function": {
              "name": "get_weather",
              "arguments": "{\"city\": \"北京\"}"
            }
          }
        ]
      },
      "finish_reason": "tool_calls"
    }
  ]
}
Tool call flow:
  1. The model receives user input
  2. Decides whether a tool is needed
  3. If yes, returns a tool call request
  4. The client executes the tool call
  5. The result is returned to the model
  6. The model produces the final response

Notes

  1. Image URL requirements:
    • Must be a publicly accessible URL
    • Or use a base64-encoded data URI
  2. Token billing:
    • Images consume tokens based on resolution
    • High-resolution images are auto-resized to optimize cost
    • Tool calls also consume additional tokens
  3. Content order:
    • The order of items in the content array affects how the model interprets them
    • We recommend placing the text instruction first, followed by images/videos
  4. Multimodal mixing:
    • A single request can mix multiple text and image inputs
    • Multi-turn conversations preserve context
  5. Tool usage limits:
    • When multiple tools are available, the model picks the most appropriate one
    • Function calling requires explicit function and parameter definitions
    • Web search results may be subject to regional and time limits
  6. API compatibility:
    • Fully compatible with the OpenAI Responses API format
    • Existing OpenAI code can be migrated seamlessly
    • Supports all OpenAI tool extensions