PHP · Podcast music

Podcast Music API for PHP

PHP developers who need to generate podcast intros and stingers programmatically and want the exact PHP snippet for their stack.

Example prompt for podcast music

warm acoustic podcast intro, light and welcoming, no vocals

Install

composer require guzzlehttp/guzzle

PHP quick start

Set MUSICAPI_KEY, paste this, and run it. It is a real request against the live API, prompted for podcast music.

php
<?php
$client = new GuzzleHttp\Client();

// 1) start a generation
$res = $client->post('https://api.musicapi.ai/api/v1/sonic/create', [
    'headers' => ['Authorization' => 'Bearer ' . getenv('MUSICAPI_KEY')],
    'json' => [
        'custom_mode' => false,
        'mv' => 'sonic-v5',
        'gpt_description_prompt' => 'warm acoustic podcast intro, light and welcoming, no vocals',
    ],
]);
$taskId = json_decode($res->getBody(), true)['task_id'];

// 2) poll GET /api/v1/sonic/task/{taskId} until data[0]['audio_url'] is set

Full PHP setup (SDK, polling helper, error handling) is on the PHP music API guide.

Why teams use it for podcast

A podcast needs a consistent sonic identity: the same intro sting, an outro, and beds under segments and ad reads. Commissioning music is slow and does not scale across a network of shows or a weekly cadence. Reusing one generic stock loop makes every show sound the same.

More on this use case, including output and licensing details, on the Podcast Music API page.

FAQ

How do I generate podcast music from PHP?

POST a prompt to https://api.musicapi.ai/api/v1/sonic/create from PHP with your API key, then poll the returned task_id at /api/v1/sonic/task/{task_id} until the audio URL is ready. The snippet above is a complete starting point.

What does it cost?

Each music generation is 15 credits (2 songs). New accounts get free signup credits with no card, then it is pay-as-you-go. See the per-operation table at musicapi.ai/pricing#credit-costs.

Where is the full PHP setup?

This page is the podcast-focused quick start. The complete PHP integration (install, polling helper, error handling) is at musicapi.ai/php-music-api.

Generate podcast music in minutes

Get free credits on signup and run real generations before any payment. No credit card required to start.

API details verified 2026-06-07. The pricing page always has current rates.