Generate Music
Generate original music using AI. Supports both inspiration mode (text description) and custom mode (lyrics, style, title).
Endpoint Overview
/api/v1/audio/musicTwo Generation Modes:
- Inspiration Mode: Use
gpt_description_promptto generate music from a text description. The model will automatically write lyrics and pick a style. - Custom Mode: Use
prompt,style, andtitlefor detailed control over the exact song output.
Credits: 5–12 credits per generation depending on the model tier.
Parameters
Common Parameters
AI model to use. Options: suno-v3-5, suno-v4-0, suno-v4-0-vip, suno-v4-0-pro, suno-v4-5, suno-v5-0. Defaults to suno-v3-5.
Generate instrumental music without vocals. Defaults to false.
Optional webhook URL to receive real-time results via POST.
Inspiration Mode
Generate music from a text description.
Text description of the music you want to generate. Max length: 400 chars.
Custom Mode
Generate music with custom lyrics, style, and title.
Custom lyrics or detailed prompt. Max length: 3000 chars (5000 chars for v4-5).
Musical style/genre. Max length: 200 chars (1000 chars for v4-5/v5-0).
Song title. Max length: 80 characters.
Negative tags to avoid in generation.
Example Request
cURL (Custom Mode)
| 1 | curl -X POST "https://apiin.one/api/v1/audio/music" \ |
| 2 | -H "Authorization: Bearer aio_your_api_key_here" \ |
| 3 | -H "Content-Type: application/json" \ |
| 4 | -d '{ |
| 5 | "model": "suno-v4-5", |
| 6 | "prompt": "Verse 1: Walking down the street, feeling so free\nChorus: Summer dreams are calling me", |
| 7 | "style": "pop, upbeat, electronic, 120 bpm", |
| 8 | "title": "Summer Dreams", |
| 9 | "make_instrumental": false |
| 10 | }' |
Example Response
This API returns a task ID immediately. You must poll the Feed endpoint to get the final audio URLs.
| 1 | { |
| 2 | "task_id": "gen123abc456def789ksv", |
| 3 | "status": "pending", |
| 4 | "model": "suno-v4-5", |
| 5 | "created_at": "2026-02-24T12:00:00Z" |
| 6 | } |
Error Handling
Invalid parameters, missing required fields, or validation error.
Invalid or missing API key.
Insufficient balance to perform generation.