REST API · Live

Song Generation API vs Soundraw

Comparing a song generation API vs Soundraw comes down to one core difference: PixelAPI is a public, pay-per-call REST endpoint — POST lyrics and a style prompt, get back an MP3. Soundraw requires a paid developer plan ($29.99/mo minimum, $0.30/song) with no free trial tier. PixelAPI costs $0.028 per song and starts with 300 free credits, no credit card.

$0.028 / song 10–120 s duration 300 free credits No credit card Vocals + instrumental Multi-language
Get an API key (free) Quick start See pricing API docs

Quick start — generate a song in one API call

Sign up and copy your key from the dashboard. POST a style description and lyrics to /v1/song/generate. Short songs return inline; longer jobs return status=processing — poll until completed, then download the MP3.

# Generate a song
curl -X POST https://api.pixelapi.dev/v1/song/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "upbeat pop with female vocals, summer vibes",
    "lyrics": "[Verse]\nHere comes the sun and a brand new day\n[Chorus]\nWe are alive, alive\n",
    "duration": 30,
    "language": "en"
  }'
# Short response (inline): {"generation_id":"uuid","status":"completed","output_url":"https://..."}
# Long response (async):   {"generation_id":"uuid","status":"processing","poll_url":"https://..."}

# Poll until completed
curl https://api.pixelapi.dev/v1/song/UUID \
  -H "Authorization: Bearer YOUR_API_KEY"

# Download the MP3
curl -L https://api.pixelapi.dev/v1/song/download/UUID -o song.mp3
pip install pixelapi
---
from pixelapi import PixelAPI

client = PixelAPI(api_key="YOUR_API_KEY")
result = client.generate_song(
    prompt="upbeat pop with female vocals, summer vibes",
    lyrics="[Verse]\nHere comes the sun and a brand new day\n[Chorus]\nWe are alive, alive\n",
    duration=30,
    language="en",
)
result.save("song.mp3")  # downloads when status=completed
npm install pixelapi
---
import { PixelAPI } from "pixelapi";

const client = new PixelAPI({ apiKey: process.env.PIXELAPI_KEY });
const result = await client.generateSong({
  prompt: "upbeat pop with female vocals, summer vibes",
  lyrics: "[Verse]\nHere comes the sun and a brand new day\n[Chorus]\nWe are alive, alive\n",
  duration: 30,
  language: "en",
});
await result.save("song.mp3"); // polls and downloads automatically
composer require pixelapi/pixelapi
---
<?php
use PixelAPI\Client;

$client = new Client(getenv("PIXELAPI_KEY"));
$result = $client->generateSong([
    "prompt"   => "upbeat pop with female vocals, summer vibes",
    "lyrics"   => "[Verse]\nHere comes the sun\n[Chorus]\nWe are alive\n",
    "duration" => 30,
    "language" => "en",
]);
file_put_contents("song.mp3", $result->download());
gem install pixelapi
---
require "pixelapi"

client = PixelAPI::Client.new(api_key: ENV["PIXELAPI_KEY"])
result = client.generate_song(
  prompt: "upbeat pop with female vocals, summer vibes",
  lyrics: "[Verse]\nHere comes the sun\n[Chorus]\nWe are alive\n",
  duration: 30,
  language: "en"
)
File.binwrite("song.mp3", result.download)
go get github.com/pixelapi/pixelapi-go
---
import "github.com/pixelapi/pixelapi-go"

client := pixelapi.New("YOUR_API_KEY")
result, err := client.GenerateSong(pixelapi.SongRequest{
    Prompt:   "upbeat pop with female vocals, summer vibes",
    Lyrics:   "[Verse]\nHere comes the sun\n[Chorus]\nWe are alive\n",
    Duration: 30,
    Language: "en",
})
if err != nil { panic(err) }
result.Save("song.mp3")

Pricing comparison: song generation API vs Soundraw, Suno, Udio

Provider Free tier Per-song cost API access Output
PixelAPI 300 credits, no card $0.028 ✓ Public REST API MP3 · up to 120 s
Soundraw None for API $0.30 (API Starter: $29.99/100 songs) Paid plan required ($29.99/mo+) MP3 / WAV / stems
Suno Free plan (limited, no commercial use) Subscription only — Pro $10/mo, Premier $30/mo No public API MP3 (subscription)
Udio Free plan (limited) Subscription only — Standard $10/mo No official API Subscription only*

*Udio disabled song downloads for all users in October 2025 following a music industry settlement. Pricing verified from each rival's public pricing page November 2026. PixelAPI per-song price matches the cheapest comparable API (Replicate ACE-Step ~$0.028/run) per our pricing principle — set at the market's lowest per-call rate.

