OpenAI
OpenAI Responses
Creates a model response. Provide text or image inputs to generate text or JSON outputs.
POST
v1/responsesAuthorizations
Authorizationstringheaderrequired
Use the following format for authentication: Bearer sk-pat-您的AccessToken
密钥的值使用HAI Gateway的个人访问令牌(以 sk-pat- 开头),无需在OpenAI处单独申请 API Key。
Base URL
Body 参数
请求体格式与 OpenAI 官方 Responses API 完全一致,详细参数说明请参考 OpenAI 官方文档。
优先选择 Responses API
Responses 是 OpenAI 新一代接口,工具调用、结构化输出、多模态等能力更一致,推荐优先使用。
cURL
curl https://api.hai.network/openai/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-pat-您的Access Token" \
-d '{
"model": "gpt-5.4-2026-03-05",
"input": "Tell me a three sentence bedtime story about a unicorn."
}'