Update an asset
PATCH /assets/{id}
Changes the fields you send and leaves the rest as they are. tags
and metadata replace the whole set or object; to add tags without
replacing them, use POST /assets/{id}/tags.
Changing title, description, tags or metadata needs the
asset’s owner, assets.admin (global, or for the asset’s team or a
team above it) or system.admin, and so does any request that
doesn’t change status. Anyone else gets 403 and nothing is
written. Even a request that changes nothing updates updated_at.
A status change is checked by its direction. The owner and
system.admin can make any change. Anyone else needs
assets.publish to go from draft to active or back, both
assets.publish and assets.unarchive to go from archived to
active, assets.archive to archive, and assets.unarchive to go
from archived to draft, each held globally or for the asset’s
team. Sending the status the asset already has isn’t a change.
To avoid overwriting someone else’s edit, send the updated_at you
last read as if_unchanged_since; if the stored value differs you
get 409. It’s a check, not a lock: two requests sent with the same
value at the same time can both succeed. Background processing also
changes updated_at.
The response is the updated asset, without tag_details or
subtitle_tracks, or the placeholder if you can’t open it. The
change is saved before the response is built, so a 500 can follow a
change that was saved.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”Send only the fields you want to change. Leaving a field out, or
sending null, keeps its value.
object
New title. Surrounding spaces are trimmed, and an empty title gets 400.
New description. An empty string clears it.
New status. Who may change it depends on the direction of the change; see the operation’s description.
Set or clear the mature rating. true is refused with 400 when the
instance doesn’t allow mature content. false is always accepted,
so a rating can still be removed after the instance stops allowing
mature content.
Set the AI declaration: none, assisted or generated. Leaving
it out or sending null keeps the current value; to make the work
undeclared again, send clear_ai_provenance: true instead.
Send true to return the work to undeclared. Sending it together
with a non-null ai_provenance gets 400.
Replaces every tag on the asset, including AI and imported tags; the new ones are recorded as manual. Each is trimmed, empty ones and repeats are dropped, and tags are case-sensitive. [] removes them all.
Replaces the whole metadata object, including sections added by background processing. {} clears it.
object
The updated_at you last read. If the stored value is different
(compared to the microsecond), you get 409 and nothing is written.
Leave it out to skip the check.
Responses
Section titled “ Responses ”The updated asset.
An asset: a record with a title, tags and other details, and
optionally a link to one stored file. Which fields appear depends on
the endpoint, so treat everything except id and restricted as
optional.
If its sensitivity tier keeps you from opening an asset, you get a
placeholder instead: restricted is true, and apart from id
only owner_display_name can appear, so you can show whose work it
is and offer to request access. GET /assets/{id} can also attach
subtitle_tracks to a placeholder. Someone who can manage an asset
without being able to open it gets its fields, but no thumbhash,
and its preview flags are false.
object
true when this is a placeholder for an asset you can’t open.
Always present, so check it before reading anything else.
On a placeholder only: the owner’s display name. Absent when there’s no name that can be shown, for example to an anonymous visitor when the owner hides their profile from them.
Anonymous visitors see only active assets. draft and archived don’t hide an asset from other signed-in accounts.
true when the work is rated mature. The rating is about who has
chosen to see mature work; it’s separate from the sensitivity tier,
which decides who is allowed to see it.
A viewer qualifies for mature work when the instance allows it and
they’ve opted in; signed-in owners and system.admin are let
through either way. For anyone else, the browse list leaves mature
assets out and their files are refused, but GET /assets/{id} still
returns the record, so use this flag to label what you show. GET /assets reports false on every readable item, and placeholders
leave it out.
The maker’s statement about generative AI in this work: none,
assisted or generated. Absent means nobody has said, which isn’t
the same as none; show it as “not stated” or show nothing. It’s a
label people can filter by, never a reason to hide the work. GET /assets leaves it out even when it’s set.
The SHA-256 of the linked file, as used by GET /storage/objects/{hash}. Absent when no file is linked.
The file’s size in bytes, when recorded. Assets created with POST /assets don’t record it.
The asset’s tags, as plain strings. tag_details has the same tags
with where each one came from.
The same tags with their source and, for AI tags, confidence and
model. Only GET /assets/{id} includes it, and only when the asset
has tags.
One tag and where it came from.
object
The tag.
manual for tags people added, ai for AI tagging, import for
imported tags. AI tagging replaces only earlier AI tags; replacing
the tag list with PATCH /assets/{id} removes all three kinds.
For AI tags, the provider’s confidence from 0 to 1. Absent for other tags.
For AI tags, the provider that suggested it, such as openai or ollama.
For AI tags, the model that suggested it.
Free-form JSON stored with the asset. Clients can keep their own keys here, and background processing adds its own sections. Updating it replaces the whole object.
object
The asset’s workflow state, if it has one.
The team the asset is assigned to. It’s set when the asset is created and can’t be changed. Absent when there is none, and on placeholders.
Where the asset’s preview processing stands, as recorded. pending
means the preview job hasn’t finished or never started: an asset
with no linked file, or whose job couldn’t be queued, stays
pending, and its variants can return 404. ready means the
preview job finished or none was needed; other background jobs, such
as transcription, may still be running. failed means the preview
job stopped with an error. While a job runs, the value can also be
processing, which isn’t in the list below. Anonymous visitors see
only ready assets.
Like the preview flags, this is a stored marker: it doesn’t check that the file or its renditions are actually in storage.
true when a col thumbnail is recorded for the file and you may
see the asset’s pictures. When it’s false, don’t request one.
This and the other preview hints (ladder_available,
scrub_available, thumbhash) come from the server’s records, not
from storage, so a request can still fail if a stored copy is
missing. “May see the pictures” follows the sensitivity tier; on
GET /assets/{id} it doesn’t take the mature rating into account,
so a viewer who doesn’t qualify for mature work can see true and
still have the request refused.
true when every size in the instance’s preview ladder (see GET /previews) is recorded and you may see the asset’s pictures, on the
same basis as preview_available. Check it before requesting the
larger sizes; preview_available covers only the col thumbnail.
true when a sprites.vtt hover-scrub file is recorded and you may
see the asset’s pictures, on the same basis as preview_available.
Whether an anonymous visitor would be shown this asset: it’s live,
active, public and processed. The answer is the same for
everyone, so it says nothing about what you can see. It doesn’t take
the mature rating or the instance’s anonymous-browsing setting into
account. Useful when choosing a cover for something public.
A small encoded blur of the image (a base64 thumbhash) to show while
it loads. Absent when there isn’t one or you may not see the asset’s
pictures, on the same basis as preview_available.
The width in pixels of the image the previews are made from, when it
has been recorded. For files without pixels, such as 3D models,
fonts or audio, it’s the size of the image their preview is drawn
from. Photos are measured after their EXIF rotation. pixel_width
and pixel_height always come together or not at all.
The height to go with pixel_width.
When the asset last changed, including changes made by background processing. Send it as if_unchanged_since when you update.
When the asset was deleted. Only soft-deleted assets in GET /assets?include_deleted=true results have it.
The reason given when it was deleted, if any. Appears with deleted_at.
Subtitle and caption tracks for the asset. Only GET /assets/{id}
includes them, and only when there are some.
One subtitle or caption track. An asset has at most one per language; uploading another for the same language replaces it.
object
The track’s language tag, such as en or fr-CA. und means the
language couldn’t be worked out from the file name.
A display name, such as English (US) or Forced. Empty when none
was given.
The SHA-256 of the stored WebVTT file.
The format the track was uploaded in. It’s stored as WebVTT whatever the source format.
How reliable the conversion to WebVTT is, from 0 to 1. Every format accepted today converts from text and gives 1; image-based subtitles, such as DVD IDX files, aren’t accepted yet.
Field values to show on a card, already formatted and in the order the operator set. Absent when there are none and on placeholders. Only fields without a read restriction can appear.
One field value to show on a card.
object
The field’s code.
The field’s name, for a caption.
The value as one line of text. Never empty: a field with no value is left out instead.
The federated instance this asset came from. Absent for local assets.
object
The owner’s name and avatar, for showing on a card. Absent when the owner can’t be shown, for example to an anonymous visitor when the owner hides their profile from them, and on placeholders.
object
The handle. Also the profile link target
(/users/by-username/{username}).
The name to show, never empty: the profile’s display name, then the
account’s full name, then the username, and as a last resort user
followed by the account number. For readers who aren’t signed in,
the account’s full name is skipped; the display name and username
are still used.
The avatar URL stored on the user’s profile, if there is one; left out when none is stored.
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"}Authenticated but missing required capabilities
object
Human-readable error summary
Example
the request could not be completedResource not found
object
Human-readable error summary
Example
the request could not be completedThe asset’s updated_at no longer matches if_unchanged_since.
Reload it and try again.
Returned with 409 when the item changed after the version you sent.
object
A short explanation.
The item’s current updated_at.