Request Object
A minimal request needs only amodel and input:
Input Formats
Theinput field accepts multiple formats:
String input:
Common Parameters
Full Request Example
- Python
- Node.js
- cURL
Response Object
A successful response looks like this:Key Fields
The
output_text field is a shortcut. For simple text responses, use it directly instead of digging into output[0].content[0].text.Output Item Types
Theoutput array can contain different item types:
Status Values
Accessing the Response Text
The simplest way to get the model’s reply:output array:
function_call item:
Error Responses
Errors follow the same format as Chat Completions:
See the Errors page for the full list and handling guidance.