resourcepack.ai
DOCS

Packs

List a pack's assets

Page until nextCursor is null. An asset's id is also its job handle, so this is how you find the handle for something generated in an earlier run.

Note the four storage kinds don't map one-to-one onto the six things you can generate: item sprites and GUI sheets are both stored as texture under a prefixed name (item:sword, gui:hud), icons are stored as font, and a 3D item is a model.

GET/packs/{pack}/assets

Path parameters

packstringrequired

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

Query parameters

kindstring

Only assets of this storage kind.

Options: texture, model, font, sound

limitinteger1–200default 50

How many to return.

cursorintegermin 0

From the previous response's nextCursor.

Response · 200

One page of assets.

assetsarray of objectrequired

This page of assets.

idstringrequired

Stable id, and the job handle this asset was created under.

kindstringrequired

Which store it lives in.

Options: texture, model, font, sound

namestringrequired

Its name within the pack. Prefixed for item sprites and GUI sheets.

statusstringrequired

Where the generation got to.

Options: generating, ready, error

displayNamestring

The label you gave it, if any.

promptstring

What it was generated from.

errorstring

Why it failed. Null unless status is error.

sizeBytesinteger

Size of the stored file.

updatedAtstringrequired

ISO 8601.

nextCursorstring

Pass as cursor for the next page. Null on the last page.

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.

plan_required403

The key is valid, but its account is on Starter. The API needs a paid plan.

not_found404

No such pack, asset or job.