Skip to main content
POST
Responses

Authentication

All API requests require authentication using a Bearer token. You can obtain your API key from the MatterAI Console.
Keep your API key secure and never expose it in client-side code. Get your API key from the MatterAI console.

Request

string
required
The model used for the response. Available models: "axon-2-5-pro", "axon-2-5-mini".
string or array
required
Text or array of input items to the model, used to generate a response. Accepts a plain string (equivalent to a "user" message) or an array of input items.
string
A system (or developer) message inserted into the model’s context. When used with previous_response_id, instructions from a previous response are not carried over to the next response. Equivalent to the "system" role in chat completions.
integer
default:"512"
An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.
boolean
default:"false"
Whether to stream the response as it’s generated using server-sent events.
object
Configuration for reasoning capabilities.
number
default:"0.1"
Controls randomness in the output. Higher values make output more random, lower values make it more focused and deterministic. Range: 0.0 to 2.0.
number
default:"1"
Controls diversity via nucleus sampling. Range: 0.0 to 1.0.
object
Configuration options for a text response from the model.
boolean
default:"true"
Whether to store the generated model response for later retrieval via API.
object
Set of up to 16 key-value pairs that can be attached to the response. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

Response

string
Unique identifier for this response.
string
The object type, which is always "response".
string
The status of the response generation. One of "completed", "failed", "in_progress", "cancelled", or "incomplete".
integer
Unix timestamp (in seconds) of when this response was created.
string
The model used to generate the response. Available models: "axon-2-5-pro", "axon-2-5-mini".
array
An array of content items generated by the model.
string
SDK-only convenience property containing the aggregated text output from all output_text items in the output array.
object
Usage statistics for the response request.
object
An error object returned when the model fails to generate a response.

Example Request

Example Response

Example: Multi-turn Conversation

To continue a conversation, pass the previous_response_id from the previous response:

Example: With Reasoning

Streaming

When stream is set to true, the API returns a stream of Server-Sent Events (SSE). The streaming events use the OpenAI Responses API format:

Migrating from Chat Completions

The Responses API provides a cleaner interface for text generation. Key differences:

Error Responses

The API returns standard HTTP status codes to indicate success or failure:
Bad Request
Invalid request parameters or malformed JSON.
Unauthorized
Invalid or missing API key.
Rate Limited
Too many requests. Please slow down.
Internal Server Error
Server error. Please try again later.
Example error response: