Skip to main content

Suno API Python SDK for RunAPI

The Suno Python SDK is the language-specific package for Suno on RunAPI. Use this package for song generation, lyrics, vocals, extension, and audio transformation workflows when your application needs request bodies, task status lookup, and consistent RunAPI errors in Python.

This README is the Python package guide inside the public suno-sdk repository. For the repository overview, start at ../README.md; for model details, use https://runapi.ai/models/suno; for API reference, use https://runapi.ai/docs/api/suno/text-to-music; for SDK docs, use https://runapi.ai/docs/resources/sdks.

Install

pip install runapi-suno

Quick start

from runapi.suno import SunoClient

client = SunoClient()  # reads RUNAPI_API_KEY, or pass api_key="sk-..."

# Generate music and poll until completion.
result = client.text_to_music.run(
    model="suno-v4.5-plus",
    vocal_mode="auto_lyrics",
    prompt="A chill lo-fi beat with soft vocals",
)
print(result.audios[0].audio_url)

# Generate lyrics from a prompt.
lyrics = client.generate_lyrics.run(prompt="a song about the ocean at night")
print(lyrics.lyrics[0].text)

blended = client.blend_lyrics.run(
    lyrics_a="[Verse]\nCity lights fade into dawn",
    lyrics_b="[Chorus]\nWe rise with the morning sun",
)
print(blended.lyrics[0].text)

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:

task = client.text_to_music.create(
    model="suno-v4.5-plus",
    vocal_mode="instrumental",
    style="ambient piano",
    title="Quiet Morning",
)
status = client.text_to_music.get(task.id)

In web request handlers, prefer create plus webhook or later get polling so a worker is not held open.

RunAPI-generated file URLs are temporary. Download and store generated images, videos, audio, or other files in your own durable storage within 7 days; do not treat returned URLs as long-term assets.

Language notes

Pass parameters as keyword arguments and catch the runapi.suno error classes when building music jobs or scripts. The available resources are text_to_music, extend_music, generate_artwork, cover_audio, add_instrumental, add_vocals, separate_audio_stems, generate_midi, convert_audio, visualize_music, generate_lyrics, blend_lyrics, get_timestamped_lyrics, replace_section, create_mashup, text_to_sound, voice_to_validation_phrase, regenerate_validation_phrase, generate_voice, check_voice, generate_persona, and boost_style. Keep RUNAPI_API_KEY in the environment or your secret manager; never commit API keys or callback secrets.

Links

License

Licensed under the Apache License, Version 2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

runapi_suno-0.4.2.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

runapi_suno-0.4.2-py3-none-any.whl (31.5 kB view details)

Uploaded Python 3

File details

Details for the file runapi_suno-0.4.2.tar.gz.

File metadata

  • Download URL: runapi_suno-0.4.2.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for runapi_suno-0.4.2.tar.gz
Algorithm Hash digest
SHA256 4b5a898e6fb09e8878293b5a7a2b0b84e97b6c599661857a482141137cd7a7bd
MD5 3549df3f154ca1d1d3e8a1a031d0a50c
BLAKE2b-256 819a29a150955e94cd7cc2ca39a5998361ec84a5194c18acd4ccf3d488ea573a

See more details on using hashes here.

File details

Details for the file runapi_suno-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: runapi_suno-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 31.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for runapi_suno-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 aa724653115e67cb80f2d01e1cab89492c667f28c0f605734ab74dbed5021d45
MD5 5a4a2b223dfce8e070d43dd1cd9fc206
BLAKE2b-256 609e09c74a1d5c8acc4adacf909aacc0db3959cc0b83916ad1f357c58b9b8066

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page