Create a model response
OpenAI-compatible Responses API. Provide text or structured input to generate a response with optional tool calling, reasoning, and streaming.
Storage: A response is stored when data store is enabled on the model and store is not false. Continue that chain with previous_response_id, or pass history yourself with previous_input_messages. Retrieve and delete stored responses with GET and DELETE /v1/responses/{response_id}.
Unsupported: background: true is rejected. This endpoint does not support batch requests.
curl --request POST \
--url https://api.synapsai.cloud/v1/responses \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": "<string>",
"instructions": "<string>",
"max_output_tokens": 123,
"max_tool_calls": 123,
"metadata": {},
"logit_bias": {},
"parallel_tool_calls": true,
"prompt": {},
"reasoning": {},
"service_tier": "auto",
"store": false,
"stream": false,
"temperature": 123,
"text": {},
"tool_choice": "auto",
"tools": [
{}
],
"top_logprobs": 0,
"top_p": 123,
"top_k": 123,
"truncation": "disabled",
"skip_special_tokens": true,
"presence_penalty": 123,
"frequency_penalty": 123,
"cache_salt": "<string>",
"repetition_penalty": 123,
"seed": 123,
"stop": "<string>",
"structured_outputs": {},
"chat_template_kwargs": {},
"include": [
"<string>"
],
"previous_input_messages": [
{}
],
"previous_response_id": "<string>",
"background": false
}
'import requests
url = "https://api.synapsai.cloud/v1/responses"
payload = {
"model": "<string>",
"input": "<string>",
"instructions": "<string>",
"max_output_tokens": 123,
"max_tool_calls": 123,
"metadata": {},
"logit_bias": {},
"parallel_tool_calls": True,
"prompt": {},
"reasoning": {},
"service_tier": "auto",
"store": False,
"stream": False,
"temperature": 123,
"text": {},
"tool_choice": "auto",
"tools": [{}],
"top_logprobs": 0,
"top_p": 123,
"top_k": 123,
"truncation": "disabled",
"skip_special_tokens": True,
"presence_penalty": 123,
"frequency_penalty": 123,
"cache_salt": "<string>",
"repetition_penalty": 123,
"seed": 123,
"stop": "<string>",
"structured_outputs": {},
"chat_template_kwargs": {},
"include": ["<string>"],
"previous_input_messages": [{}],
"previous_response_id": "<string>",
"background": False
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"object": "response",
"created_at": 123,
"model": "<string>",
"status": "completed",
"output": [
{
"id": "<string>",
"type": "<string>",
"role": "<string>",
"status": "in_progress",
"content": [
{}
],
"call_id": "<string>",
"name": "<string>",
"arguments": "<string>"
}
],
"output_text": "<string>",
"instructions": "<string>",
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
},
"error": {
"code": "<string>",
"message": "<string>"
},
"incomplete_details": {
"reason": "max_output_tokens"
}
}Body
Request body for the OpenAI-compatible Responses API. The primary input field is input.
Text output configuration, including structured output format via text.format.
Response
Model response
OpenAI-compatible response object returned by the Responses API.
curl --request POST \
--url https://api.synapsai.cloud/v1/responses \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": "<string>",
"instructions": "<string>",
"max_output_tokens": 123,
"max_tool_calls": 123,
"metadata": {},
"logit_bias": {},
"parallel_tool_calls": true,
"prompt": {},
"reasoning": {},
"service_tier": "auto",
"store": false,
"stream": false,
"temperature": 123,
"text": {},
"tool_choice": "auto",
"tools": [
{}
],
"top_logprobs": 0,
"top_p": 123,
"top_k": 123,
"truncation": "disabled",
"skip_special_tokens": true,
"presence_penalty": 123,
"frequency_penalty": 123,
"cache_salt": "<string>",
"repetition_penalty": 123,
"seed": 123,
"stop": "<string>",
"structured_outputs": {},
"chat_template_kwargs": {},
"include": [
"<string>"
],
"previous_input_messages": [
{}
],
"previous_response_id": "<string>",
"background": false
}
'import requests
url = "https://api.synapsai.cloud/v1/responses"
payload = {
"model": "<string>",
"input": "<string>",
"instructions": "<string>",
"max_output_tokens": 123,
"max_tool_calls": 123,
"metadata": {},
"logit_bias": {},
"parallel_tool_calls": True,
"prompt": {},
"reasoning": {},
"service_tier": "auto",
"store": False,
"stream": False,
"temperature": 123,
"text": {},
"tool_choice": "auto",
"tools": [{}],
"top_logprobs": 0,
"top_p": 123,
"top_k": 123,
"truncation": "disabled",
"skip_special_tokens": True,
"presence_penalty": 123,
"frequency_penalty": 123,
"cache_salt": "<string>",
"repetition_penalty": 123,
"seed": 123,
"stop": "<string>",
"structured_outputs": {},
"chat_template_kwargs": {},
"include": ["<string>"],
"previous_input_messages": [{}],
"previous_response_id": "<string>",
"background": False
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"object": "response",
"created_at": 123,
"model": "<string>",
"status": "completed",
"output": [
{
"id": "<string>",
"type": "<string>",
"role": "<string>",
"status": "in_progress",
"content": [
{}
],
"call_id": "<string>",
"name": "<string>",
"arguments": "<string>"
}
],
"output_text": "<string>",
"instructions": "<string>",
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
},
"error": {
"code": "<string>",
"message": "<string>"
},
"incomplete_details": {
"reason": "max_output_tokens"
}
}