跳转到主要内容
POST
/
v1
/
responses
curl --request POST \
  --url 'https://api.elkapi.com/v1/responses' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "gpt-5.5",
  "input": "今天天气真好,适合出去散步。",
  "temperature": 1,
  "stream": false
}'
{
  "id": "id",
  "object": "response",
  "created_at": 1,
  "status": "completed",
  "model": "gpt-5.5",
  "output": [
    {
      "type": "type",
      "id": "id",
      "status": "status",
      "role": "user",
      "content": "你好,请介绍一下你自己"
    }
  ],
  "usage": {
    "prompt_tokens": 1,
    "completion_tokens": 1,
    "total_tokens": 1,
    "prompt_tokens_details": {
      "cached_tokens": 1,
      "text_tokens": 1,
      "audio_tokens": 1,
      "image_tokens": 1
    },
    "completion_tokens_details": {
      "text_tokens": 1,
      "audio_tokens": 1,
      "reasoning_tokens": 1
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.elkapi.com/llms.txt

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

curl --request POST \
  --url 'https://api.elkapi.com/v1/responses' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "gpt-5.5",
  "input": "今天天气真好,适合出去散步。",
  "temperature": 1,
  "stream": false
}'
{
  "id": "id",
  "object": "response",
  "created_at": 1,
  "status": "completed",
  "model": "gpt-5.5",
  "output": [
    {
      "type": "type",
      "id": "id",
      "status": "status",
      "role": "user",
      "content": "你好,请介绍一下你自己"
    }
  ],
  "usage": {
    "prompt_tokens": 1,
    "completion_tokens": 1,
    "total_tokens": 1,
    "prompt_tokens_details": {
      "cached_tokens": 1,
      "text_tokens": 1,
      "audio_tokens": 1,
      "image_tokens": 1
    },
    "completion_tokens_details": {
      "text_tokens": 1,
      "audio_tokens": 1,
      "reasoning_tokens": 1
    }
  }
}

Authorizations

Authorization
string
必填
所有接口均需要使用 Bearer Token 进行认证。在请求头中添加:
Authorization: Bearer YOUR_API_KEY

Body

model
string
默认值:"gpt-5.5"
必填
示例:gpt-5.5
input
string or array<object>
输入内容,可以是字符串或消息数组
instructions
string
max_output_tokens
integer
temperature
number
top_p
number
stream
boolean
tools
array<object>
tool_choice
string or object
reasoning
object
reasoning.effort
string
可选值:lowmediumhigh
reasoning.summary
string
previous_response_id
string
truncation
string
可选值:autodisabled

Response

id
string
object
string
示例:response
created_at
integer
status
string
可选值:completedfailedin_progressincomplete
model
string
默认值:"gpt-5.5"
示例:gpt-5.5
output
array<object>
output.type
string
output.id
string
output.status
string
output.role
string
output.content
array<object>
output.content.type
string
output.content.text
string
usage
object
usage.prompt_tokens
integer
提示词 Token 数
usage.completion_tokens
integer
补全 Token 数
usage.total_tokens
integer
总 Token 数
usage.prompt_tokens_details
object
usage.prompt_tokens_details.cached_tokens
integer
usage.prompt_tokens_details.text_tokens
integer
usage.prompt_tokens_details.audio_tokens
integer
usage.prompt_tokens_details.image_tokens
integer
usage.completion_tokens_details
object
usage.completion_tokens_details.text_tokens
integer
usage.completion_tokens_details.audio_tokens
integer
usage.completion_tokens_details.reasoning_tokens
integer