Skip to content

MediaAttachment

A media file, as an upload of the user (the media operations) or as an attachment of a status (Status.media_attachments). url, preview_url, variants, and blurhash are present once the file is ready; statuses attach only ready files. In a status, description is the status revision’s own copy of the alternative text, absent when the attachment has none.

A file of a remote status is always ready: the instance does not process it, so it has no variants; url and preview_url are its media proxy URLs, remote_url its URL on the remote server, and meta, blurhash, and type what the remote server declared.

object
id
required

The ID of a resource, a UUIDv7 in its canonical string form.

string format: uuid
type
required

The kind of media. An accepted upload is an image, a video, or an audio file; a file that failed processing is unknown. gifv is a remote video that plays like an animated image: muted, looped, without controls.

string
Allowed values: image gifv video audio unknown
state
required

The processing state: processing until the server has re-encoded the file, then ready, or failed when the content could not be processed.

string
Allowed values: processing ready failed
description

The alternative text; absent when there is none.

string
<= 1500 characters
blurhash

The blurhash (https://blurha.sh) of the image, to show while it loads.

string
meta
required

Schema: MediaMeta

object
variants

Schema: MediaVariants

object
url

Where the file is served on this instance; for an upload, variants.large.url, or variants.animated.large.url for an animation, and the file itself for a video or audio file.

string format: uri
preview_url

Where its preview is served; for an upload, variants.small.url (still). A video or audio file without a poster has none.

string format: uri
remote_url

The file’s URL on the remote server, for a file of a remote status; clients load url instead.

string format: uri

Example generated

{
"id": "01890a5d-ac96-774b-bcce-b302099a8057",
"type": "image",
"state": "processing",
"description": "example",
"blurhash": "example",
"meta": {},
"variants": {},
"url": "https://example.com",
"preview_url": "https://example.com",
"remote_url": "https://example.com"
}

For LLMs and coding agents:llms.txt,llms-full.txt, llms-small.txt

Analytics on this site