curl --request POST \
--url https://api.orq.ai/v2/gateway/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": "<string>",
"metadata": {},
"temperature": 1,
"top_p": 0.5,
"previous_response_id": "<string>",
"instructions": "<string>",
"reasoning": {
"effort": "low"
},
"max_output_tokens": 123,
"text": {
"format": {
"type": "text"
}
},
"include": [
"code_interpreter_call.outputs"
],
"parallel_tool_calls": true,
"store": true,
"tools": [
{
"type": "function",
"name": "<string>",
"parameters": {
"type": "object",
"properties": {},
"required": [
"<string>"
],
"additionalProperties": true
},
"description": "<string>",
"strict": true
}
],
"tool_choice": "none",
"stream": false
}
'{
"id": "<string>",
"object": "response",
"created_at": 123,
"status": "completed",
"error": {
"code": "<string>",
"message": "<string>"
},
"incomplete_details": {
"reason": "max_output_tokens"
},
"model": "<string>",
"output": [
{
"id": "<string>",
"type": "message",
"role": "assistant",
"status": "in_progress",
"content": []
}
],
"parallel_tool_calls": true,
"instructions": "<string>",
"output_text": "<string>",
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"input_tokens_details": {
"cached_tokens": 123
},
"output_tokens_details": {
"reasoning_tokens": 123,
"accepted_prediction_tokens": 123,
"rejected_prediction_tokens": 123
}
},
"temperature": 123,
"top_p": 123,
"max_output_tokens": 123,
"previous_response_id": "<string>",
"metadata": {},
"tool_choice": "none",
"tools": [
{
"type": "function",
"name": "<string>",
"parameters": {
"type": "object",
"properties": {},
"required": [
"<string>"
],
"additionalProperties": true
},
"description": "<string>",
"strict": true
}
],
"reasoning": {
"effort": "<string>",
"summary": "<string>"
},
"store": true,
"text": {
"format": {
"type": "text"
}
},
"truncation": "disabled",
"user": "<string>",
"service_tier": "auto",
"background": true,
"top_logprobs": 10,
"logprobs": true
}Creates a model response for the given input.
curl --request POST \
--url https://api.orq.ai/v2/gateway/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": "<string>",
"metadata": {},
"temperature": 1,
"top_p": 0.5,
"previous_response_id": "<string>",
"instructions": "<string>",
"reasoning": {
"effort": "low"
},
"max_output_tokens": 123,
"text": {
"format": {
"type": "text"
}
},
"include": [
"code_interpreter_call.outputs"
],
"parallel_tool_calls": true,
"store": true,
"tools": [
{
"type": "function",
"name": "<string>",
"parameters": {
"type": "object",
"properties": {},
"required": [
"<string>"
],
"additionalProperties": true
},
"description": "<string>",
"strict": true
}
],
"tool_choice": "none",
"stream": false
}
'{
"id": "<string>",
"object": "response",
"created_at": 123,
"status": "completed",
"error": {
"code": "<string>",
"message": "<string>"
},
"incomplete_details": {
"reason": "max_output_tokens"
},
"model": "<string>",
"output": [
{
"id": "<string>",
"type": "message",
"role": "assistant",
"status": "in_progress",
"content": []
}
],
"parallel_tool_calls": true,
"instructions": "<string>",
"output_text": "<string>",
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"input_tokens_details": {
"cached_tokens": 123
},
"output_tokens_details": {
"reasoning_tokens": 123,
"accepted_prediction_tokens": 123,
"rejected_prediction_tokens": 123
}
},
"temperature": 123,
"top_p": 123,
"max_output_tokens": 123,
"previous_response_id": "<string>",
"metadata": {},
"tool_choice": "none",
"tools": [
{
"type": "function",
"name": "<string>",
"parameters": {
"type": "object",
"properties": {},
"required": [
"<string>"
],
"additionalProperties": true
},
"description": "<string>",
"strict": true
}
],
"reasoning": {
"effort": "<string>",
"summary": "<string>"
},
"store": true,
"text": {
"format": {
"type": "text"
}
},
"truncation": "disabled",
"user": "<string>",
"service_tier": "auto",
"background": true,
"top_logprobs": 10,
"logprobs": true
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
ID of the model to use. You can use the List models API to see all of your available models.
The actual user input(s) for the model. Can be a simple string, or an array of structured input items (messages, tool outputs) representing a conversation history or complex input.
Developer-defined key-value pairs that will be included in response objects
Show child attributes
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
0 <= x <= 2An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
0 <= x <= 1The ID of a previous response to continue the conversation from. The model will have access to the previous response context.
Developer-provided instructions that the model should follow. Overwrites the default system message.
Configuration for reasoning models
Show child attributes
The maximum number of tokens that can be generated in the response
Show child attributes
Specifies which (potentially large) fields to include in the response. By default, the results of Code Interpreter and file searches are excluded. Available options:
code_interpreter_call.outputs, computer_call_output.output.image_url, file_search_call.results, message.input_image.image_url, message.output_text.logprobs, reasoning.encrypted_content Whether to enable parallel function calling during tool use.
Whether to store this response for use in distillations or evals.
A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.
A function tool definition
Show child attributes
How the model should select which tool (or tools) to use when generating a response. Can be a string (none, auto, required) or an object to force a specific tool.
none, auto, required Returns a response object or a stream of events.
Represents the completed model response returned when stream is false
The unique identifier for the response
The object type, which is always "response"
response The Unix timestamp (in seconds) of when the response was created
The status of the response
completed, failed, in_progress, incomplete The error that occurred, if any
Show child attributes
Details about why the response is incomplete
Show child attributes
The model used to generate the response
The list of output items generated by the model
An assistant message output
Show child attributes
The instructions provided for the response
A convenience field with the concatenated text from all text content parts
Usage statistics for the response
Show child attributes
Show child attributes
Controls which (if any) tool is called by the model
none, auto, required A function tool definition
Show child attributes
Show child attributes
Show child attributes
Controls how the model handles inputs longer than the maximum token length
auto, disabled A unique identifier representing your end-user
The service tier used for processing the request
auto, default Whether the response was processed in the background
The number of top log probabilities to return for each output token
0 <= x <= 20Whether to return log probabilities of the output tokens
Was this page helpful?