CoolFace
Apppublic

sleeper371/stable-audio-3-medium-api

sourceHugging Faceotherupdated 8d agoView on Hugging Face
0likes
App README

Stable Audio 3 Medium — Music API

A thin, stable API wrapper around `stabilityai/stable-audio-3`, pinned to the Medium — general audio variant (`stabilityai/stable-audio-3-medium`).

This Space uses no GPU of its own — it forwards to the upstream ZeroGPU Space and exposes a single keyword-addressable endpoint, /generate, so callers don't have to track upstream's positional, UI-derived signature.

Endpoint

POST /generate → (wav_filepath, status_string)

paramtypedefaultnotes
promptstr—required
durationfloat60seconds, 1–380
stepsfloat8diffusion steps
cfg_scalefloat1.0
sampler_typestrpingpongpingpong, euler, rk4, dpmpp
seedint00 = random
negative_promptstr""routes via upstream /infer_advanced when set
hf_tokenstr—required; your own HF token (a read token suffices)

Usage

python
from gradio_client import Client

client = Client("sleeper371/stable-audio-3-medium-api")
wav_path, status = client.predict(
    prompt="Warm analog house groove, deep sub bass, shuffled hats 122 BPM",
    duration=30,
    hf_token="hf_...",      # your token — your quota
    api_name="/generate",
)
print(status, wav_path)

Configuration

This Space stores no credentials. Each caller passes their own hf_token, which is forwarded to upstream so ZeroGPU quota is charged to that caller — never to the Space owner. Tokens are never logged or persisted.

variablepurpose
UPSTREAM_SPACEOverride the upstream Space id. Defaults to stabilityai/stable-audio-3.
JOB_TIMEOUTWall-clock budget per upstream job, including queue wait. Defaults to 900 seconds.
HTTPX_TIMEOUTHTTP timeout, which bounds the download of the result WAV (~67 MB at the 380s maximum). Defaults to 600 seconds.