Get your free API key
Start with 10,000 Monthly Token Limit on our Free Plan. No credit card required. Your tokens automatically reset on the 1st of each month.
User input (string or conversation array).
Maximum tokens in response (≥1).
Alias for max_output_tokens (deprecated, use max_output_tokens).
System instructions/prompt.
Sampling temperature (0.0-1.0).
Nucleus sampling (0.0-1.0).
Enable streaming response.
Available function/tool definitions.
tool_choice
string/object
default:"auto"
Tool selection strategy.
Enable parallel tool execution.
Truncation strategy: “auto” or “disabled”.
End-user identifier for tracking.
Custom metadata (max 16 key-value pairs).
Store conversation in database.
Previous response ID for conversation continuation.
Text output format configuration.
Reasoning configuration (effort: “low”, “medium”, “high”).
Returns
Response ID (format: resp_ + 48 hex chars).
Unix timestamp (seconds).
“completed”, “failed”, “incomplete”, “in_progress”, “cancelled”, “queued”.
Error details if status is “failed”.
Reason if status is “incomplete”.
Echoed instructions parameter.
Echoed max output tokens.
Model used for generation.
Array of output items (messages, function calls, etc.).
Whether parallel tool calls are enabled.
Previous response ID if continuation.
Reasoning effort and summary.
Whether conversation was stored.
Text format configuration.
Nucleus sampling parameter.
Detailed token usage.
Cached, text, and audio token breakdown.
Reasoning, text, and audio token breakdown.
User identifier if provided.
Custom metadata if provided.
Return Examples
{
"id": "resp_67ccd2bed1ec8190b14f964abc0542670bb6a6b452d3795b",
"object": "response",
"created_at": 1741476542,
"status": "completed",
"error": null,
"incomplete_details": null,
"instructions": null,
"max_output_tokens": 1024,
"model": "nusantara-base",
"output": [
{
"type": "message",
"id": "msg_abc123...",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Hello! I'm doing well, thank you for asking.",
"annotations": []
}
]
}
],
"parallel_tool_calls": true,
"previous_response_id": null,
"reasoning": {
"effort": null,
"summary": null
},
"store": true,
"temperature": 0.7,
"text": {
"format": {
"type": "text"
}
},
"tool_choice": "auto",
"tools": [],
"top_p": 1.0,
"truncation": "disabled",
"usage": {
"input_tokens": 15,
"input_tokens_details": {
"cached_tokens": 0,
"text_tokens": 15,
"audio_tokens": 0
},
"output_tokens": 12,
"output_tokens_details": {
"reasoning_tokens": 0,
"text_tokens": 12,
"audio_tokens": 0
},
"total_tokens": 27
},
"user": null,
"metadata": {}
}