---
title: "Grow Dataset"
method: POST
path: "/v1/dataset/grow"
tags: ["dataset-analysis"]
---

# Grow Dataset

`POST /v1/dataset/grow`

## Request

- Base URL: `https://api.pioneer.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pioneer.ai/v1/dataset/grow`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/pioneer/apis/brain-api/docs/v1/dataset/grow/post.ts> (a function with typed inputs; its response is checked against the schema)

Grow an existing dataset by generating new synthetic examples.

Takes an existing classification or NER dataset and generates additional
examples to reach the target size. Supports class balancing to ensure
equal representation of each class.

Args:
    request: Growth request with dataset ID, target size, and options.
    auth: Authentication result with user ID and client.

Returns:
    GrowDatasetResponse with new dataset info and generation statistics.

Raises:
    HTTPException: If dataset not found, invalid type, or generation fails.

## Request body

- GrowDatasetRequest: Request to grow an existing dataset by generating new examples. Supports both classification and NER datasets. When class_balance is enabled, generates equal examples per class. Otherwise, generates equal examples per source example from the original dataset.
  - `dataset_id` string, required: ID of the existing dataset to grow from
  - `new_dataset_name` string, required: Name for the new grown dataset
  - `target_size` integer, required: Total number of examples in the final dataset
  - `class_balance` boolean: If True, balance classes equally. If False, generate equal examples per source example.
  - `domain_description` string, nullable: Override domain description for generation context
  - `temperature` number: Generation temperature
  - `session_id` string, nullable: Session ID for log streaming

## Response `200`

Successful Response

- GrowDatasetResponse: Response from dataset grow operation.
  - `success` boolean, required: Whether the operation succeeded
  - `dataset` object, required: New dataset info (id, name, path, version)
  - `original_size` integer, required: Number of examples in the original dataset
  - `new_size` integer, required: Total number of examples in the new dataset
  - `generated_count` integer, required: Number of new examples generated
  - `distribution` object, required: Number of examples generated per class/label
  - `token_usage` integer, nullable: Estimated tokens used for generation

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-24** `0e5e86e2bae5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/pioneer/apis/brain-api/changes/v1/dataset/grow/post.md)

---

[API](https://skmtc.dev/pioneer/apis/brain-api.md) - [All operations](https://skmtc.dev/pioneer/apis/brain-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pioneer/apis/brain-api/revisions/0e5e86e2bae5?raw)
