v1Resources/Media/postAI-edit an asset

AI-edit an asset

Regenerates a Sydekick-generated asset's image (or text) in place from a text prompt — the same "Edit with AI" action available in the Data tab. Sydekick-generated assets only; uploads and synced media return a 409. Runs a background job that can take a minute or more on a cold start.

post/api/v1/media/{id}/edit
media:write
Query parameters
idstringrequired
The generated asset to edit, percent-encoded (e.g. generated%3Aabc123).
Request body
promptstringrequired
What to change, in plain language.
Response
dataobjectoptional
assetobjectoptional
keystringoptional
Composite identifier for the asset, formatted as "<source>:<id>".
sourcestringoptional
Where this asset originated (e.g. an OS upload vs. an imported source).
idstringoptional
The asset's id within its source.
titlestringoptional
The asset's title.
filenamestringoptional
The asset's original filename.
mimestringoptional
The asset's MIME type.
kindstringoptional
The asset's kind (photo or video).
sizeBytesnumberoptional
File size in bytes, or null when unknown.
urlstringoptional
Ready-to-use URL for the asset's bytes.
thumbnailUrlstringoptional
URL of a thumbnail preview, or null.
tagsarray of stringoptional
Tags attached to the asset.
folderIdsarray of stringoptional
Asset folders this asset belongs to.
locationIdsarray of stringoptional
Every location this asset is associated with.
Errors
400The request is missing a required parameter or is otherwise malformed.
401Missing, invalid, expired, or revoked API key.
403The key lacks the required scope, or isn't authorized for this client/location.
404The resource wasn't found, or doesn't belong to your agency.
409Only Sydekick-generated assets can be AI-edited.
422The request is missing a required parameter or is otherwise malformed.
429Too many requests. Retry after the number of seconds in the Retry-After header.
post/api/v1/media/{id}/edit
Your API key
id *
Request body*
{
  "data": {
    "asset": {
      "key": "upload:def456",
      "source": "upload",
      "id": "def456",
      "title": "Storefront photo (edited)",
      "filename": "storefront-edited.jpg",
      "mime": "image/jpeg",
      "kind": "image",
      "sizeBytes": 511204,
      "url": "https://cdn.synup.com/media/def456.jpg",
      "thumbnailUrl": "https://cdn.synup.com/media/def456-thumb.jpg",
      "tags": [
        "VIP"
      ],
      "folderIds": [
        "folder_1"
      ],
      "locationIds": [
        "loc_456"
      ]
    }
  }
}