Update an asset
Edits the user-editable metadata for a single asset — description, GPS coordinates, and original capture datetime. Only fields included in the request body are changed; others are left untouched. Passing null for a field removes a previously-set value; the response then falls back to the value embedded in the file when present. latitude and longitude must be set together (both written or both cleared).
Setting or clearing GPS coordinates re-enqueues reverse geocoding so location names refresh against the new effective coordinates.
For editing multiple assets in one round trip, prefer bulk_update_assets.
Path Parameters
Asset ID (with asset_ prefix) of the asset to update. Obtain from list_assets, search_assets, or list_album_assets.
Body
User-editable metadata for a single asset.
Mirrors the field shape of UserAssetMetadataUpdate; the service model
owns cross-field validation. See photos-api/docs/references/api-design.md
for the router-DTO + service-model pattern.
User-set description for the asset. Pass null to remove a previously-set value (the response then falls back to the description embedded in the file, if any). Omit to leave unchanged. Distinct from the AI-generated description field on the response — this writes to metadata.description.
GPS latitude in decimal degrees, [-90, 90]. Must be set together with longitude. Pass null (along with longitude=null) to remove a previously-set value; omit to leave unchanged.
GPS longitude in decimal degrees, [-180, 180]. Must be set together with latitude. Pass null (along with latitude=null) to remove a previously-set value; omit to leave unchanged.
When the asset was originally captured. Aware values store the offset from utcoffset() alongside; naive values store NULL offset. Pass null to remove a previously-set value — the response then falls back to the datetime embedded in the file when present, otherwise to the file's upload timestamp. Omit to leave unchanged.
Response
Successful Response
Represents a photo or video asset with metadata and access URLs.
Unique asset identifier with 'asset_' prefix
MIME type of the file (e.g., 'image/jpeg', 'video/mp4')
Original filename when the asset was uploaded
When the photo/video was taken, in the device's local timezone
When this asset record was created in the database
When this asset record was last updated
File/provenance scalars (device IDs, file timestamps, checksums, file size) grouped into one nested object. null when not requested via include=file_data; when present, every field is populated (checksum_sha1 may still be null for legacy rows).
Asset metadata — camera/EXIF fields, GPS, and location names. null when not requested via include=metadata.
ML-generated quality scores and other metrics. null when not requested via include=metrics.
Named asset variants. Images: 'original', 'thumbnail', 'small', 'preview', 'fullsize'. Videos: 'original', plus 'thumbnail_image', 'small_image', 'preview_image', 'fullsize_image' pointing at the extracted still. 'original' is served with a Content-Disposition attachment header (signed 'dl' filename param) so a top-level navigation saves it to disk, while inline subresource loads (, fetch) still render it. Variant URLs are stable: a derived variant may briefly 404 until its artifact is generated, then serve from the same URL.
AI-generated description of the asset's content, quality, and composition. null means description generation has not yet run; empty string means the model refused to describe the asset. Distinct from metadata.description (camera-embedded EXIF metadata).
Base64-encoded ThumbHash placeholder (~28 chars). Clients decode with the thumbhash library (JS / Swift / Kotlin) to render an instant blurred preview before the CDN thumbnail arrives. null while generation is pending.
All faces detected in this asset. null when not requested via include=faces; [] when requested but the asset has no faces.
All unique people identified in this asset (deduplicated from faces). null when not requested via include=people; [] when requested but none are identified.
Width of the asset in pixels
Height of the asset in pixels
Video length in seconds. null for images and for videos whose duration has not been extracted yet.
When this asset was moved to trash (ISO 8601, UTC). null for live assets. Trashed assets are excluded from default list/search results and are purged after the configured retention window.