POST /v1/responses
テキスト、ツール、ホスト型 Web 検索、および Codex CLI 用の OpenAI Responses 互換エンドポイント。
POST /v1/responses
リクエスト
curl https://api.model-gate.com/v1/responses \
-H "Authorization: Bearer mg_live_..." \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.4",
"input": [
{
"role": "user",
"content": [{"type": "input_text", "text": "Summarize the release."}]
}
],
"stream": false
}'
応答
{
"id": "resp_example",
"object": "response",
"status": "completed",
"model": "gpt-5.4",
"output": [
{
"type": "message",
"role": "assistant",
"content": [{"type": "output_text", "text": "The release adds synchronized documentation and model aliases."}]
}
],
"usage": {
"input_tokens": 18,
"output_tokens": 14,
"total_tokens": 32
}
}
ホスト型 Web 検索
追加:
{
"tools": [{"type": "web_search"}],
"tool_choice": "required",
"include": ["web_search_call.action.sources"]
}
個別にサポートされるものはありません /v1/web-search 契約。レスポンス API ツールを使用します。
非同期
"async": true でのみサポートされています "stream": false。