Generates a model response for the given conversation. Supports both non-streaming and SSE streaming responses. Optionally inject a Mavera persona via persona_id to prepend a curated system prompt to the conversation.
When stream: true, the response is a series of text/event-stream Server-Sent Events, each containing a chat.completion.chunk JSON object. The final event is [DONE].
API key prefixed with mvra_live_. Create keys at Settings > Developer > API Keys.
Model ID to use for completion.
mavera-1 "mavera-1"
A list of messages comprising the conversation so far. Must contain between 1 and 128 messages.
1 - 128 elements[
{
"role": "user",
"content": "What's in this image?",
"attachments": [
{
"type": "image",
"url": "https://your-bucket.s3.amazonaws.com/image.png"
}
]
}
]Required. A Mavera persona CUID. The persona's curated system prompt is prepended to the conversation, giving the model a specific personality and expertise. Use GET /api/v1/personas to list available personas.
"clx1abc2d0001abcdef123456"
If true, partial message deltas will be sent as Server-Sent Events (SSE). The stream is terminated by a data: [DONE] message.
false
If true, returns structured analysis data including emotional metrics, biases, confidence scores, news relevance, and more.
false
If true, enables artifact generation mode. The AI will generate structured content (code, documents) wrapped in <artifact> tags, suitable for collaborative editing and content creation.
false
Controls how much computational effort the AI uses for reasoning. Higher effort leads to more thorough responses but may take longer.
low, medium, high "medium"
Controls how detailed the AI's responses will be. 'low' for concise, 'high' for comprehensive explanations.
low, medium, high "medium"
Successful chat completion. Returns the model-generated message along with credit cost.
A unique identifier for this completion.
"chatcmpl_abc123def456"
The object type, always chat.completion.
chat.completion "chat.completion"
Unix timestamp (in seconds) of when the completion was created.
1706345678
The model used for this completion.
"mavera-1"
A list of completion choices. Currently always contains a single choice.
Credit cost for this request.
List of tools that were automatically invoked during this request. Only present if tools were used.
Structured analysis data returned when analysis_mode or mosaic_mode is enabled. Contains emotional metrics, biases, confidence scores, news relevance, and more.