Overview
The Chat Completions API generates AI responses for conversations, enhanced with Mavera’s persona intelligence. It’s fully compatible with OpenAI SDKs — just change the base URL and add apersona_id.
Key Features
Persona Intelligence
Inject specialized personas to get audience-aware responses
OpenAI Compatible
Works with any OpenAI SDK out of the box
Streaming Support
Real-time streaming via Server-Sent Events
Analysis Mode
Get structured insights with confidence scores
Basic Usage
Streaming
Enable real-time streaming for better UX:Analysis Mode
Enable analysis mode for structured insights:- Confidence score (1-10)
- Emotional analysis (valence, arousal, dominance)
- Bias detection (cognitive biases that may affect the response)
- Key insights (structured takeaways)
Image Attachments
Include images for visual analysis:Advanced Options
| Parameter | Type | Description |
|---|---|---|
persona_id | string | ID of the persona to use |
analysis_mode | boolean | Enable structured analysis output |
reasoning_effort | string | "low", "medium", or "high" |
verbosity | string | "low", "medium", or "high" |
stream | boolean | Enable streaming responses |
temperature | number | Randomness (0-2, default 1) |
max_tokens | integer | Maximum tokens in response |
Response Format
Best Practices
Choose the right persona
Choose the right persona
Select personas that match your target audience. A Gen Z persona will respond differently than a B2B Executive persona.
Use system prompts effectively
Use system prompts effectively
Combine persona intelligence with specific system prompts for best results.
Handle streaming properly
Handle streaming properly
Use streaming for long responses to improve perceived latency.
Monitor credit usage
Monitor credit usage
Check
usage.credits_used in responses to track costs.API Reference
See the full API specification