# 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 (or visual_schema for FIBO) FIBO Dataset Validation: If the image belongs to a dataset with training_version = fibo: * The caption string must contain a valid JSON structure. * The JSON content is validated against a pre-defined caption schema. * The system will attempt to auto-correct minor structural issues. * If the JSON is invalid or structurally incorrect beyond repair, a 400 error is returned. 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` (integer, 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". * For legacy datasets: Standard text string. * For FIBO datasets: String containing valid JSON structure. - `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 ## Response 401 fields ## Response 404 fields ## Response 409 fields ## Response 410 fields ## Response 429 fields ## Response 500 fields