Dataset

Adapt a dataset (deprecated)

Changed on

Deprecated alias of POST /datasets/{dataset_id}/adapt, kept for existing clients. Use POST /datasets/{dataset_id}/adapt in new code.

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

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 deprecated