1. OpenAI
BCL AI
  • 快速开始
    • 平台简介
    • 控制台(入门)
    • API key
    • Base URL
  • 开发工具接入
    • OpenClaw
    • Claude Code
    • Claude Code IDE
    • Codex
    • Gemini CLI
    • 其他工具
  • 大模型API
    • OpenAI
      • Responses(聊天)
        POST
      • Chat(聊天)
        POST
    • Anthropic
      • 聊天
      • 聊天 (流式返回)
    • 谷歌Gemini
      • 文本生成
      • 文本生成-流式
      • 图片生成
  1. OpenAI

Responses(聊天)

POST
/v1/responsesd
官方API文档
部分OpenAI模型仅支持Response格式,例如o3-pro,codex-mini-latest

请求参数

Header 参数

Body 参数application/json必填

示例
{
    "model": "codex-mini-latest",
    "input": [
        {
            "role": "user",
            "content": "hello"
        }
    ]
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location 'https://ai-router.bcltech.net/v1/responsesd' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
    "model": "codex-mini-latest",
    "input": [
        {
            "role": "user",
            "content": "hello"
        }
    ]
}'

返回响应

🟢200成功
application/json
Bodyapplication/json

示例
{
    "background": false,
    "completed_at": 1769409393,
    "content_filters": [
        {
            "blocked": false,
            "content_filter_offsets": {
                "check_offset": 0,
                "end_offset": 35,
                "start_offset": 30
            },
            "content_filter_raw": null,
            "content_filter_results": {
                "hate": {
                    "filtered": false,
                    "severity": "safe"
                },
                "jailbreak": {
                    "detected": false,
                    "filtered": false
                },
                "self_harm": {
                    "filtered": false,
                    "severity": "safe"
                },
                "sexual": {
                    "filtered": false,
                    "severity": "safe"
                },
                "violence": {
                    "filtered": false,
                    "severity": "safe"
                }
            },
            "source_type": "prompt"
        },
        {
            "blocked": false,
            "content_filter_offsets": {
                "check_offset": 0,
                "end_offset": 0,
                "start_offset": 0
            },
            "content_filter_raw": null,
            "content_filter_results": {},
            "source_type": "completion"
        }
    ],
    "created_at": 1769409387,
    "id": "resp_0a22d4ee0ae1e8ee0069770b6bf7e48194aa8ffb926d74ab09",
    "incomplete_details": null,
    "instructions": null,
    "max_output_tokens": null,
    "max_tool_calls": null,
    "metadata": {},
    "model": "o3-pro",
    "object": "response",
    "output": [
        {
            "id": "rs_0a22d4ee0ae1e8ee0069770b71d974819490d66a69f1fa218b",
            "summary": [],
            "type": "reasoning"
        },
        {
            "content": [
                {
                    "annotations": [],
                    "logprobs": [],
                    "text": "Hello! How can I help you today?",
                    "type": "output_text"
                }
            ],
            "id": "msg_0a22d4ee0ae1e8ee0069770b71dc7881949014563401b87f7d",
            "role": "assistant",
            "status": "completed",
            "type": "message"
        }
    ],
    "parallel_tool_calls": true,
    "previous_response_id": null,
    "prompt_cache_key": null,
    "prompt_cache_retention": null,
    "reasoning": {
        "effort": "medium",
        "summary": null
    },
    "safety_identifier": null,
    "service_tier": "default",
    "status": "completed",
    "store": true,
    "temperature": 1,
    "text": {
        "format": {
            "type": "text"
        },
        "verbosity": "medium"
    },
    "tool_choice": "auto",
    "tools": [],
    "top_logprobs": 0,
    "top_p": 1,
    "truncation": "disabled",
    "usage": {
        "input_tokens": 7,
        "input_tokens_details": {
            "cached_tokens": 0
        },
        "output_tokens": 15,
        "output_tokens_details": {
            "reasoning_tokens": 0
        },
        "total_tokens": 22
    },
    "user": null
}
修改于 2026-06-30 07:26:29
上一页
大模型API
下一页
Chat(聊天)
Built with