resourcepack.ai
DOCS

Packs

Switch an asset to another version its generation drew

The asset becomes that version, as clicking it on Studio's Versions card does. Free. Recorded in the asset's versions history as a pick, so restore_asset_version undoes it. Part of the paid plans; not while an AI edit of it is running (already_running).

POST/packs/{pack}/assets/{kind}/{name}/candidates/{index}/use

Path parameters

packstringrequired

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

kindstringrequired

The asset's kind from the listing.

Options: texture, model, font, sound

namestringrequired

The asset's name from the listing.

indexstringrequired

A version's index from the list.

Response · 200

Switched.

packstringrequired

The pack.

statusstringrequired

Always switched.

indexintegerrequired

The version it is now.

Error codes

Branch on error.code, never on the message.

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.

paid_plan_required403

This is part of the paid plans, and the pack's plan is Starter.

plan_required403

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

not_found404

No such pack, asset or job.

already_running409

An AI edit or generation of that asset is still running. Wait for its job, then send the edit again.