POST
/
v1
/
responses
curl -X POST "https://api.applerouter.ai/v1/responses" \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "input": "What is the capital of France?",
    "instructions": "You are a helpful geography assistant."
  }'
{
  "id": "resp_abc123",
  "object": "response",
  "created_at": 1700000000,
  "status": "completed",
  "model": "gpt-4o",
  "output": [
    {
      "type": "message",
      "id": "msg_abc123",
      "status": "completed",
      "role": "assistant",
      "content": [
        {
          "type": "text",
          "text": "The capital of France is Paris."
        }
      ]
    }
  ],
  "usage": {
    "prompt_tokens": 25,
    "completion_tokens": 8,
    "total_tokens": 33
  }
}

Overview

The Responses API provides an alternative way to interact with models, supporting multi-turn conversations, tool calling, and reasoning capabilities.
model
string
required
The model ID to use
input
string | array
Input content - can be a string or an array of messages
instructions
string
Model System Instructions
max_output_tokens
integer
Maximum number of tokens in the response
temperature
number
Sampling Temperature
stream
boolean
Enable Streaming
tools
array
Available Tools for the model
reasoning
object
Reasoning Config containing effort (low/medium/high) and summary
curl -X POST "https://api.applerouter.ai/v1/responses" \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "input": "What is the capital of France?",
    "instructions": "You are a helpful geography assistant."
  }'
{
  "id": "resp_abc123",
  "object": "response",
  "created_at": 1700000000,
  "status": "completed",
  "model": "gpt-4o",
  "output": [
    {
      "type": "message",
      "id": "msg_abc123",
      "status": "completed",
      "role": "assistant",
      "content": [
        {
          "type": "text",
          "text": "The capital of France is Paris."
        }
      ]
    }
  ],
  "usage": {
    "prompt_tokens": 25,
    "completion_tokens": 8,
    "total_tokens": 33
  }
}

Authorizations

Authorization
string
header
required

使用 Bearer Token 认证。格式: Authorization: Bearer sk-xxxxxx

Body

application/json
model
string
required
input

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

instructions
string
max_output_tokens
integer
temperature
number
top_p
number
stream
boolean
tools
object[]
tool_choice
reasoning
object
previous_response_id
string
truncation
enum<string>
Available options:
auto,
disabled

Response

200 - application/json

成功创建响应

id
string
object
string
Example:

"response"

created_at
integer
status
enum<string>
Available options:
completed,
failed,
in_progress,
incomplete
model
string
output
object[]
usage
object