Responses

Generate responses while also allowing for the utilization of various tools.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
modelstringRequired
The AI model to use for generating responses.
inputstring or list of objectsRequired
instructionsstringOptional

A system (or developer) message inserted into the model’s context.

max_output_tokensintegerOptional
The maximum number of tokens in the generated output.
max_tool_callsintegerOptional
The maximum amount of tool calls the model is able to do.
parallel_tool_callsbooleanOptional
Whether to enable parallel function calling during tool use.
reasoningobjectOptional
Constrains effort on reasoning for reasoning models.
streambooleanOptional
Whether to stream back the model response. Not currently supported.
stream_optionsobjectOptional
Extra parameters used when streaming the response.
temperaturedoubleOptional

The temperature parameter for controlling randomness in completions. Supports a range of 0.0-2.0.

tool_choicestring or objectOptional
toolslist of objectsOptional
The content of the tool call.
top_pdoubleOptional

The diversity of the generated text based on nucleus sampling. Supports a range of 0.0-1.0.

safeguardsobjectOptional
Safeguards to run on the request.

Response

Successful response.
idstring
Unique ID for the chat completion.
objectstring

Type of object (chat completion).

created_atinteger
Timestamp of when the chat completion was created.
statusstring
The status of the request.
max_tool_callsinteger

The max_tool_calls specified in the request.

modelstring
The chat model used for generating completions.
outputlist of objects
The set of result outputs.
instructionsstring
The instructions entered in the request input.
max_output_tokensinteger

The max_output_tokens value entered in the request input.

parallel_tool_callsinteger

The parallel_tool_calls value entered in the request input.

temperaturedouble
The temperature value entered in the request input.

Errors

400
Bad Request Error
403
Forbidden Error