resourcepack.ai
DOCS

Packs

Change a sound, or choose its take

Changes the fields you send and keeps the rest. Choosing a take is {"take": "2"} sent on its own: that take becomes the audio the pack ships, instantly and for free, and the others stay to choose between. Its label is changed with POST /packs/{pack}/assets/sound/{sound}/rename.

An event that names a vanilla sound (entity.creeper.primed) replaces it in game; any other (custom.laser) is a new one /playsound and RP Engine's /rp sound can play.

POST/packs/{pack}/sounds/{sound}

Path parameters

packstringrequired

The pack's slug, as returned by the packs endpoints.

soundstringrequired

The sound's name from the asset listing.

Body

takestring

The take to ship, by its id from takes. Send it alone.

eventstring

The sound event it plays as.

categorystring

Which volume slider in the game's settings controls it.

Options: master, music, record, weather, block, hostile, neutral, player, ambient, voice

subtitlestringmax 80 characters

The words shown with subtitles on. Empty clears it.

loopboolean

Whether it is meant to loop: a note about what it is, which the Studio's loop tools and a vehicle's sounds read.

Response · 200

Saved. The sound as it now stands.

packstringrequired

The pack.

soundobjectrequired

The sound.

idstringrequired

The sound's id, its name in the asset listing.

namestringrequired

Its label.

eventstringrequired

The sound event it plays as. A vanilla event is replaced; any other is new.

categorystringrequired

Which volume slider controls it.

Options: master, music, record, weather, block, hostile, neutral, player, ambient, voice

subtitlestringrequired

Its subtitle. Null when it has none.

durationSecondsnumberrequired

How long the shipping take is.

loopbooleanrequired

Whether it is meant to loop.

statusstringrequired

generating, ready or error.

Options: generating, ready, error

promptstringrequired

What it was generated from. Null for an upload.

errorstringrequired

Why its generation failed. Null unless status is error.

takesarray of objectrequired

Every candidate, in the order they were made. Empty for a sound older than takes.

idstringrequired

The take's id within this sound.

durationSecondsnumberrequired

Its length.

createdAtstringrequired

ISO 8601.

selectedTakestringrequired

The take the pack ships. Null for a sound older than takes.

Error codes

Branch on error.code, never on the message.

invalid_json400

The request body wasn't a JSON object.

invalid_request400

Something in the body or query is wrong. message says what.

invalid_api_key401

The key isn't one of ours, or it has been revoked.

missing_api_key401

No Authorization: Bearer header was sent.

wrong_key_kind401

An MCP key sent to the REST API, or an API key sent to the MCP server. Each only opens its own.

account_suspended403

The account is suspended, so its keys open nothing. message says until when, if the suspension has an end date.

forbidden403

Valid key, but not permitted to do this in this pack.

plan_required403

The key is valid, but its account's plan does not include the API.

not_found404

No such pack, asset or job.