Dataset

Adapt a dataset (or estimate cost)

Changed on

Validates column mapping and recipe configuration, reserves credits, and starts the adaptation pipeline, which improves the rows already in the dataset without changing how many there are. To add rows instead, use POST /datasets/{dataset_id}/augment. Set estimate=true to validate and get a cost quote without starting a run. When the mapped image column is also in context_columns, output rows are billed at 10 credits per 100 rows (1–100 rows cost 10 credits; see multimodalPricingApplied and creditMultiplier on the response). Once the run succeeds, train on the result with POST /autoscientist.

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

Request

Path parameters

dataset_idstring required

Request body

training_type'instruction_dataset' | 'preference_pairs'

How to adapt the dataset. instruction_dataset (default) produces enhanced prompt/completion pairs for SFT; preference_pairs generates chosen/rejected pairs for DPO. Source columns are the same in both cases — column_mapping.prompt (and optionally completion) — the chosen/rejected fields are produced by the adaptation pipeline.

estimateboolean

When true, validates the request and returns the estimated credit cost without starting a run. The request’s column_mapping and expansion fields are still saved to the dataset, as they are what the estimate prices.

Example request

{
  "column_mapping": {
    "prompt": "instruction",
    "completion": "response",
    "chat": "messages",
    "context": [
      "context"
    ],
    "universal_prompt": "Reframe the following passage as a clear, factual question.",
    "image": "image_column"
  },
  "recipe_specification": {
    "version": "2026-04",
    "recipes": {
      "prompt_rephrase": true,
      "deduplication": true
    }
  },
  "brand_controls": {
    "length": "concise",
    "safety_categories": [
      "harassment",
      "hate"
    ],
    "hallucination_mitigation": true,
    "blueprint": "All generated text must be written exclusively in Brazilian Portuguese (pt-BR)."
  },
  "training_type": "instruction_dataset",
  "translate": {
    "languages": [
      "es",
      "fr"
    ],
    "sample_rate": 0.25
  },
  "localize": {
    "pairs": [
      {
        "country": "ES",
        "language": "ca"
      }
    ],
    "sample_rate": 0.25
  },
  "expand": {
    "similar_rows": 500,
    "domain_rows": 3000,
    "general_rows": 1000
  },
  "language_expansion": {
    "type": "translate",
    "languages": [
      "es",
      "fr"
    ],
    "pairs": [
      {
        "country": "ES",
        "language": "ca"
      }
    ],
    "sample_rate": 0.25
  }
}

Response

run_idstring nullable

Unique identifier for this pipeline run. Null for estimate-only requests.

estimatedMinutesnumber required

Estimated processing time in minutes

estimatedCreditsConsumednumber required

Estimated number of credits that will be consumed by this run

estimateboolean required

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

multimodalPricingAppliedboolean required

True when an image column is mapped and also listed in context_columns; each output row is billed at a higher rate.

creditMultipliernumber

10 credits per 100 output rows when multimodalPricingApplied is true. Omitted for text-only pricing.

Example response

{
  "run_id": "dataset-550e8400-e29b-41d4-a716-446655440000-1712234567890"
}

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      request property deprecated

    • info

      endpoint added