# 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 parameter * This will set to "manual" * Reflects a human-written caption 2. Request automatic caption regeneration: * Set to true * This will set 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 Endpoint: PUT /tailored-gen/datasets/{dataset_id}/images/{image_id} ## Path parameters: - `dataset_id` (string, required) Dataset ID - `image_id` (integer, required) Image ID ## Header parameters: - `api_token` (string, required) ## Request fields (application/json): - `caption` (string) New caption text. When provided, sets caption_source to "manual" - `regenerate_caption` (boolean) When true, generates new caption automatically and sets caption_source to "automatic" ## Response 200 fields (application/json): - `id` (integer) Unique identifier for the image - `dataset_id` (integer) ID of the dataset this image belongs to - `caption` (string) Updated caption for the image - `caption_source` (string) Source of the updated caption Enum: "automatic", "manual" - `image_name` (string) Name of the image - `image_url` (string) URL of the original image file - `thumbnail_url` (string) URL of the image thumbnail - `created_at` (string) Timestamp when the image was created - `updated_at` (string) Timestamp when the image was last updated ## Response 400 fields (application/json): - `error` (string) Error message