Skip to main content
POST
Create Task

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

Headers

x-api-key
string
required
Your API key.
Content-Type
string
required
Must be application/json.

Body parameters

model
string
required
The AI model to use. One of "suno" or "udio". See the Suno and Udio model pages for capabilities and pricing.
task_type
string
required
The type of task to create. Suno supports: "music", "lyrics", "upload", "concat". Udio supports "music" only.
input
object
required
Task-specific input parameters. See the sections below for each task type.

Task types and input schemas

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.
Generate music from a natural language description. The AI interprets your prompt and creates lyrics, melody, and arrangement.
input.gpt_description_prompt
string
required
A natural language description of the music you want (e.g., “A chill lo-fi beat for studying”).
input.make_instrumental
boolean
default:"false"
Set to true to generate instrumental music without vocals.

lyrics — Generate lyrics

input.prompt
string
required
A description of the lyrics you want (e.g., “A love song about the ocean at sunset”).

upload — Upload audio

input.url
string
required
A publicly accessible URL of the audio file to upload.
The upload returns a clip id (at output.result[0].id). Pass it as continue_clip_id in a music task to extend your uploaded audio into a full song (see the Continuation Mode tab under the music task). Generating a new song in a different style from an uploaded reference (an “audio cover”) is not currently supported.

concat — Concatenate clips

input.clip_id
string
required
The clip ID to concatenate (obtained from a previous music task output).

Response

code
number
HTTP status code (202 on success).
data
object
task_id
string
Unique identifier for the created task. Use this to poll for results.
type
string
The task type that was submitted.
status
string
Initial status, always "pending".
credits_charged
number
Number of credits frozen for this task.
created_at
string
ISO 8601 timestamp of when the task was created.
202

Code examples

Errors