Dataset

Add rows to a dataset from the curated pool

Changed on

Retrieves additional rows matching this dataset and returns them as a new dataset, leaving this one unchanged. The new dataset carries this dataset’s rows alongside the retrieved ones, so it can be trained on or downloaded directly. Omit both row counts to receive the recommended fill and its cost as a quote; a run needs explicit row counts, or fill_to_recommended=true to fill any count you leave out with its recommended value. Poll GET /datasets/{dataset_id}/status on the returned id until it reaches succeeded. Set estimate=true to price the request without starting a run.

post/api/v1/datasets/{dataset_id}/augment

Request

Path parameters

dataset_idstring required

Request body

domain_rowsnumber

How many additional rows to retrieve from topics matching this dataset. Omit domain_rows and general_rows to receive the recommended fill and its cost as a quote; a run needs a count, or fill_to_recommended=true.

general_rowsnumber

How many additional rows to retrieve from other topics, to broaden the dataset. Omit domain_rows and general_rows to receive the recommended fill and its cost as a quote; a run needs a count, or fill_to_recommended=true.

similar_rowsnumber

How many new rows to generate in the style of this dataset. A sample of its rows is analysed for topic, language and prompt/completion conventions, and new rows are generated to match. Combines with domain_rows and general_rows in one run, and is never filled from the recommendation. Naming it makes the request explicit rather than a quote. Defaults to 0.

fill_to_recommendedboolean

When true, fills every count you leave out (domain_rows, general_rows) with its recommended value; a count you name is used as given. Omit every count (including similar_rows) and leave this false to receive the recommended fill as a quote instead.

training_type'instruction_dataset' | 'preference_pairs'

Shape of the rows to retrieve. instruction_dataset (default) retrieves prompt/completion pairs for SFT; preference_pairs retrieves chosen/rejected pairs for DPO.

estimateboolean

When true, validates the request and returns the estimated credit cost without starting a run or creating a dataset.

idempotency_keystring

Opaque key that makes a retried request safe. A second request carrying the same key returns the dataset the first one created instead of starting and charging for a second run.

Example request

{
  "domain_rows": 3000,
  "general_rows": 1000,
  "similar_rows": 500,
  "training_type": "instruction_dataset"
}

Response

dataset_idstring nullable required

The augmented dataset. It carries this dataset’s rows plus the retrieved ones, and is ready to download once its status reaches succeeded. Null for an estimate, which creates nothing.

status'pending' | 'running' | 'awaiting_input' | 'succeeded' | 'failed' nullable required

Status of the augmented dataset at the moment this response was sent, in the same vocabulary GET /datasets/{dataset_id}/status reports. Poll that endpoint until it reaches succeeded or failed. An idempotent replay of a finished run returns its terminal status here.

domain_rowsnumber required

Rows this run retrieves from topics matching the dataset, or the recommended fill an estimate priced.

general_rowsnumber required

Rows this run retrieves from other topics, to broaden the dataset, or the recommended fill an estimate priced.

estimated_credits_consumednumber required

Credits this run consumes, charged against the requested rows.

estimateboolean required

Whether this was an estimate-only request (no run started).

Example response

{
  "dataset_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "running",
  "domain_rows": 17000,
  "estimated_credits_consumed": 40
}

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the media type application/json for the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status