1. Chat
PeakkAI-Doc
English
  • 中文
  • English
  • 首页
  • English
    • Home Page
    • PeakkAI-API
      • Model
        • Native OpenAI Format
        • Native Gemini Format
      • Chat
        • Native OpenAI Format
          POST
        • Native Gemini Format
          POST
        • Native Claude Format
          POST
        • Responses Request (openai)
          POST
      • Audio
        • Native OpenAI Format TTS
        • Native Gemini Format TTS
      • Images
        • Native OpenAI Format Image Editing (JSON)
        • Native OpenAI Format Image Generation
        • Native OpenAI Format Image Editing (Multipart)
        • Native Gemini Format Image Generation
      • Video
        • Seedance2.0 format
          • Create Video Generation Task
          • Query Video Generation Task Status
      • Vector
        • Embeddings
          • Create Embedding
      • Translation
        • Speech Translation
    • AI application
      • PeakkAI API Integration with Claude Code
      • PeakkAI API Integration with Cursor
      • PeakkAI API Integration with Codex-cli
      • PeakkAI API Integration with Codex Desktop
      • PeakkAI API Integration with Hermes Agent
  1. Chat

Responses Request (openai)

POST
/v1/responses

📘 API Introduction (OpenAI Native)#

Responses API is a next-generation conversational interface introduced by OpenAI, specifically designed for reasoning models (GPT-5 series) and advanced capabilities.
Compared to the traditional Chat Completions API, the Responses API offers:
Finer reasoning control
Built-in tool calling capabilities (Tools)
Support for multimodal inputs (Text / Images / Files)

🎯 Applicable Scenarios#

🧠 Reasoning-Intensive Tasks#

Suitable for scenarios requiring complex reasoning (such as the GPT-5 series models).

🌐 Requires Web Search#

Features a built-in Web Search Preview tool to support real-time information retrieval.

🛠️ Advanced Tool Calling#

Supports the following capabilities:
Function Call
Custom Tool Call

🔄 Multi-turn Conversation Continuation#

Maintains context using previous_response_id to achieve conversation continuity.

🔐 Authentication#

All requests must be authenticated via a Bearer Token.

Header Example#

请求参数

Authorization
Bearer Token
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
or
Header 参数

Body 参数application/json

示例
{
    "model": "GPT-5.2-Chat",
    "input": [
        {
            "role": "system",
            "content": "You are a rigorous assistant."
        },
        {
            "role": "user",
            "content": "Translate: Hello World"
        }
    ],
    "maxOutputTokens": 120
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://api.peakkai.ai/v1/responses' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "model": "GPT-5.2-Chat",
    "input": [
        {
            "role": "system",
            "content": "You are a rigorous assistant."
        },
        {
            "role": "user",
            "content": "Translate: Hello World"
        }
    ],
    "maxOutputTokens": 120
}'

返回响应

🟢200
application/json
Bodyapplication/json

示例
{
    "error": {
        "message": "string",
        "type": "string",
        "param": "string",
        "code": "string"
    }
}
🟠400
🔴500
修改于 2026-11-02 09:46:28
上一页
Native Claude Format
下一页
Native OpenAI Format TTS
Built with