Skip to content
SupportLogin
Validate that a set of Datasets can be combined

Validate that a set of Datasets can be combined

POST/api/v1/datasets/combine/validate

Synchronous compatibility check. Returns a single issues array containing both blockers (level: "error") and reconcilable concerns (level: "warning"). compatible: false means at least one error-level issue is present (cardinality, ownership, status, run_id). Warning-level entries — column-type mismatches, DPO sources missing ranked generations — are non-blocking; the merge resolves them automatically (mixed types downgrade to instruction_dataset, type mismatches CAST to a common type, etc.). Nothing is written.

Body ParametersJSONExpand Collapse
dataset_ids: array of string

Source Dataset IDs to combine. Must all belong to the caller’s org and be in a combinable state.

ReturnsExpand Collapse
compatible: boolean

Whether the proposed merge can proceed.

training_type: optional "instruction_dataset" or "preference_pairs"

Resolved training type for a compatible merge. Homogeneous source sets inherit their shared type; mixed instruction + preference sets resolve to instruction_dataset.

One of the following:
"instruction_dataset"
"preference_pairs"
total_estimated_rows: optional number

Sum of processed_rows across all sources for a compatible merge.

issues: array of object { code, level, message, 9 more }

Validation diagnostics. Errors block the merge; warnings describe reconciliation the merge performs automatically.

code: "too_few_sources" or "too_many_sources" or "duplicate_source_ids" or 9 more

Stable machine-readable validation issue code.

One of the following:
"too_few_sources"
"too_many_sources"
"duplicate_source_ids"
"dataset_not_found"
"wrong_organization"
"dataset_not_ready"
"missing_run_id"
"mixed_multimodal_sources"
"all_preference_sources_missing_dpo_columns"
"incompatible_column_types"
"preference_source_missing_ranked_generations"
"mixed_training_types_resolved_to_sft"
level: "error" or "warning"

error blocks the merge; warning describes automatic reconciliation.

One of the following:
"error"
"warning"
message: string

Preformed user-facing message.

count: optional number
limit: optional number
dataset_id: optional string
status: optional string
dataset_ids: optional array of string
multimodal_dataset_ids: optional array of string
text_dataset_ids: optional array of string
columns: optional array of object { column, types, cast_to }
column: string

Column whose source types do not agree.

types: array of object { dataset_id, type }
dataset_id: string

Source Dataset ID.

type: string

DuckDB type observed for this Dataset.

cast_to: string

Common DuckDB type used by the merge.

types: optional array of object { dataset_id, training_type }
dataset_id: string

Source Dataset ID.

training_type: "instruction_dataset" or "preference_pairs"

Training type resolved for this source Dataset.

One of the following:
"instruction_dataset"
"preference_pairs"

Validate that a set of Datasets can be combined

curl https://api.prod.adaptionlabs.ai/api/v1/datasets/combine/validate \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $ADAPTION_API_KEY" \
    -d '{
          "dataset_ids": [
            "string",
            "string"
          ]
        }'
{
  "compatible": true,
  "training_type": "instruction_dataset",
  "total_estimated_rows": 0,
  "issues": [
    {
      "code": "too_few_sources",
      "level": "error",
      "message": "message",
      "count": 0,
      "limit": 0,
      "dataset_id": "dataset_id",
      "status": "status",
      "dataset_ids": [
        "string"
      ],
      "multimodal_dataset_ids": [
        "string"
      ],
      "text_dataset_ids": [
        "string"
      ],
      "columns": [
        {
          "column": "column",
          "types": [
            {
              "dataset_id": "dataset_id",
              "type": "type"
            }
          ],
          "cast_to": "cast_to"
        }
      ],
      "types": [
        {
          "dataset_id": "dataset_id",
          "training_type": "instruction_dataset"
        }
      ]
    }
  ]
}
Returns Examples
{
  "compatible": true,
  "training_type": "instruction_dataset",
  "total_estimated_rows": 0,
  "issues": [
    {
      "code": "too_few_sources",
      "level": "error",
      "message": "message",
      "count": 0,
      "limit": 0,
      "dataset_id": "dataset_id",
      "status": "status",
      "dataset_ids": [
        "string"
      ],
      "multimodal_dataset_ids": [
        "string"
      ],
      "text_dataset_ids": [
        "string"
      ],
      "columns": [
        {
          "column": "column",
          "types": [
            {
              "dataset_id": "dataset_id",
              "type": "type"
            }
          ],
          "cast_to": "cast_to"
        }
      ],
      "types": [
        {
          "dataset_id": "dataset_id",
          "training_type": "instruction_dataset"
        }
      ]
    }
  ]
}