Attach a variant file to an asset
POST /assets/{id}/alternates
Streams the variant body content-addressed into storage, then attaches it as a sibling alternate. Replaces any existing alternate with the same label (the old pin is removed). Pass the kind tag in X-Alternate-Kind so the UI can group + filter; kind-specific metadata travels as JSON in X-Alternate-Metadata.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Header Parameters
Section titled “Header Parameters ”Human label shown in alt-file lists. Unique per asset; an upload with an existing label replaces the previous variant.
Provenance tag — palette_swap | thumbnail | low_res | authored | transcode. Free-form so new generators don’t need a backend change; defaults to “authored”.
JSON-encoded per-kind metadata. The sprite tool’s palette swap encodes its “from → to” colour map here; thumbnail workers encode dimensions. Opaque to the backend.
MIME type of the alternate bytes.
Request Body required
Section titled “Request Body required ”Responses
Section titled “ Responses ”Alternate attached
A sibling-version variant of an asset (palette swap, transcode, thumbnail, authored variant). Where companions are sidecars the primary asset references, alternates stand on their own and can be downloaded individually.
object
Human label shown in alt-file lists; unique per asset.
Example
walk — team-green paletteProvenance tag — palette_swap | thumbnail | low_res | authored | transcode. Open-ended.
Example
palette_swapExample
image/pngKind-specific JSON. Sprite tool palette swaps store the colour remap here.
object
Malformed request
object
Human-readable error summary
Example
the request could not be completedAuthentication required, missing, or invalid
object
Human-readable error summary
Example
the request could not be completedExample
{ "error": "authentication required: sign in and retry with a valid session or API token"}Resource not found
object
Human-readable error summary
Example
the request could not be completedUnexpected server error
object
Human-readable error summary
Example
the request could not be completed