Generation
The same generator as sample.cloud/generate: describe a sound, an open model makes it on our GPU, and you get a WAV. Each account has a daily limit that the site and every app share.
Generation needs a token with the generate scope (see Authentication), and the
account must have a confirmed email.
Models
Section titled “Models”GET /v1/generation-modelsNo token is needed.
{ "object": "list", "data": [ { "id": "moss-sfx", "label": "Sound effect", "name": "MOSS-SoundEffect v2.0", "description": "Sound effects, ambiences, foley and textures, 48 kHz mono.", "music": false, "lyrics": false, "seconds": { "min": 1, "max": 30, "default": 5 }, "license": { "name": "Apache 2.0", "url": "https://huggingface.co/OpenMOSS-Team/MOSS-SoundEffect-v2.0", "note": "No restrictions on the generated audio." }, "examples": ["Heavy wooden door creaking open slowly"] } ]}| Field | Meaning |
|---|---|
music |
the model takes bpm, key and time_signature |
lyrics |
the model sings words, and lyrics is required |
seconds |
allowed length of the sound |
license |
the model’s licence; it puts no restriction on what you do with the sound, except where note says otherwise |
The list can change: a model may be turned off for maintenance. Read it rather than hard-coding model IDs.
Generate a sound
Section titled “Generate a sound”POST /v1/generationsAuthorization: Bearer sc_pat_…Content-Type: application/json
{ "model": "ace-music", "prompt": "Dusty lo-fi hip hop drum loop with vinyl crackle", "seconds": 15, "bpm": 90 }| Field | Type | |
|---|---|---|
model |
string | a model ID from /v1/generation-models |
prompt |
string, 3–300 characters | what the sound should be, in English |
seconds |
number | within the model’s seconds range |
bpm |
integer 40–220 | music models only; omitted means the model chooses |
key |
{ "tonic": "A", "scale": "minor" } |
music models only; tonic C, C#, Db … B |
time_signature |
"2", "3", "4" or "6" |
music models only |
lyrics |
string, up to 1000 characters | required for models with lyrics: true, any language; [Verse] and [Chorus] tags are optional |
seed |
integer | the same seed and request give the same sound; omitted means random |
The answer is 201 Created with a Location header and the generation:
{ "id": "gen_01M8YCH8BCFD7BTHMVJNGVFNCH", "object": "generation", "model": "ace-music", "model_label": "Music loop", "model_name": "ACE-Step 1.5", "prompt": "Dusty lo-fi hip hop drum loop with vinyl crackle", "params": { "seconds": 15, "bpm": 90 }, "seed": null, "status": "queued", "error": null, "queue_position": 2, "duration_ms": null, "sample_rate": null, "size_bytes": null, "result": {}, "audio_url": null, "asset_id": null, "publish": null, "created_at": "2026-12-03T17:02:11.204Z", "finished_at": null}Wait for the result
Section titled “Wait for the result”GET /v1/generations/{id}Poll every two seconds or so until status is done or failed.
status |
Meaning |
|---|---|
queued |
waiting; queue_position 1 means it is next |
running |
the model is working, usually 5–60 seconds |
done |
audio_url is ready |
failed |
error says why; it still counts toward the daily limit |
expired |
the audio was deleted (see below) |
When it is done:
audio_urlis a signed link to a WAV, valid for one hour. Ask for the generation again for a fresh link. The WAV carries the model, prompt, seed and licence in its LIST/INFO and bext chunks.seedis the seed that was used.resultmay carry what the model reports, such asbpmandkeyof a music loop.duration_ms,sample_rateandsize_bytesdescribe the file.
Sounds that are not published are deleted after two weeks. Download the ones the user wants to keep.
List and delete
Section titled “List and delete”GET /v1/generations?limit=20The newest generations first (up to 50), with the account’s limits:
{ "object": "list", "data": [ { "id": "gen_…", "object": "generation" } ], "usage": { "used_today": 3, "daily_limit": 40, "pending": 1, "max_pending": 3 }}DELETE /v1/generations/{id}Deletes a finished or failed generation and its audio: 204 No Content. A generation that
is still running, or that is published, answers 409 Conflict.
Publish to the library
Section titled “Publish to the library”POST /v1/generations/{id}/publishContent-Type: application/json
{ "title": "Lo-fi drum loop", "tags": ["lofi", "drums"], "license": "CC0-1.0" }Publishing gives the sound to everyone under CC0 1.0
(public domain) and adds it to the
Generated sounds pack. It cannot be taken back.
Tell the user this and let them confirm before you call it; "license": "CC0-1.0" is that
confirmation.
The answer is 202 Accepted. Poll the generation: publish.state goes from requested to
done, and asset_id is the sound in the catalog (GET /v1/assets/{id}).
| Field | |
|---|---|
title |
1–100 characters |
tags |
up to 10, each up to 30 characters; lowercased |
Limits and errors
Section titled “Limits and errors”Each account may start a limited number of generations per 24 hours (daily_limit) and have a
few in the queue at once (max_pending). Over either limit the API answers 429 with
daily_limit or busy.
| Status | When |
|---|---|
401 |
no token, or an invalid one |
403 |
the token lacks generate, or the account email is not confirmed |
404 |
no such generation, or it belongs to another account |
409 |
still running, already published, or published and so not deletable |
422 |
the request does not fit the model (see detail or errors) |
429 |
daily_limit or busy |