Udio icon
Music by Udio

Udio API

High-quality music generation with custom lyrics.

Integrate Udio with a single API call — one key, one unified endpoint, and shared billing across every model on Apiframe.

model: "udio"

What's special about Udio

  • Generates clips from 32s to 130s.
  • Generates natively synchronized audio.
  • Fast turnaround — about 90s per generation on average.
  • Pay-as-you-go pricing with no Udio account required — you only pay for successful generations.
  • One API key, unified billing, idempotency and webhooks across every Apiframe model.

Made with Udio

A few outputs generated through the Udio API on Apiframe.

Sample coming soon

Upbeat indie pop track with bright guitars and a catchy chorus

Sample coming soon

Lo-fi hip hop beat with mellow piano and soft vinyl crackle

Sample coming soon

Epic orchestral cinematic score with soaring strings and percussion

Overview

Endpoint
POST /v2/music/generate
Model ID
udio
Params key
udioParams
Modality
Music
Provider
Udio
Avg. completion
~90s

Capabilities

Durations32s, 65s, 97s, 130s
AudioSupported
Avg. time~90s

Quick start

Send a single POST /v2/music/generate request with your API key to generate with Udio. The call returns a jobId you can poll or receive via webhook.

curl -X POST https://api.apiframe.ai/v2/music/generate \
  -H "X-API-Key: afk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
        "prompt": "an upbeat synthwave track with a driving bassline",
        "model": "udio",
        "udioParams": {
            "lyrics_type": "generate",
            "lyrics": "Optional — your own words",
            "lyrics_prompt": "e.g. leaving a small town at dawn",
            "title": "Optional"
        }
    }'
import requests

response = requests.post(
    "https://api.apiframe.ai/v2/music/generate",
    headers={
        "X-API-Key": "afk_your_api_key_here",
        "Content-Type": "application/json",
    },
    json={
        "prompt": "an upbeat synthwave track with a driving bassline",
        "model": "udio",
        "udioParams": {
            "lyrics_type": "generate",
            "lyrics": "Optional — your own words",
            "lyrics_prompt": "e.g. leaving a small town at dawn",
            "title": "Optional"
        }
    },
)
print(response.json())  # { "jobId": "...", "status": "QUEUED" }
const response = await fetch("https://api.apiframe.ai/v2/music/generate", {
  method: "POST",
  headers: {
    "X-API-Key": "afk_your_api_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "prompt": "an upbeat synthwave track with a driving bassline",
    "model": "udio",
    "udioParams": {
      "lyrics_type": "generate",
      "lyrics": "Optional — your own words",
      "lyrics_prompt": "e.g. leaving a small town at dawn",
      "title": "Optional"
    }
  }),
});
const { jobId } = await response.json();
console.log(jobId);

Response & job lifecycle

Generation is asynchronous. A successful submission returns 202 Accepted with a jobId. Poll GET /v2/jobs/{id} (or supply a webhook_url) until the status is COMPLETED; the result field then holds the output URL(s).

1. Submission response (202)

{
  "jobId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "status": "QUEUED"
}

2. Poll for the result

curl https://api.apiframe.ai/v2/jobs/JOB_ID \
  -H "X-API-Key: afk_your_api_key_here"
import requests, time

while True:
    job = requests.get(
        "https://api.apiframe.ai/v2/jobs/JOB_ID",
        headers={"X-API-Key": "afk_your_api_key_here"},
    ).json()
    if job["status"] in ("COMPLETED", "FAILED"):
        break
    time.sleep(2)
print(job["result"])
let job;
do {
  await new Promise((r) => setTimeout(r, 2000));
  job = await fetch("https://api.apiframe.ai/v2/jobs/JOB_ID", {
    headers: { "X-API-Key": "afk_your_api_key_here" },
  }).then((r) => r.json());
} while (job.status !== "COMPLETED" && job.status !== "FAILED");
console.log(job.result);

Input schema

Request parameters accepted by the Udio endpoint. Model-specific options are nested under the params object shown below.

Parameter Type Required Default Allowed / range Description
prompt string required Text description of what to generate.
model string required "udio" "udio" The model identifier for this endpoint.
udioParams.lyrics_type string optional "generate" "generate", "user", "instrumental" Lyrics
udioParams.lyrics string optional Your lyrics
udioParams.lyrics_prompt string optional Udio writes the lyrics from this, free, before the song is generated.
udioParams.title string optional Track title
udioParams.style string optional Style hints
udioParams.negative_tags string optional Negative tags
udioParams.model string optional "udio32-v1.5" "udio32-v1.5", "udio32-v1", "udio32-v2", "udio130-v1.5", "udio130-v1" The udio130 models cannot be extended afterwards.
udioParams.bpm number optional min 60, max 200, step 1 BPM
udioParams.prompt_strength number optional min 0, max 1, step 0.05 Prompt strength
udioParams.lyrics_strength number optional min 0, max 1, step 0.05 Lyrics strength
udioParams.clarity_strength number optional min 0, max 1, step 0.05 Clarity
udioParams.generation_quality number optional min 0, max 1, step 0.05 Generation quality
udioParams.manual_mode boolean optional false Send the prompt verbatim, without Udio’s prompt optimizer.
udioParams.style_ref string optional Udio’s "Use a Style" tab. Setting this generates from the style instead of a description, so the prompt becomes optional.
udioParams.voice string optional A voice to sing it.
udioParams.seed number optional step 1 Reuse a number to reproduce the same result.

Frequently Asked Questions

Common questions about the Udio API.

Is there an API for Udio?

Yes. Apiframe exposes Udio through a single REST endpoint (`POST /v2/music/generate` with `model: "udio"`). You get one unified API, key, and billing across every supported model — no separate Udio account required.

How much does the Udio API cost?

Udio uses simple pay-as-you-go pricing on Apiframe — you only pay for successful generations. See the pricing page for plans and volume discounts.

How do I call the Udio API?

Send a POST request to `/v2/music/generate` with your `X-API-Key` and a JSON body containing `model: "udio"`. The call returns a `jobId`; poll `GET /v2/jobs/{id}` or use a webhook to receive the result.

What parameters does Udio support?

Udio accepts 16 model-specific parameters (nested under `udioParams`) plus the common `prompt` and `webhook_url` fields. See the input schema above for the full list with types and defaults.

Still have questions?

Start building with the Udio API

Get your API key and integrate Udio in minutes — Pay-as-you-go.

Free credits to start
One API for every model
Webhooks, SDKs & idempotency
No provider account required

Questions? Join our Discord or contact sales.