# Update Image Caption

Update the caption of a specific image. Two mutually exclusive options:

1. Provide a new caption: Use the caption parameter (sets caption_source to "manual"). The caption must be a string containing a valid JSON structure.
2. Regenerate automatically: Set regenerate_caption to true (sets caption_source to "automatic").

Constraints:
* Cannot update captions in a completed dataset
* Cannot provide both caption and regenerate_caption

Endpoint: PUT /tailored-gen/datasets/{dataset_id}/images/{image_id}

## Path parameters:

  - `dataset_id` (integer, required)

  - `image_id` (integer, required)

## Header parameters:

  - `api_token` (string, required)

## Request fields (application/json):

  - `caption` (string)
    New caption text as a string containing valid JSON structure.

  - `regenerate_caption` (boolean)
    When true, generates new caption automatically.

## Response 200 fields (application/json):

  - `id` (integer)

  - `dataset_id` (integer)

  - `caption` (string)

  - `caption_source` (string)
    Enum: "automatic", "manual"

  - `image_name` (string)

  - `image_url` (string)

  - `thumbnail_url` (string)

  - `created_at` (string)

  - `updated_at` (string)


## Response 400 fields

## Response 401 fields

## Response 403 fields

## Response 404 fields

## Response 409 fields

## Response 429 fields

## Response 500 fields
