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.
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.
The maximum number of tokens that can be generated in the response
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
The type of tool
function The name of the function to be called
The parameters the function accepts
Show child attributes
The type of the parameters object
object The parameters the function accepts, described as a JSON Schema object
List of required parameter names
Whether to allow properties not defined in the schema
A description of what the function does
Whether to enable strict schema adherence when generating function calls
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 model used to generate the response
The list of output items generated by the model
An assistant message output
Show child attributes
The unique identifier for this message
The type of output item
message The role of the message author
assistant The status of the message
in_progress, completed, incomplete, failed The content parts of the message
Show child attributes
The type of content part
output_text The text content
Annotations in the text such as citations
An annotation in the output text
Show child attributes
url_citation The start index of the citation in the text
The end index of the citation in the text
The URL being cited
The title of the cited resource
Log probabilities of the output tokens if requested
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
Number of tokens in the input
Number of tokens in the generated output
Total number of tokens used in the request (input + output)
Breakdown of output token usage
Show child attributes
Number of tokens used for reasoning (o3 models)
Number of tokens generated by automatic prediction that were accepted
Number of tokens generated by automatic prediction that were rejected
Controls which (if any) tool is called by the model
none, auto, required A function tool definition
Show child attributes
The type of tool
function The name of the function to be called
The parameters the function accepts
Show child attributes
The type of the parameters object
object The parameters the function accepts, described as a JSON Schema object
List of required parameter names
Whether to allow properties not defined in the schema
A description of what the function does
Whether to enable strict schema adherence when generating function calls
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?