Skip to content
Console
Menu

Alerts and status pages

App store purchases

Credits

Knowledge

KV

Notifications

Organizations

Storage

Workflows

API reference

Getting Started

Authentication

KV Store

Assets

An Asset is one declared asset and its generated variants.

An Asset is one declared asset and its generated variants. Its id is the 16-hex logical key of the recipe, so the same recipe is always the same Asset. There is no create, update or delete: the key is immutable, and :generate writes the record.

Service Sylphx Generated Assets · Resource type assets.sylphx.com/Asset · Name pattern orgs/{org}/projects/{project}/envs/{env}/assets/{asset} · Shape record

#Fields

FieldTypeWhat it is
namestringorgs/{org}/projects/{project}/envs/{env}/assets/{asset}, where {asset} is the 16-hex logical key.
uidstringast_<cell><ulid>; never reused. Output only.
metaResourceMetaResource metadata.
keystringThe logical key: 16 lowercase hex characters computed from the recipe. Output only.
kindAssetKindWhat kind of asset this is. Output only. One of image, sfx, music, video, character, voice.
recipeAssetRecipeThe recipe the asset was declared with. Output only.
canonicalstringThe exact text the key is the hash of. Output only.
variants_wantedint32How many variants the recipe asks for. Output only.
stateAssetStateWhere the asset is in its life. Output only. One of pending, ready, approved, failed, refused, unsupported.
conditionsCondition[]Ready, Reconciling, Stalled. Output only.
seedstringThe seed of the asset, a decimal integer as a string. Output only.
variantsVariant[]The stored variants, ordered by slot. Output only.
create_timetimestampWhen the asset was first generated. Output only.
update_timetimestampWhen the asset last changed. Output only.

#Methods

Every method of the collection, in the registry's order, with the scope it needs. The full request, response and examples are one link away.

MethodCallWhat it does
GETgetGets an asset.
GETlistLists assets. The filter is limited to kind, state, and review_state.
GETexportExports every servable variant in the environment as one flat, paged manifest, independent of the keys the code declares. Rejected and retired variants are left out unless filter asks for their review_state. The last page carries a digest a client checks to know it holds the whole set.
POSTgenerateRecords the recipes as assets and generates the variants that are missing. Each call is idempotent and works within a bounded time; call again until pending is 0.
POSTlockReturns the assets.lock entries and canonical text for the keys the call names, and only those. A read with a request body, like a query.
POSTapprove_variantApproves one variant and records who approved it.
POSTreject_variantRejects one variant. Its slot is freed and the next :generate fills it; the rejected file keeps serving at its URL.
POSTretire_variantRetires one variant. Its URL answers 404 from then on and its slot is freed.

#get

Gets an asset.

GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/assets/asset · scope assets:read · effect read · Request, response and examples

#list

Lists assets. The filter is limited to kind, state, and review_state.

GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/assets · scope assets:read · effect read · paginated · Request, response and examples

#export

Exports every servable variant in the environment as one flat, paged manifest, independent of the keys the code declares. Rejected and retired variants are left out unless filter asks for their review_state. The last page carries a digest a client checks to know it holds the whole set.

GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/assets:export · scope assets:read · effect read · Request, response and examples

#generate

Records the recipes as assets and generates the variants that are missing. Each call is idempotent and works within a bounded time; call again until pending is 0.

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/assets:generate · scope assets:write · effect write · Request, response and examples

#lock

Returns the assets.lock entries and canonical text for the keys the call names, and only those. A read with a request body, like a query.

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/assets:lock · scope assets:read · effect read · Request, response and examples

#approve_variant

Approves one variant and records who approved it.

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/assets/asset:approveVariant · scope assets:write · effect write · Request, response and examples

#reject_variant

Rejects one variant. Its slot is freed and the next :generate fills it; the rejected file keeps serving at its URL.

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/assets/asset:rejectVariant · scope assets:write · effect write · Request, response and examples

#retire_variant

Retires one variant. Its URL answers 404 from then on and its slot is freed.

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/assets/asset:retireVariant · scope assets:write · effect destructive · Request, response and examples