Create Task
Submit a new task to an AI model. The task is processed asynchronously — use the Get Task endpoint to poll for results.
Request
Must be application/json.
Body parameters
The AI model to use. One of "suno" or "udio". See the Suno and Udio model pages for capabilities and pricing.
The type of task to create. Suno supports: "music", "lyrics", "upload", "concat". Udio supports "music" only.
Task-specific input parameters. See the sections below for each task type.
music — Generate music
The music task supports three modes depending on which input fields you provide.
Input fields differ by model. The examples below show Suno input shape (using gpt_description_prompt, make_instrumental, etc.). Udio uses a different field set — see the Udio model page for the Udio-specific shape. Mixing them produces a 400 validation error.
Inspiration Mode
Custom Mode
Continuation Mode
Udio
Generate music from a natural language description. The AI interprets your prompt and creates lyrics, melody, and arrangement.input.gpt_description_prompt
A natural language description of the music you want (e.g., “A chill lo-fi beat for studying”).
Set to true to generate instrumental music without vocals.
{
"model": "suno",
"task_type": "music",
"input": {
"gpt_description_prompt": "A cheerful acoustic guitar song about summer",
"make_instrumental": false
}
}
Provide your own lyrics and style tags for precise control over the output.The lyrics for the song. Use standard song structure notation like [Verse], [Chorus], etc.
Comma-separated style/genre tags (e.g., "pop, upbeat, female vocals").
Comma-separated tags for styles to avoid (e.g., "heavy metal, screaming").
{
"model": "suno",
"task_type": "music",
"input": {
"prompt": "[Verse]\nWalking down the sunlit road\nFeeling light without a load\n\n[Chorus]\nOh summer days, carry me away",
"tags": "pop, acoustic, upbeat",
"title": "Summer Days"
}
}
Extend an existing music clip from a specific timestamp.The clip ID to continue from (obtained from a previous music task output).
Timestamp in seconds to continue from.
Additional lyrics or instructions for the continuation.
{
"model": "suno",
"task_type": "music",
"input": {
"continue_clip_id": "abc123-clip-id",
"continue_at": 30,
"prompt": "[Chorus]\nKeep the music playing on"
}
}
Udio uses a single prompt field for the style description. See the Udio model page for full options including lyrics, tags, lyrics_type, and seed.Short style/mood description (e.g., “lofi hip hop, chill, rainy night, jazz piano”). Udio’s GPT layer expands it into full prompt + lyrics.
{
"model": "udio",
"task_type": "music",
"input": {
"prompt": "lofi hip hop, chill, rainy night, jazz piano"
}
}
lyrics — Generate lyrics
A description of the lyrics you want (e.g., “A love song about the ocean at sunset”).
{
"model": "suno",
"task_type": "lyrics",
"input": {
"prompt": "A love song about the ocean at sunset"
}
}
upload — Upload audio
A publicly accessible URL of the audio file to upload.
{
"model": "suno",
"task_type": "upload",
"input": {
"url": "https://example.com/my-audio.mp3"
}
}
concat — Concatenate clips
The clip ID to concatenate (obtained from a previous music task output).
{
"model": "suno",
"task_type": "concat",
"input": {
"clip_id": "abc123-clip-id"
}
}
Response
HTTP status code (202 on success).
Unique identifier for the created task. Use this to poll for results.
The task type that was submitted.
Initial status, always "pending".
Number of credits frozen for this task.
ISO 8601 timestamp of when the task was created.
{
"code": 202,
"data": {
"task_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"type": "music",
"status": "pending",
"credits_charged": 10,
"created_at": "2025-01-15T10:30:00.000Z"
}
}
Code examples
curl -X POST https://sunor.cc/api/v1/task \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"model": "suno",
"task_type": "music",
"input": {
"gpt_description_prompt": "A cheerful acoustic guitar song about summer",
"make_instrumental": false
}
}'
Errors
| Status | Description |
|---|
400 | Missing required fields (model, task_type, or input) or invalid task type |
401 | Missing or invalid API key |
402 | Insufficient credits |
429 | Rate limit exceeded |
500 | Internal server error |