---
title: "Update Asset"
method: PUT
path: "/api/projects/{project_id}/assets/{asset_id}"
---

# Update Asset

`PUT /api/projects/{project_id}/assets/{asset_id}`

Update an existing asset with a new generated image.
This is used for asset revisions - instead of creating a new asset,
the existing asset's image_url is updated.

Args:
    project_id: Project ID containing the asset
    asset_id: Asset ID to update
    prompt: New text description of the asset
    files: Optional list of reference images for generation
    preview: If True, generates image and returns URL without persisting to DB.
             User can then accept (call again with preview=False) or discard.
    commit_url: If provided, skips generation and commits this URL to DB directly.
                Used when accepting a previewed image.
    current_user: Authenticated user
    db: Database session
    
Returns:
    Updated asset data with new image URL

## Path parameters

- `project_id` string, required
- `asset_id` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/latted/apis/motion-graphics-designer-api.md) · [All operations](https://skmtc.dev/latted/apis/motion-graphics-designer-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/latted/motion-graphics-designer-api/revisions/36d149b525df/schema)
