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-YourAccessToken
The key value is your HAI Gateway Personal Access Token (starting with sk-pat-). No separate API key from OpenAI is required.
Base URL
Body Parameters
The request body format is fully compatible with the official OpenAI Responses API. For detailed parameter descriptions, refer to the OpenAI official documentation.
Prefer the Responses API
Responses is OpenAI's next-generation API with more consistent support for tool calling, structured outputs, and multimodal capabilities. We recommend using it as your first choice.
cURL
curl https://api.hai.network/openai/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-pat-YourAccessToken" \
-d '{
"model": "gpt-5.4-2026-03-05",
"input": "Tell me a three sentence bedtime story about a unicorn."
}'