DEV Community

Om Prakash
Om Prakash

Posted on

PixelAPI Now Generates AI Songs — Original Music from Just Lyrics

TL;DR

PixelAPI just shipped AI song generation. Send lyrics + a style description, get back an original song with vocals in under 20 seconds. 50 credits ($0.05) per song. Supports 5+ languages.

curl -X POST https://api.pixelapi.dev/v1/song/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "happy upbeat children song, playful melody",
    "lyrics": "Red red red, blue blue blue\nColors all around for me and you",
    "duration": 30,
    "language": "en"
  }'
Enter fullscreen mode Exit fullscreen mode

Why This Matters

Until now, if you wanted AI-generated songs for your app, game, or video, you had two options:

  1. Suno/Udio — Great quality, but $10/month minimum and no real API
  2. Build your own — Download a model, set up GPU infrastructure, maintain it forever

PixelAPI's song generation gives you a simple REST API that generates original songs with vocals. No subscriptions, no GPU management. Pay only for what you use.

What You Can Build

  • Kids' educational apps — Generate custom songs about any topic (colors, numbers, animals)
  • Game soundtracks — Dynamic music that matches your game's mood
  • Video production — Original background music and theme songs
  • Language learning — Songs in multiple languages for immersive learning
  • Greeting cards — Personalized singing messages
  • Podcasts — Custom intro/outro music

How It Works

Generate a Song

import requests

response = requests.post(
    "https://api.pixelapi.dev/v1/song/generate",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "prompt": "romantic acoustic guitar ballad, soft male vocals",
        "lyrics": "Under the stars tonight\nI find my way to you\nEvery step feels so right\nWhen the world feels brand new",
        "duration": 45,
        "language": "en"
    }
)

result = response.json()
print(f"Song ready: {result['output_url']}")
# Download: GET /v1/song/download/{generation_id}
Enter fullscreen mode Exit fullscreen mode

Check Status

status = requests.get(
    f"https://api.pixelapi.dev/v1/song/{result['generation_id']}",
    headers={"Authorization": "Bearer YOUR_API_KEY"}
).json()

print(f"Status: {status['status']}")
print(f"Processing time: {status['processing_ms']}ms")
Enter fullscreen mode Exit fullscreen mode

Parameters

Parameter Type Default Description
prompt string required Song style/mood description
lyrics string required The lyrics to sing
duration int 30 Song length in seconds (10-120)
language string "en" Vocal language: en, hi, zh, ja, ko
seed int null For reproducible results

Supported Languages

Language Code Quality
English en Excellent
Hindi hi Excellent
Chinese zh Good
Japanese ja Good
Korean ko Good

Pricing

50 credits per song — that's $0.05 at our standard rate.

Compare:

  • Suno: ~$0.10 per song (subscription required)
  • PixelAPI: $0.05 per song (pay-as-you-go)

Our standard pricing philosophy: 2x cheaper than the cheapest competitor.

Speed

Typical generation times:

  • 15-second song: ~15 seconds
  • 30-second song: ~20 seconds
  • 60-second song: ~35 seconds
  • 120-second song: ~60 seconds

Real Example

We used this exact API to generate the theme song for our animated series "Mushika" — a children's show about a mouse and friends learning colors. The Hindi song "Rang Rang Rang" was generated in 6 seconds and is now live on YouTube.

Get Started

  1. Sign up at pixelapi.dev
  2. Get your API key from the dashboard
  3. Start generating songs
# Quick test
curl -X POST https://api.pixelapi.dev/v1/song/generate \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"jazz piano lounge music","lyrics":"Moonlight on the water\nSoft and slow tonight","duration":15,"language":"en"}'
Enter fullscreen mode Exit fullscreen mode

What's Next

  • Instrumental-only generation (no vocals)
  • Style transfer (upload a reference track)
  • Longer songs (up to 5 minutes)
  • More languages

PixelAPI is the developer-first AI media API. Image generation, editing, video, and now music — all through simple REST endpoints. Get started free.

Top comments (0)