Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

Infercom API Key

Body

application/json

Response creation parameters

Request body for creating a model response.

model
string
required

The model ID to use (e.g., MiniMax-M2.7, gpt-oss-120b).

Example:

"MiniMax-M2.7"

input
required

Plain text input (equivalent to a user message).

instructions
string | null

System message prepended to input.

stream
boolean
default:false

If true, stream response as Server-Sent Events.

max_output_tokens
integer | null

Maximum tokens to generate.

temperature
number
default:0.7

Randomness control (0-2).

Required range: 0 <= x <= 2
top_p
number
default:1

Nucleus sampling cutoff (0-1).

Required range: 0 <= x <= 1
top_k
integer | null

Top-K sampling (1-100).

Required range: 1 <= x <= 100
tools
Response Tool · object[] | null

Function tools available to the model (max 128).

Maximum array length: 128
tool_choice

Controls how the model uses tools.

Available options:
none,
auto,
required
parallel_tool_calls
boolean
default:true

Allow multiple tool calls in parallel.

text
Text · object

Response format configuration.

reasoning
Reasoning · object | null

Reasoning configuration for supported models.

user
string | null

User identifier (echoed in response).

Response

Successful response. Returns a ResponseResponse object (non-streaming), or a stream of Server-Sent Events (when stream: true).

Response object from POST /responses.

id
string
required

Unique response identifier.

object
enum<string>
required

Object type, always "response".

Available options:
response
status
enum<string>
required

Response lifecycle status.

Available options:
completed,
failed,
in_progress,
incomplete
created_at
integer
required

Unix timestamp when created.

model
string
required

Model ID used.

output
(Response Message · object | Response Function Call · object | Response Output Reasoning · object)[]
required

Output items (messages, reasoning, function calls).

An output item in the response (message, reasoning, or function_call).

completed_at
integer | null

Unix timestamp when completed.

usage
Response Usage · object

Token usage statistics for the response.

error
object | null

Error details when status is "failed".

instructions
string | null

Echoed system instructions.

temperature
number | null
top_p
number | null
tools
Response Tool · object[]
tool_choice

Controls how the model uses tools.

Available options:
none,
auto,
required
parallel_tool_calls
boolean
text
object
reasoning
object | null
store
boolean

Always false (stateless API).

service_tier
string | null