Skip to main content
POST
/
chat
/
v1
/
responses
创建响应 (OpenAI Responses API)
curl --request POST \
  --url https://api.mountsea.ai/chat/v1/responses \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "gpt-5.1",
  "input": "Tell me a joke",
  "instructions": "You are a helpful assistant.",
  "stream": false,
  "temperature": 1,
  "max_output_tokens": 1000,
  "top_p": 1,
  "tools": [
    {}
  ],
  "tool_choice": "auto",
  "text": {
    "format": {}
  }
}
'

💡 About

此接口兼容 OpenAI Responses API 格式,这是 OpenAI 推出的新一代 API 格式。适用于:
  • Cherry Studio 等支持 Responses API 格式的客户端
  • 使用 OpenAI SDK 的 responses.create() 方法
  • 需要简化的 input/instructions 参数格式的场景
Base URL: https://api.mountsea.ai/chat,与 OpenAI Chat Completions API 共用相同的 Base URL。

💡 Quick Examples

from openai import OpenAI

client = OpenAI(
    api_key="your-api-key",
    base_url="https://api.mountsea.ai/chat"
)

# Basic response
response = client.responses.create(
    model="gpt-5.1",
    instructions="You are a helpful assistant.",
    input="Hello! What can you help me with?"
)

print(response.output_text)
With message array input:
response = client.responses.create(
    model="gpt-5.1",
    input=[
        {
            "role": "user",
            "content": "Tell me a joke about programming"
        }
    ]
)

print(response.output_text)
Streaming:
stream = client.responses.create(
    model="gpt-5.1",
    instructions="You are a helpful assistant.",
    input="Tell me a story",
    stream=True
)

for event in stream:
    if hasattr(event, 'delta'):
        print(event.delta, end="")

📤 Response Format

Non-streaming Response

{
  "id": "resp_xxx",
  "object": "response",
  "created_at": 1234567890,
  "model": "gpt-5.1",
  "output": [
    {
      "type": "message",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "Hello! I can help you with all sorts of things..."
        }
      ]
    }
  ],
  "usage": {
    "input_tokens": 30,
    "output_tokens": 15,
    "total_tokens": 45
  }
}

📱 Cherry Studio 配置

使用 Cherry Studio 接入 Responses API:
配置项
服务商名称MountSea AI
API 地址https://api.mountsea.ai/chat
API Key你的 API Key
模型名称例如 gpt-5.1claude-sonnet-4-6

🔧 Responses API vs Chat Completions API

特性Chat CompletionsResponses API
端点/v1/chat/completions/v1/responses
输入格式messages 数组input (字符串或数组)
系统提示messages 中 role=systeminstructions 参数
响应格式choices[0].message.contentoutput_text
流式响应
Function Calling
两种 API 格式都能访问所有模型。如果你使用的客户端支持 Chat Completions 格式,推荐使用 Chat Completions。如果客户端使用 Responses 格式(如部分版本的 Cherry Studio),则使用此接口。

🔧 API Reference

The interactive API form below is auto-generated from OpenAPI spec.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
enum<string>
required

模型名称

Available options:
gpt-5.1,
gpt-5.1-all,
gpt-5.1-thinking,
gpt-5.1-thinking-all,
gpt-5.2,
gemini-3-pro,
gemini-2.5-pro,
gemini-2.5-flash,
gemini-3-flash,
gemini-3.1-pro,
claude-4.5,
claude-opus-4-6,
claude-haiku-4-5-20251001,
claude-sonnet-4-6
Example:

"gpt-5.1"

input
required

输入内容,可以是字符串或消息数组

Example:

"Tell me a joke"

instructions
string

系统指令

Example:

"You are a helpful assistant."

stream
boolean

是否流式输出

Example:

false

temperature
number | null

温度 (0-2)

Example:

1

max_output_tokens
number | null

最大输出 token 数

Example:

1000

top_p
number | null

Top P

Example:

1

tools
object[]

工具列表

tool_choice
string

工具选择策略

Example:

"auto"

text
object

文本生成配置

Response

成功