v1

latestOpenAPI 3.0.02026-07-13650400.5 KB
Tailored Generation

Update Image Caption

Update the caption of a specific image. There are two mutually exclusive ways to update a caption:

  1. Provide a new caption text:

    • Use the caption parameter
    • This will set caption_source to "manual"
    • Reflects a human-written caption
  2. Request automatic caption regeneration:

    • Set regenerate_caption to true
    • This will set caption_source to "automatic"
    • A new caption will be generated automatically based on the image and caption_prefix
    • For the same caption_prefix, regenerate_caption will always return the same caption
    • Useful for resetting captions or regenerating them after changing the caption_prefix

Note: You cannot provide both parameters simultaneously as they represent different update approaches.

Constraints:

  • Cannot update captions in a completed dataset
  • Cannot provide both caption and regenerate_caption in the same request
put/tailored-gen/datasets/{dataset_id}/images/{image_id}

Path parameters

dataset_idstring required

Dataset ID

image_idinteger required

Image ID

Headers

api_tokenstring required

Request body

captionstring

New caption text. When provided, sets caption_source to "manual"

regenerate_captionboolean

When true, generates new caption automatically and sets caption_source to "automatic"

Response

Caption successfully updated

idinteger

Unique identifier for the image

dataset_idinteger

ID of the dataset this image belongs to

captionstring

Updated caption for the image

caption_source'automatic' | 'manual'

Source of the updated caption

image_namestring

Name of the image

image_urlstring

URL of the original image file

thumbnail_urlstring

URL of the image thumbnail

created_atstring date-time

Timestamp when the image was created

updated_atstring date-time

Timestamp when the image was last updated