---
title: "Validate that a set of Datasets can be combined"
method: POST
path: "/api/v1/datasets/combine/validate"
tags: ["Dataset"]
---

# Validate that a set of Datasets can be combined

`POST /api/v1/datasets/combine/validate`

## Request

- The document declares no server URL.
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/adaptionlabs/apis/adaption-api/docs/api/v1/datasets/combine/validate/post.ts> (a function with typed inputs; its response is checked against the schema)

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.

## Request body

- ValidateCombineRequestDto
  - `dataset_ids` string[], required: Source Dataset IDs to combine. Must all belong to the caller’s org and be in a combinable state.

## Response `200`

Returns `{compatible, issues, training_type?, total_estimated_rows?}`. Each entry in `issues` carries a `level` (`"error"` or `"warning"`), a stable `code`, a preformed user-facing `message`, and code-specific structured context. Error codes block the merge; warning codes describe reconciliation the merge performs automatically.

- ValidateCombineResponseDto
  - `compatible` boolean, required: Whether the proposed merge can proceed.
  - `training_type` 'instruction_dataset' | 'preference_pairs': Resolved training type for a compatible merge. Homogeneous source sets inherit their shared type; mixed instruction + preference sets resolve to `instruction_dataset`.
  - `total_estimated_rows` number: Sum of processed_rows across all sources for a compatible merge.
  - `issues` CombineValidationIssueDto[], required: Validation diagnostics. Errors block the merge; warnings describe reconciliation the merge performs automatically.
    - `code` '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', required: Stable machine-readable validation issue code.
    - `level` 'error' | 'warning', required: `error` blocks the merge; `warning` describes automatic reconciliation.
    - `message` string, required: Preformed user-facing message.
    - `count` number
    - `limit` number
    - `dataset_id` string
    - `status` string
    - `dataset_ids` string[]
    - `multimodal_dataset_ids` string[]
    - `text_dataset_ids` string[]
    - `columns` CombineValidationColumnDto[]
      - `column` string, required: Column whose source types do not agree.
      - `types` CombineValidationDatasetTypeDto[], required
        - `dataset_id` string, required: Source Dataset ID.
        - `type` string, required: DuckDB type observed for this Dataset.
      - `cast_to` string, required: Common DuckDB type used by the merge.
    - `types` CombineValidationTrainingTypeDto[]
      - `dataset_id` string, required: Source Dataset ID.
      - `training_type` 'instruction_dataset' | 'preference_pairs', required: Training type resolved for this source Dataset.

## Other responses

- `400`: Request shape rejected by class-validator (e.g. non-UUID id, fewer than 2 ids, or array longer than the DTO cap).

## Changes

- **2026-09-15** `f4d1edd8f3d1`: 1 info
  - added the media type `application/json` for the response with the status `200`

[Operation history](https://skmtc.dev/adaptionlabs/apis/adaption-api/changes/api/v1/datasets/combine/validate/post.md)

---

[API](https://skmtc.dev/adaptionlabs/apis/adaption-api.md) - [All operations](https://skmtc.dev/adaptionlabs/apis/adaption-api/llms.txt) - [OpenAPI document](https://skmtc.dev/adaptionlabs/apis/adaption-api/revisions/d4cf908c19a0?raw)
