Skip to main content
POST
Create a model response
The request and response fields follow the official Responses API format. See the OpenAI API reference for the complete specification.
Use this endpoint for text, image, and file inputs, structured outputs, tool calls, multi-turn conversations, background processing, and streaming responses.

Authorizations

Authorization
string
header
required

You can obtain your API key from the TTAPI Dashboard.

Body

application/json

Request body for the OpenAI-compatible Responses API.

model
string

Model ID used to generate the response. See Supported Models.

Example:

"gpt-5.4-mini"

input

Text, image, or file input to the model. A string is treated as a user message.

Example:

"Explain quantum computing in simple terms."

instructions
string

A system or developer message inserted into the model context. It is not carried over when previous_response_id is used.

previous_response_id
string

ID of the previous response for multi-turn interactions. Cannot be used together with conversation.

conversation

Conversation that this response belongs to.

background
boolean
default:false

Whether to run the response in the background.

include
enum<string>[]

Additional output data to include in the response.

Available options:
file_search_call.results,
web_search_call.results,
web_search_call.action.sources,
message.input_image.image_url,
computer_call_output.output.image_url,
code_interpreter_call.outputs,
reasoning.encrypted_content,
message.output_text.logprobs
max_output_tokens
integer

Maximum number of generated tokens, including visible output and reasoning tokens.

Required range: x >= 1
max_tool_calls
integer

Maximum total number of built-in tool calls processed for this response.

Required range: x >= 1
metadata
object

Up to 16 string key-value pairs attached to the response.

parallel_tool_calls
boolean
default:true

Whether the model may call tools in parallel.

prompt
object

Reference to a reusable prompt template.

prompt_cache_key
string

Stable key used to improve prompt cache hit rates.

prompt_cache_retention
enum<string>

Prompt cache retention policy.

Available options:
in-memory,
24h
reasoning
object

Reasoning configuration for supported models.

safety_identifier
string

Stable identifier for the end user, used for abuse detection.

service_tier
enum<string>
Available options:
auto,
default,
flex,
scale,
priority
store
boolean

Whether to store the generated response for later retrieval.

stream
boolean
default:false

Whether to stream response events using server-sent events.

stream_options
object

Streaming options. Set only when stream is true.

temperature
number

Sampling temperature. Change this or top_p, but generally not both.

Required range: 0 <= x <= 2
text
object
tool_choice

Controls which tool or tools the model may call.

Available options:
none,
auto,
required
tools
object[]

Tools available to the model, including function and supported built-in tools.

top_logprobs
integer
Required range: 0 <= x <= 20
top_p
number
Required range: 0 <= x <= 1
truncation
enum<string>
default:disabled
Available options:
auto,
disabled

Response

Successful response. When stream is true, the endpoint returns server-sent events.

id
string
required
Example:

"resp_67ccd2bed1ec8190b14f964abc0542670bb6a6b452d3795b"

object
string
required
Allowed value: "response"
created_at
number
required
Example:

1741476542

status
enum<string>
required
Available options:
completed,
failed,
in_progress,
cancelled,
queued,
incomplete
model
string
required
output
object[]
required
error
object | null
incomplete_details
object | null
output_text
string
read-only

SDK convenience property containing aggregated text output.

previous_response_id
string | null
store
boolean
usage
object
metadata
object
Last modified on July 15, 2026