curl --request POST \
--url https://api.aihubmax.com/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-5.4",
"input": "Explain the design principles of RESTful APIs"
}
'{
"id": "resp_abc123",
"object": "response",
"created_at": 1757165031,
"model": "<string>",
"status": "completed",
"output": [
{
"type": "message",
"id": "msg_abc123",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Hello! How can I help you today?"
}
]
}
],
"usage": {
"input_tokens": 20,
"output_tokens": 50,
"total_tokens": 70
}
}{
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"message": "Invalid API key",
"type": "authentication_error"
}
}{
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"message": "Access denied",
"type": "permission_error"
}
}{
"error": {
"message": "Rate limit exceeded",
"type": "rate_limit_error"
}
}{
"error": {
"message": "Internal server error",
"type": "server_error"
}
}Tool Calling
OpenAI Format - Responses
- Generic Responses API reference for all compatible models
- Server-side context storage: use previous_response_id for multi-turn conversations without manually passing history
- Supports streaming and non-streaming responses
- Multimodal input: supports text + image + file mixed input
- Tool calling: supports Function Calling and built-in tools
- Structured output: supports JSON Schema format
POST
/
v1
/
responses
curl --request POST \
--url https://api.aihubmax.com/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-5.4",
"input": "Explain the design principles of RESTful APIs"
}
'{
"id": "resp_abc123",
"object": "response",
"created_at": 1757165031,
"model": "<string>",
"status": "completed",
"output": [
{
"type": "message",
"id": "msg_abc123",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Hello! How can I help you today?"
}
]
}
],
"usage": {
"input_tokens": 20,
"output_tokens": 50,
"total_tokens": 70
}
}{
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"message": "Invalid API key",
"type": "authentication_error"
}
}{
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"message": "Access denied",
"type": "permission_error"
}
}{
"error": {
"message": "Rate limit exceeded",
"type": "rate_limit_error"
}
}{
"error": {
"message": "Internal server error",
"type": "server_error"
}
}Authorizations
All APIs require Bearer Token authentication
Add to request header:
Authorization: Bearer YOUR_API_KEY
Body
application/json
Model name
Example:
"gpt-5.4"
Text input or message list for generating a response
Whether to stream the response
Sampling temperature (0-2)
Required range:
0 <= x <= 2Maximum number of output tokens to generate
Nucleus sampling parameter (0-1)
Required range:
0 <= x <= 1ID of the previous response, used for multi-turn conversations
System-level instructions
Available tools list
Show child attributes
Show child attributes
Text output format configuration
Show child attributes
Show child attributes
Response
Response API success
Unique response ID
Example:
"resp_abc123"
Object type
Available options:
response Creation timestamp
Example:
1757165031
Model used
The status of the response
Available options:
completed, failed, in_progress, incomplete Example:
"completed"
List of output items
Show child attributes
Show child attributes
Token usage statistics
Show child attributes
Show child attributes