---
title: "Update Dataset"
method: PUT
path: "/tailored-gen/datasets/{dataset_id}"
tags: ["Tailored Generation"]
---

# Update Dataset

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

Update a dataset.

In order to use a dataset in a model training, its status must be set to completed.

Once a dataset status is changed to completed:
* Images cannot be added or removed
* Image captions cannot be edited
* Caption prefix cannot be modified

It is recommended to use the route Clone Dataset As Draft in order to create a new version of a dataset.

Constraints:
* Cannot update caption_prefix if dataset status is completed
* Dataset must have at least 1 image to be marked as completed

## Path parameters

- `dataset_id` string, required

## Headers

- `api_token` string, required

## Request body

- object
  - `name` string — New dataset name (optional)
  - `caption_prefix` string — New caption prefix (optional). Cannot be updated if dataset status is completed. If the user has updated the caption prefix, it is crucial to Regenerate All Captions using the endpoint PUT /datasets/{dataset_id}/images/
  - `status` 'draft' | 'completed' — Dataset status (optional). Can be set to completed to enable usage in model training

## Response `200`

Dataset successfully updated

- 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

- `400` — Bad request - validation error
- `401` — Unauthorized
- `404` — Dataset not found
- `409` — Conflict error
- `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)
