---
title: "Upload Image Files"
method: POST
path: "/tailored-gen/datasets/{dataset_id}/images"
tags: ["Dataset"]
---

# Upload Image Files

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

Upload a new image to a dataset.

**Image Requirements:**
- Recommended minimum resolution: 1024x1024 pixels for best quality
  - By default, smaller images (down to 256x256) will be automatically upscaled (`increase_resolution=true`)
  - To strictly enforce the 1024x1024 minimum, set `increase_resolution=false`
- Supported formats: jpg, jpeg, png, webp
- Preferably use original high-quality assets

**Dataset Guidelines:**
- Recommended: 5-50 images for optimal results
- Maximum supported: 200 images
- Ensure consistency in style, structure, and visual elements
- Balance diversity in content while maintaining consistency in key elements

**For optimal training (especially for characters/objects):**
- Subject should occupy most of the image area
- Minimize unnecessary margins around the subject
- Transparent backgrounds will be converted to black
- For character datasets: include diverse poses, environments, attires, and interactions

**Constraints:**
- Can only be used by "basic" upload type datasets. Use images/bulk for advanced datasets.
- Dataset must have at least 5 images
- Dataset cannot exceed 200 images
- Cannot upload to a completed dataset

This API endpoint supports content moderation via an optional parameter.

## Path parameters

- `dataset_id` integer, required

## Headers

- `api_token` string, required

## Request body

- object
  - `file` string, binary — Image file to upload (required if image_url not provided)
  - `image_url` string — URL of image to upload (required if file not provided)
  - `image_name` string — Custom name for the image (optional)
  - `increase_resolution` boolean — When enabled (default), input images smaller than 1024x1024 but larger than 256x256 will be automatically upscaled. If false, images must be at least 1024x1024 pixels.
  - `content_moderation` boolean

## Response `201`

Image successfully uploaded

- object
  - `id` integer
  - `dataset_id` integer
  - `caption` string, nullable — The generated caption. Null if uploaded without a visual schema.
  - `caption_source` 'automatic' | 'manual' | 'pending', nullable
  - `image_name` string
  - `image_url` string
  - `thumbnail_url` string
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Dataset not found
- `409` — Conflict error (completed dataset or max images reached)
- `412` — Precondition Failed (resolution too low)
- `415` — Unsupported Media Type.
- `422` — Unprocessable Entity (moderation failure or invalid URL)
- `429` — Request limit exceeded.
- `500` — Internal server error

---

[API](https://skmtc.net/bria-ai/apis/tailored-generation-api-reference.md) · [All operations](https://skmtc.net/bria-ai/apis/tailored-generation-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bria-ai/tailored-generation-api-reference/revisions/806c6d31631b/schema)