What you get back

MP3 audio file

Every generation returns a hosted MP3 URL at https://api.pixelapi.dev/v1/song/download/{id}. Download it directly or serve it from your own CDN.

Vocal tracks (10+ languages)

Provide lyrics and set language to get sung vocals in English, Hindi, Mandarin, Japanese, Korean, Spanish, French, and more. The API structures short lyrics automatically to match the duration.

Instrumental mode

Set instrumental=true and omit the lyrics field. The API generates a full background track up to 120 seconds — genres, moods, and tempos all driven by the style prompt.

Song extensions & variations

Pass extend_from to add more audio to a prior generation, variation_of for a restyle, or reference_audio_url for style transfer from any external MP3/WAV.

Full request parameters

FieldTypeRequiredDescription
promptstringYesStyle description — genre, mood, instruments, tempo (3–500 chars)
lyricsstringUnless instrumentalSong lyrics, up to 2,000 chars. Supports ACE-Step section tags: [Verse], [Chorus], [Bridge]
durationintegerNo (default 30)Output length in seconds, 10–120
languagestringNo (default en)Vocal language code: en, hi, zh, ja, ko, es, fr, de, pt, and more
instrumentalbooleanNoSet true to generate a no-vocals track; lyrics field is ignored
bpmintegerNoTarget tempo 40–240 BPM
seedintegerNoFixed seed for reproducible outputs
extend_fromstringNoPrior generation_id to extend; use with direction=after|before
variation_ofstringNoPrior generation_id to restyle as a variation
reference_audio_urlstringNoHTTPS URL to a reference MP3/WAV for style transfer; tune with audio_cover_strength 0.0–1.0

Why choose PixelAPI over Soundraw for your song generation API

No subscription required

Soundraw's API plans start at $29.99/month and lock you into a 6-month minimum on the Pro tier. PixelAPI charges $0.028 per song with no monthly commitment — perfect for projects with variable volumes.

10× cheaper per song

Soundraw API Starter works out to $0.30 per song ($29.99 ÷ 100). PixelAPI costs $0.028 — the same price as the cheapest open API for this model — with 300 songs' worth of free credits to start.

Bring your own lyrics

Soundraw generates background music without vocals. PixelAPI generates full songs from your lyrics — verse, chorus, bridge — with the model automatically expanding short phrases into a song structure.

Longer output, more languages

Up to 120 seconds per generation (Soundraw Starter is typically short clips). Vocals in 15+ languages for localized content, advertising jingles, and multilingual product demos.

Style transfer & remix

Use reference_audio_url to match the vibe of any reference track, or extend_from to grow a song across multiple API calls. No equivalent feature in Soundraw's API.

Free trial, no card

300 credits on signup — about 10 full songs at 30 seconds each — with zero payment details needed. Soundraw requires a paid plan before the first API call.

Common workflows

The song generation API is the foundation for these production use cases. Each links to a full setup guide:

Marketing agencies

Generate unique jingles and background music for client campaigns at scale, without per-track licensing fees.

E-commerce

Dynamic product demo videos with original music generated from product descriptions and brand tone.

Fashion & lifestyle

Runway, lookbook, and social reel soundtracks in-house, matched to collection mood and language market.

Books & media

Audiobook trailers, podcast intros, and chapter themes generated programmatically from synopsis text.

Food & delivery apps

In-app audio branded per cuisine, occasion, or seasonal promotion without a music licensing budget.

Photography & video studios

Client slideshow and event highlight reels with original soundtracks generated from event metadata.

Integrations & SDKs

Shopify

Auto-generate a product promo track when a new item is added to your store.

Zapier

No-code trigger: generate a song from any Zapier event — form submission, CRM update, calendar entry.

Make.com

Drag-and-drop song generation inside Make scenarios. Connect to Google Sheets, Notion, Airtable.

Webflow

CMS-driven music generation: auto-create a unique track for each CMS collection item.

Next.js

Server-side song generation in Next.js API routes with streaming progress to the client.

WooCommerce

Product page background audio and promo clip generation on new product publish events.

Comparison vs alternatives

vs Soundraw

PixelAPI: pay-per-call at $0.028, free trial, full lyrics support. Soundraw API: $0.30/song, no free tier, background music only.

vs Suno

Suno has no public API and runs on a subscription model. PixelAPI offers a public REST endpoint at $0.028/song.

vs Udio

Udio has no official public API and disabled song downloads in Oct 2025. PixelAPI returns a downloadable MP3 on every call.

vs AIVA

AIVA focuses on orchestral and film scores via a UI. PixelAPI is developer-first: lyrics, vocals, and style via REST.

