Generates a model response for the given input. Supports both non-streaming and SSE streaming responses via the OpenAI Responses API format. Inject a Mavera persona via persona_id to prepend a curated system prompt.
When stream: true, the response is a series of named text/event-stream Server-Sent Events (e.g. response.created, response.output_text.delta, response.completed). The stream ends with data: [DONE].
curl -X POST https://app.mavera.io/api/v1/responses \
-H "Authorization: Bearer mvra_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"model": "mavera-1",
"persona_id": "YOUR_PERSONA_ID",
"input": "Explain quantum computing in simple terms."
}'{
"id": "resp_abc123def456abc123def456",
"object": "response",
"created_at": 1706345678,
"status": "completed",
"model": "mavera-1",
"output": [
{
"id": "msg_abc123def456",
"type": "message",
"role": "assistant",
"status": "completed",
"content": [
{
"type": "output_text",
"text": "Quantum computing uses qubits that can exist in multiple states simultaneously, enabling processing of many possibilities at once."
}
]
}
],
"usage": {
"input_tokens": 42,
"output_tokens": 68,
"total_tokens": 110,
"credits_used": 3
}
}API key prefixed with mvra_live_. Create keys at Settings > Developer > API Keys.
Model ID to use for the response.
mavera-1 "mavera-1"
The input to the model. Can be a simple string for single-turn requests, or an array of input items for multi-turn conversations with tool calls.
100000"Explain quantum computing in simple terms."
Required. A Mavera persona CUID. The persona's curated system prompt is prepended to the conversation. Use GET /api/v1/personas to list available personas.
"clx1abc2d0001abcdef123456"
Optional system-level instructions to guide the model's behavior. Appended to the persona system prompt.
"Always respond in bullet points."
If true, responses are streamed as named Server-Sent Events (SSE). The stream ends with data: [DONE].
false
Output format configuration. Replaces the legacy response_format field.
Show child attributes
A list of tools (functions) the model may call. Uses the flat Responses API format — name and parameters are directly on the tool object.
64Show child attributes
[
{
"type": "function",
"name": "get_weather",
"description": "Get the current weather for a city",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "The city name"
}
},
"required": ["city"]
}
}
]Controls which tool is called. auto (default) lets the model decide, none disables tools, required forces tool use, or { type: 'function', name: 'fn' } forces a specific function.
auto, none, required "auto"
If true, returns structured analysis including emotional metrics, biases, confidence scores, and news relevance. Cannot be used with text.format.
false
If true, enables artifact generation mode. The AI will generate structured content wrapped in <artifact> tags.
false
Controls reasoning depth. high produces more thorough responses at the cost of latency.
low, medium, high "medium"
Controls response detail. low for concise, high for comprehensive.
low, medium, high "medium"
The ID of a prior response to continue. Currently accepted but has no effect — pass full conversation history via input instead.
"resp_abc123def456"
Whether to store the response. Currently accepted but has no effect.
Successful response. Returns a response object with the model-generated output and credit cost.
A completed response object.
Unique response ID with resp_ prefix.
"resp_abc123def456abc123def456"
Always response.
response "response"
Unix timestamp (seconds) when the response was created.
1706345678
Response status.
completed, in_progress, failed "completed"
The model used.
"mavera-1"
Ordered list of output items. Typically a single message item with text, or one or more function_call items when the model wants to call tools.
A message output item.
Show child attributes
Token and credit usage.
Show child attributes
Mavera's built-in server-side tools automatically executed during this request. Only present when server tools were used.
Show child attributes
Structured analysis data. Present when analysis_mode is true.
Show child attributes
Present when text.format.type is json_schema. Contains the parsed JSON object — a convenience field, same data is also in output[0].content[0].text.
{
"sentiment": "positive",
"score": 8.5,
"summary": "Great product"
}curl -X POST https://app.mavera.io/api/v1/responses \
-H "Authorization: Bearer mvra_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"model": "mavera-1",
"persona_id": "YOUR_PERSONA_ID",
"input": "Explain quantum computing in simple terms."
}'{
"id": "resp_abc123def456abc123def456",
"object": "response",
"created_at": 1706345678,
"status": "completed",
"model": "mavera-1",
"output": [
{
"id": "msg_abc123def456",
"type": "message",
"role": "assistant",
"status": "completed",
"content": [
{
"type": "output_text",
"text": "Quantum computing uses qubits that can exist in multiple states simultaneously, enabling processing of many possibilities at once."
}
]
}
],
"usage": {
"input_tokens": 42,
"output_tokens": 68,
"total_tokens": 110,
"credits_used": 3
}
}