---
title: "Regenerate All Captions"
method: PUT
path: "/tailored-gen/datasets/{dataset_id}/images"
tags: ["Tailored Generation"]
---

# Regenerate All Captions

`PUT /tailored-gen/datasets/{dataset_id}/images`

Regenerate captions for all images in dataset. This action is crucial after the user updates the caption_prefix, and then it's recommended to regenerate all the captions of all images, to have full compatibility with the new caption_prefix.

This is an asynchronous operation. Once this endpoint is called, Get Dataset by ID should be sampled until the captions_update_status changes to 'completed'.

## Path parameters

- `dataset_id` string, required

## Headers

- `api_token` string, required

## Response `202`

Caption regeneration process started

- object
  - `id` integer — Unique identifier for the dataset
  - `project_id` integer — Associated project ID
  - `name` string — Dataset name
  - `caption_prefix` string — Text automatically prepended to all image captions in the dataset. Each image caption should naturally continues this prefix. A default prefix is automatically created but can be modified, and this same prefix is later used as the default generation prefix during image generation.
  - `status` 'draft' | 'completed' — Status of the dataset
  - `captions_update_status` 'empty' | 'in_progress' | 'completed' — Status of captions update process
  - `created_at` string, date-time — Timestamp when the dataset was created
  - `updated_at` string, date-time — Timestamp when the dataset was last updated

## Other responses

- `401` — Unauthorized
- `404` — Dataset not found
- `429` — Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
- `500` — Internal server error

---

[API](https://skmtc.net/bria-ai/apis/the-bria-api.md) · [All operations](https://skmtc.net/bria-ai/apis/the-bria-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bria-ai/the-bria-api/revisions/2768230345a5/schema)