PixelAPI vs Suno (deep dive)

Detailed comparison of features, pricing, and API access between PixelAPI and Suno.

PixelAPI vs Udio (deep dive)

Detailed comparison of features, pricing, and API access between PixelAPI and Udio.

Rate limits & error handling

Free trial: 20 requests/minute, 3 parallel jobs. Starter: 60 req/min, 10 parallel. Pro: 120 req/min, 20 parallel. Scale: 300 req/min, 50 parallel (see parallel processing docs). Exceeding the limit returns HTTP 429 with a Retry-After header. Recommended: exponential backoff starting at 2 s, doubling up to 30 s. The Python and Node SDKs retry 429s automatically.

# Python SDK — auto-retries 429 with backoff, polls until completed
from pixelapi import PixelAPI
client = PixelAPI(api_key="...", max_retries=4)
result = client.generate_song(
    prompt="chill lo-fi beats, rainy afternoon",
    instrumental=True,
    duration=60,
)
result.save("background.mp3")  # SDK polls + downloads automatically

If a generation fails (network error, model rejection), credits are automatically refunded — you are never charged for a failed job. If the generation exceeds the inline wait (about 75 seconds for very long songs), it returns status=processing with a poll_url; the MP3 is available within 10 minutes for the longest supported duration.

Frequently asked questions

How does the song generation API compare to Soundraw?

PixelAPI is a public, pay-per-call REST API: POST a prompt and lyrics, get back an MP3. No subscription needed, no minimum commitment. Soundraw's developer API requires a paid plan starting at $29.99/month for 100 songs ($0.30/song), which is over 10× more expensive than PixelAPI's $0.028 per song. PixelAPI also gives you 300 free credits instantly with no credit card, while Soundraw has no free API tier.

What does the song generation API cost?

$0.028 per song (28 credits × $0.001). New accounts receive 300 free credits — about 10 songs at 30 seconds each — with no credit card required. There is no monthly subscription; you pay only for what you generate, making it ideal for variable-volume workloads.

What inputs does the song generation API accept?

POST /v1/song/generate accepts: prompt (style description), lyrics (optional when instrumental=true), duration (10–120 s), language (en, hi, zh, ja, ko and more), bpm, seed, and three advanced modes: extend_from, variation_of, and reference_audio_url for style transfer from any external audio URL.

What output format does the API return?

The API returns a generation_id and an output_url pointing to an MP3 file at https://api.pixelapi.dev/v1/song/download/{id}. Songs under about 75 seconds are returned inline in the same HTTP response; longer jobs return status=processing and a poll_url to check progress.

Does Soundraw have a public REST API?

Soundraw does provide a developer API, but it is not free or pay-per-call. The API Starter plan is $29.99/month for up to 100 songs; the API Pro plan is $300/month for up to 1,000 songs, with a 6-month minimum commitment on Pro. PixelAPI requires no subscription and provides 300 free credits on signup.

Can I generate instrumental tracks (no vocals)?

Yes. Set instrumental=true and omit the lyrics field. The API generates a full instrumental track up to 120 seconds. The prompt controls genre, mood, instruments, and tempo — for example, "cinematic orchestral, rising tension, 80 BPM".

Which languages are supported for vocals?

The language parameter accepts: en (English), hi (Hindi), zh (Mandarin Chinese), ja (Japanese), ko (Korean), es (Spanish), fr (French), de (German), pt (Portuguese), ru (Russian), ar (Arabic), bn (Bengali), ta (Tamil), te (Telugu), and mr (Marathi).

How do I extend or remix a song I already generated?

Pass extend_from with the original generation_id and direction=after (or before) to append more audio to an existing track. To create a variation, pass variation_of instead. For style transfer from an external track, use reference_audio_url (any HTTPS MP3/WAV URL) with audio_cover_strength (0.0 = maximum style transfer, 1.0 = close reproduction).

What are the rate limits?

Free trial: 20 req/min, 3 parallel jobs. Starter: 60 req/min, 10 parallel. Pro: 120 req/min, 20 parallel. Scale: 300 req/min, 50 parallel. Rate-limited responses return HTTP 429 with a Retry-After header. The Python and Node SDKs handle retry and backoff automatically. Contact support@pixelapi.dev for higher batch limits.

Is there a Python SDK?

Yes — pip install pixelapi. Official SDKs are also available for Node.js (npm install pixelapi), PHP (Composer), Ruby (gem install pixelapi), Go (go get github.com/pixelapi/pixelapi-go), and Java/Kotlin. All SDKs handle authentication, polling, 429 retry with backoff, and binary MP3 download automatically.

Start free — 300 credits, no card Read full API docs Compare all plans