v52

OpenAPI 3.1.0Apache 2.0raw.githubusercontent.com2026-08-03308532588.7 KB
Datasets

Expand dataset with synthetic samples

Generate synthetic dataset samples using LLM based on existing data patterns

post/v1/private/datasets/{id}/expansions

Path parameters

idstring uuid required

Request body

modelstring required

The model to use for synthetic data generation

sample_countinteger

Number of synthetic samples to generate

preserve_fieldsstring[]

Fields to preserve patterns from original data

variation_instructionsstring

Additional instructions for data variation

custom_promptstring

Custom prompt to use for generation instead of auto-generated one

max_completion_tokensinteger

Maximum number of tokens for the LLM response. Required by Anthropic, used as maxOutputTokens for Gemini. If not provided, defaults to 4000 for Anthropic models only.

Example request

{
  "model": "gpt-4",
  "sample_count": 10,
  "preserve_fields": [
    "input",
    "expected_output"
  ],
  "variation_instructions": "Create variations that test edge cases"
}

Response

Generated synthetic samples

modelstring

Model used for generation

total_generatedinteger

Total number of samples generated

generation_timestring date-time

Generation timestamp

Example response

{
  "model": "gpt-4",
  "total_generated": 10
}