Generate Narrative
Convert simulation results into a human-readable narrative explaining the outcome, probability, and key insights.Request Body
Simulation results object containing success probability, percentiles, and statistics
Current financial situation
Financial goal details
Response
Human-readable narrative explaining the simulation results, success probability, and actionable insights
Example
Generate Audio Briefing
Generate both narrative text and audio in a single request.Request Body
Same as/generate-narrative with an optional voice parameter:
Voice to use for audio generation. Options:
rachel, adam, josh, bella, antoni, domiResponse
Human-readable narrative text
Whether audio was generated (false if ElevenLabs not configured)
Base64-encoded MP3 audio (only present if audioAvailable is true)
Always “audio/mpeg”
Voice used for generation
Example
If
ELEVENLABS_API_KEY is not configured, the endpoint returns the narrative text but audioAvailable will be false.Error Responses
Error message
Detailed error description
Common Errors
- 400 Bad Request - Missing required fields
- 500 Internal Server Error - Gemini API error or text generation failure
- 503 Service Unavailable - ElevenLabs not configured (audio endpoints only)