UniAPI API Doc
首页全部OpenAI平台接口音乐模型图像模型视频模型
首页全部OpenAI平台接口音乐模型图像模型视频模型
  1. Responses
  • Audio
    • 文本生成音频
      POST
    • 音频转文本
      POST
    • 创建转录
      POST
  • Chat
    • 聊天接口
      POST
  • Completions
    • 自动补全
      POST
  • Embeddings
    • 向量接口
      POST
  • Images
    • 图像编辑
      POST
    • 图像生成
      POST
    • 图像变体
      POST
  • Models
    • 获取模型列表
      GET
  • Moderations
    • 审核
      POST
  • Responses
    • response
      POST
  1. Responses

response

POST
/v1/responses
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.uniapi.io/v1/responses' \
--header 'Content-Type: application/json' \
--data-raw '{
    "metadata": {
        "property1": "string",
        "property2": "string"
    },
    "temperature": 1,
    "top_p": 1,
    "user": "user-1234",
    "service_tier": "auto",
    "previous_response_id": "string",
    "model": "string",
    "reasoning": {
        "effort": "medium",
        "summary": "auto",
        "generate_summary": "auto"
    },
    "max_output_tokens": 0,
    "instructions": "string",
    "text": {
        "format": {
            "type": "text"
        }
    },
    "tools": [
        {
            "type": "file_search",
            "vector_store_ids": [
                "string"
            ],
            "max_num_results": 0,
            "ranking_options": {
                "ranker": "auto",
                "score_threshold": 0
            },
            "filters": {
                "type": "eq",
                "key": "string",
                "value": "string"
            }
        }
    ],
    "tool_choice": "none",
    "truncation": "disabled",
    "input": "string",
    "include": [
        "file_search_call.results"
    ],
    "parallel_tool_calls": true,
    "store": true,
    "stream": false
}'
响应示例响应示例
{
    "metadata": {
        "property1": "string",
        "property2": "string"
    },
    "temperature": 1,
    "top_p": 1,
    "user": "user-1234",
    "service_tier": "auto",
    "previous_response_id": "string",
    "model": "string",
    "reasoning": {
        "effort": "medium",
        "summary": "auto",
        "generate_summary": "auto"
    },
    "max_output_tokens": 0,
    "instructions": "string",
    "text": {
        "format": {
            "type": "text"
        }
    },
    "tools": [
        {
            "type": "file_search",
            "vector_store_ids": [
                "string"
            ],
            "max_num_results": 0,
            "ranking_options": {
                "ranker": "auto",
                "score_threshold": 0
            },
            "filters": {
                "type": "eq",
                "key": "string",
                "value": "string"
            }
        }
    ],
    "tool_choice": "none",
    "truncation": "disabled",
    "id": "string",
    "object": "response",
    "status": "completed",
    "created_at": 0,
    "error": {
        "code": "server_error",
        "message": "string"
    },
    "incomplete_details": {
        "reason": "max_output_tokens"
    },
    "output": [
        {
            "id": "string",
            "type": "message",
            "role": "assistant",
            "content": [
                {
                    "type": "output_text",
                    "text": "string",
                    "annotations": [
                        {
                            "type": "file_citation",
                            "file_id": "string",
                            "index": 0
                        }
                    ]
                }
            ],
            "status": "in_progress"
        }
    ],
    "output_text": "string",
    "usage": {
        "input_tokens": 0,
        "input_tokens_details": {
            "cached_tokens": 0
        },
        "output_tokens": 0,
        "output_tokens_details": {
            "reasoning_tokens": 0
        },
        "total_tokens": 0
    },
    "parallel_tool_calls": true
}

请求参数

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

示例

返回响应

🟢200成功
application/json
OK
Body

修改于 2025-05-18 07:36:21
上一页
审核
Built with