generate_audio
Convert text prompts into spoken audio or music with automatic format detection and correction.
Instructions
Generate audio from a text prompt. Conversational models (e.g. openai/gpt-audio) respond in spoken audio. Music models (e.g. google/lyria-3-clip-preview) need a structured prompt. Output format is auto-detected and file extension is corrected automatically.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Text input | |
| model | No | Model ID (default: openai/gpt-audio) | |
| voice | No | Voice name (default: alloy) | |
| format | No | Requested format: pcm16 (default), mp3, flac, opus | |
| save_path | No | Optional path to save the audio. Extension auto-corrected and routed through OPENROUTER_OUTPUT_DIR sandbox. |