RunAPI Suno Composer package for PHP applications

Maintainers

Package info

github.com/runapi-ai/suno-php

Homepage

Documentation

pkg:composer/runapi-ai/suno

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2026-06-25 03:17 UTC

This package is auto-updated.

Last update: 2026-06-25 07:02:38 UTC


README

Packagist License

The Suno PHP SDK is the Composer package for Suno on RunAPI. Use it when your PHP application needs associative-array request bodies, task status lookup, polling helpers, file helpers, and consistent RunAPI errors.

Install

composer require runapi-ai/suno

Quick start

<?php

require __DIR__ . "/vendor/autoload.php";

use RunApi\Suno\SunoClient;

$client = new SunoClient(); // reads RUNAPI_API_KEY

$task = $client->textToMusic->create([
    'model' => 'suno-v5.5',
    'prompt' => 'A chill lo-fi beat with soft vocals',
    'vocal_mode' => 'auto_lyrics',
]);

$status = $client->textToMusic->get($task->id);

$result = $client->textToMusic->run([
    'model' => 'suno-v5.5',
    'prompt' => 'A cinematic synthwave track with bright drums',
    'vocal_mode' => 'auto_lyrics',
]);

print_r($result->toArray());

Use create() to submit a task and return quickly, get() to fetch the latest task state, and run() when a script should create and poll until completion. In web request handlers, prefer create() plus webhook or later get() polling so a worker is not held open.

Returned file URLs are temporary. Download and store generated files in your own durable storage within the retention window.

All SDK exceptions inherit from RunApi\Core\Errors\RunApiException, including validation, authentication, rate limit, task failure, and task timeout errors.

Links

License

Licensed under the Apache License, Version 2.0.