---
title: "Run operation"
method: POST
path: "/v1/operations"
tags: ["datasets"]
---

# Run operation

`POST /v1/operations`

Create an operation

## Request body

- union
  - CreateYQLOperationRequest
    - `type` 'yql'
    - `params` YQLParams, required
      - `query` string, required — YQL query to execute.
    - `src` OperationSrcDataset[], required — List of source datasets for the operation.
      - `id` string, required — The object identifier, which can be referenced in the API endpoints.
      - `version` string, nullable, required — Version of the dataset.
      - `mapping` union — Mapping of dataset fields.
        - BatchInferenceMessagesMappingResponse
          - `type` string
          - `messages` union, required
            - MappingRecordText
              - …
            - MappingRecordColumn
              - …
          - `max_tokens` union
            - MappingRecordNumber
              - …
            - MappingRecordColumn
              - …
            - MappingRecordText
              - …
            - MappingRecordConstant
              - …
          - `custom_id` MappingRecordColumn
            - `type` 'column'
            - `name` string
        - BatchInferenceInputMapping
          - `type` string
          - `input` MappingRecordColumn, required
            - `type` 'column'
            - `name` string
          - `encoding_format` union
            - MappingRecordText
              - …
            - MappingRecordColumn
              - …
          - `dimensions` union
            - MappingRecordNumber
              - …
            - MappingRecordColumn
              - …
          - `custom_id` MappingRecordColumn
            - `type` 'column'
            - `name` string
    - `dst` OperationDstDataset[] — Optional destination datasets. If not provided, a temporary dataset will be created.
      - `id` string, required — The object identifier, which can be referenced in the API endpoints.
      - `version` string, nullable, required — Version of the dataset.
    - `ai_project_id` string, nullable — AI Studio project ID to associate with the dataset.
  - CreateMaterializeHistoryOperationRequest
    - `type` 'materialize_history'
    - `params` MaterializeHistoryParams, required
      - `start_datetime` string, date-time, required — Start datetime for history materialization (ISO 8601 format).
      - `end_datetime` string, date-time, required — End datetime for history materialization (ISO 8601 format).
      - `dataset_name` string, required — Name of the dataset to materialize history into.
      - `model_name` string, nullable — Optional model name to filter by model_flavor_id.
    - `ai_project_id` string, nullable — AI Studio project ID to associate with the dataset.
  - CreateBatchInferenceOperationRequest
    - `type` 'batch_inference'
    - `params` BatchInferenceParams, required
      - `model` string, required — ID of the model to use.
      - `completion_window` string, required
    - `src` CreateOperationSrcDataset[], required — List of source datasets for the operation.
      - `id` string, required — The object identifier, which can be referenced in the API endpoints.
      - `version` string, nullable, required — Version of the dataset.
      - `mapping` union — Mapping of dataset fields.
        - BatchInferenceMessagesMapping
          - `type` string
          - `messages` union, required
            - MappingRecordText
              - …
            - MappingRecordColumn
              - …
          - `max_tokens` union
            - MappingRecordNumber
              - …
            - MappingRecordColumn
              - …
            - MappingRecordText
              - …
          - `custom_id` MappingRecordColumn
            - `type` 'column'
            - `name` string
        - BatchInferenceInputMapping
          - `type` string
          - `input` MappingRecordColumn, required
            - `type` 'column'
            - `name` string
          - `encoding_format` union
            - MappingRecordText
              - …
            - MappingRecordColumn
              - …
          - `dimensions` union
            - MappingRecordNumber
              - …
            - MappingRecordColumn
              - …
          - `custom_id` MappingRecordColumn
            - `type` 'column'
            - `name` string
    - `dst` OperationDstDataset[] — Optional destination datasets. If not provided, a temporary dataset will be created.
      - `id` string, required — The object identifier, which can be referenced in the API endpoints.
      - `version` string, nullable, required — Version of the dataset.
    - `ai_project_id` string, nullable — AI Studio project ID to associate with the dataset.
  - CreateFineTuningOperationRequest
    - `type` 'finetuning'
    - `params` FineTuningParamsInput, required
      - `model_name` string, required — The name of the model to fine-tune
      - `hyperparameters` SupervisedHParameters
        - `batch_size` integer — Batch size for training
        - `learning_rate` number — Learning rate for training
        - `n_epochs` integer — Number of epochs for training
        - `warmup_ratio` number — Warmup ratio for learning rate
        - `weight_decay` number — Weight decay for optimizer
        - `packing` boolean — Whether to use packing for training
        - `max_grad_norm` number — Maximum gradient norm for optimizer
        - `context_length` integer — Context length for training
        - `lora` boolean — Whether to use LoRA (Low-Rank Adaptation) for training
        - `lora_r` integer — Rank for LoRA
        - `lora_alpha` integer — Alpha parameter for LoRA
        - `lora_dropout` number — Dropout rate for LoRA
      - `method` union — Fine-tuning method configuration
        - SupervisedMethodConfig
          - `type` 'supervised'
          - `supervised` SupervisedConfig, required
            - `hyperparameters` SupervisedHParameters, required
              - …
        - SpecDraftMethodConfig
          - `type` 'spec-draft'
          - `spec_draft` SpecDraftConfig, required
            - `hyperparameters` SpecDraftHParameters, required
              - …
      - `from_checkpoint` union — Checkpoint to continue training from
        - HFCheckpointParametersRequestInput
          - `type` union
            - string
            - 'hf'
          - `repo` string, required
          - `revision` string, nullable
          - `token` string, password, nullable
        - FTCheckpointParameters
          - `type` union
            - string
            - 'ft'
        - HFCheckpointParametersResponse
          - `type` union
            - string
            - 'hf'
          - `repo` string, required
          - `revision` string, nullable
      - `integrations` union[], nullable — Job integration parameters
        - union
          - WandbIntegrationRequest
            - `type` union
              - …
            - `wandb` WandbConfigRequest, required
              - …
          - MlflowIntegrationRequest
            - `type` 'mlflow'
            - `mlflow` MlflowConfigRequest, required
              - …
          - HfExportIntegrationRequest
            - `type` union
              - …
            - `hf` HfExportConfigRequest, required
              - …
          - WandbIntegrationResponse
            - `type` union
              - …
            - `wandb` WandbConfigResponse, required
              - …
          - MlflowIntegrationResponse
            - `type` 'mlflow'
            - `mlflow` MlflowConfigResponse, required
              - …
          - HfExportIntegrationResponse
            - `type` union
              - …
            - `hf` HfExportConfigResponse, required
              - …
      - `seed` integer, nullable — The seed controls the reproducibility of the job
      - `suffix` string, nullable — The suffix that will be used for output model name
      - `tags` string[], nullable — List of tags to associate with the job
      - `trained_steps` integer, nullable — The number of steps completed by the fine-tuning job.
      - `total_steps` integer, nullable — The total number of steps that the fine-tuning job is expected to complete.
      - `trained_tokens` integer, nullable — The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.
      - `estimated_finish` integer, nullable — The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.
    - `src` union[], required — List of train and validation datasets for the finetuning operation.
      - union
        - OperationSrcTrainDataset
          - `id` string, required — The object identifier, which can be referenced in the API endpoints.
          - `version` string, nullable, required — Version of the dataset.
          - `mapping` union, required — Mapping for finetuning dataset, one of: text, messages, prompts, pretokenized.
            - FineTuningTextMapping
              - …
            - FineTuningPromptsMapping
              - …
            - FineTuningMessagesMapping
              - …
            - FineTuningPretokenizedMapping
              - …
          - `type` 'train'
        - OperationSrcValidationDataset
          - `id` string, required — The object identifier, which can be referenced in the API endpoints.
          - `version` string, nullable, required — Version of the dataset.
          - `mapping` union, required — Mapping for finetuning dataset, one of: text, messages, prompts, pretokenized.
            - FineTuningTextMapping
              - …
            - FineTuningPromptsMapping
              - …
            - FineTuningMessagesMapping
              - …
            - FineTuningPretokenizedMapping
              - …
          - `type` 'validation'
    - `ai_project_id` string, nullable — AI Studio project ID to associate with the dataset.
  - CreateFileToDatasetOperationRequest
    - `type` 'file_to_dataset'
    - `params` FileToDatasetParams, required
      - `file_id` string, required — ID of the source file to convert into a dataset.
      - `dataset_name` string, nullable — Name of the dataset.
    - `ai_project_id` string, nullable — AI Studio project ID to associate with the dataset.
  - CreateDatasetToFileOperationRequest
    - `type` 'dataset_to_file'
    - `params` DatasetToFileParams, required
      - `purpose` 'fine_tuning' | 'inference', required
      - `model` string, nullable — Model id for inference batch export.
    - `src` OperationSrcDatasetToFile[], required — List of source datasets for the dataset-to-file operation.
      - `dataset` OperationDatasetToFileDataset, required
        - `id` string, required — The object identifier, which can be referenced in the API endpoints.
        - `version` string, required — Version of the dataset.
      - `mapping` union, required — Mapping for dataset-to-file export.
        - FineTuningTextMapping
          - `type` 'text' — FineTuning mapping type for text format
          - `text` MappingRecordColumn, required
            - `type` 'column'
            - `name` string
        - FineTuningPromptsMapping
          - `type` 'prompts' — FineTuning mapping type for prompts format
          - `prompt` MappingRecordColumn, required
            - `type` 'column'
            - `name` string
          - `completion` MappingRecordColumn, required
            - `type` 'column'
            - `name` string
        - FineTuningMessagesMapping
          - `type` 'messages' — FineTuning mapping type for messages format
          - `messages` MappingRecordColumn, required
            - `type` 'column'
            - `name` string
        - DatasetToFileBatchInferenceMapping
          - `type` 'text_messages'
          - `messages` MappingRecordColumn, required
            - `type` 'column'
            - `name` string
          - `max_tokens` MappingRecordColumn
            - `type` 'column'
            - `name` string
          - `custom_id` MappingRecordColumn
            - `type` 'column'
            - `name` string
    - `dst` OperationDstDataset[] — Optional destination datasets. If not provided, a temporary dataset will be created.
      - `id` string, required — The object identifier, which can be referenced in the API endpoints.
      - `version` string, nullable, required — Version of the dataset.
    - `ai_project_id` string, nullable — AI Studio project ID to associate with the dataset.
  - CreateMergeOperationRequest
    - `type` 'merge'
    - `params` MergeParams
      - `dataset_name` string, nullable — Name of the merged dataset. A generated name is used when omitted.
    - `src` OperationSrcDataset[], required — List of source datasets for the operation.
      - `id` string, required — The object identifier, which can be referenced in the API endpoints.
      - `version` string, nullable, required — Version of the dataset.
      - `mapping` union — Mapping of dataset fields.
        - BatchInferenceMessagesMappingResponse
          - `type` string
          - `messages` union, required
            - MappingRecordText
              - …
            - MappingRecordColumn
              - …
          - `max_tokens` union
            - MappingRecordNumber
              - …
            - MappingRecordColumn
              - …
            - MappingRecordText
              - …
            - MappingRecordConstant
              - …
          - `custom_id` MappingRecordColumn
            - `type` 'column'
            - `name` string
        - BatchInferenceInputMapping
          - `type` string
          - `input` MappingRecordColumn, required
            - `type` 'column'
            - `name` string
          - `encoding_format` union
            - MappingRecordText
              - …
            - MappingRecordColumn
              - …
          - `dimensions` union
            - MappingRecordNumber
              - …
            - MappingRecordColumn
              - …
          - `custom_id` MappingRecordColumn
            - `type` 'column'
            - `name` string
    - `ai_project_id` string, nullable — AI Studio project ID to associate with the dataset.

## Response `200`

Successful Response

- CreateOperationResponse
  - `id` string, required — Operation id
  - `type` 'yql' | 'materialize_history' | 'batch_inference' | 'finetuning' | 'file_to_dataset' | 'dataset_to_file' | 'merge', required
  - `params` union, required — Parameters specific to the operation type.
    - YQLParams
      - `query` string, required — YQL query to execute.
    - MaterializeHistoryParams
      - `start_datetime` string, date-time, required — Start datetime for history materialization (ISO 8601 format).
      - `end_datetime` string, date-time, required — End datetime for history materialization (ISO 8601 format).
      - `dataset_name` string, required — Name of the dataset to materialize history into.
      - `model_name` string, nullable — Optional model name to filter by model_flavor_id.
    - BatchInferenceParams
      - `model` string, required — ID of the model to use.
      - `completion_window` string, required
    - FineTuningParamsOutput
      - `model_name` string, required — The name of the model to fine-tune
      - `hyperparameters` SupervisedHParameters
        - `batch_size` integer — Batch size for training
        - `learning_rate` number — Learning rate for training
        - `n_epochs` integer — Number of epochs for training
        - `warmup_ratio` number — Warmup ratio for learning rate
        - `weight_decay` number — Weight decay for optimizer
        - `packing` boolean — Whether to use packing for training
        - `max_grad_norm` number — Maximum gradient norm for optimizer
        - `context_length` integer — Context length for training
        - `lora` boolean — Whether to use LoRA (Low-Rank Adaptation) for training
        - `lora_r` integer — Rank for LoRA
        - `lora_alpha` integer — Alpha parameter for LoRA
        - `lora_dropout` number — Dropout rate for LoRA
      - `method` union — Fine-tuning method configuration
        - SupervisedMethodConfig
          - `type` 'supervised'
          - `supervised` SupervisedConfig, required
            - `hyperparameters` SupervisedHParameters, required
              - …
        - SpecDraftMethodConfig
          - `type` 'spec-draft'
          - `spec_draft` SpecDraftConfig, required
            - `hyperparameters` SpecDraftHParameters, required
              - …
      - `from_checkpoint` union — Checkpoint to continue training from
        - HFCheckpointParametersRequestOutput
          - `type` union
            - string
            - 'hf'
          - `repo` string, required
          - `revision` string, nullable
          - `token` string, nullable
        - FTCheckpointParameters
          - `type` union
            - string
            - 'ft'
        - HFCheckpointParametersResponse
          - `type` union
            - string
            - 'hf'
          - `repo` string, required
          - `revision` string, nullable
      - `integrations` union[], nullable — Job integration parameters
        - union
          - WandbIntegrationRequest
            - `type` union
              - …
            - `wandb` WandbConfigRequest, required
              - …
          - MlflowIntegrationRequest
            - `type` 'mlflow'
            - `mlflow` MlflowConfigRequest, required
              - …
          - HfExportIntegrationRequest
            - `type` union
              - …
            - `hf` HfExportConfigRequest, required
              - …
          - WandbIntegrationResponse
            - `type` union
              - …
            - `wandb` WandbConfigResponse, required
              - …
          - MlflowIntegrationResponse
            - `type` 'mlflow'
            - `mlflow` MlflowConfigResponse, required
              - …
          - HfExportIntegrationResponse
            - `type` union
              - …
            - `hf` HfExportConfigResponse, required
              - …
      - `seed` integer, nullable — The seed controls the reproducibility of the job
      - `suffix` string, nullable — The suffix that will be used for output model name
      - `tags` string[], nullable — List of tags to associate with the job
      - `trained_steps` integer, nullable — The number of steps completed by the fine-tuning job.
      - `total_steps` integer, nullable — The total number of steps that the fine-tuning job is expected to complete.
      - `trained_tokens` integer, nullable — The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.
      - `estimated_finish` integer, nullable — The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.
    - FileToDatasetParams
      - `file_id` string, required — ID of the source file to convert into a dataset.
      - `dataset_name` string, nullable — Name of the dataset.
    - DatasetToFileParams
      - `purpose` 'fine_tuning' | 'inference', required
      - `model` string, nullable — Model id for inference batch export.
    - MergeParams
      - `dataset_name` string, nullable — Name of the merged dataset. A generated name is used when omitted.
  - `src` union[], required — List of source datasets for the operation.
    - union
      - OperationSrcDataset
        - `id` string, required — The object identifier, which can be referenced in the API endpoints.
        - `version` string, nullable, required — Version of the dataset.
        - `mapping` union — Mapping of dataset fields.
          - BatchInferenceMessagesMappingResponse
            - `type` string
            - `messages` union, required
              - …
            - `max_tokens` union
              - …
            - `custom_id` MappingRecordColumn
              - …
          - BatchInferenceInputMapping
            - `type` string
            - `input` MappingRecordColumn, required
              - …
            - `encoding_format` union
              - …
            - `dimensions` union
              - …
            - `custom_id` MappingRecordColumn
              - …
      - OperationSrcTrainDataset
        - `id` string, required — The object identifier, which can be referenced in the API endpoints.
        - `version` string, nullable, required — Version of the dataset.
        - `mapping` union, required — Mapping for finetuning dataset, one of: text, messages, prompts, pretokenized.
          - FineTuningTextMapping
            - `type` 'text' — FineTuning mapping type for text format
            - `text` MappingRecordColumn, required
              - …
          - FineTuningPromptsMapping
            - `type` 'prompts' — FineTuning mapping type for prompts format
            - `prompt` MappingRecordColumn, required
              - …
            - `completion` MappingRecordColumn, required
              - …
          - FineTuningMessagesMapping
            - `type` 'messages' — FineTuning mapping type for messages format
            - `messages` MappingRecordColumn, required
              - …
          - FineTuningPretokenizedMapping
            - `type` 'pretokenized' — FineTuning mapping type for pretokenized format
            - `input_ids` MappingRecordColumn, required
              - …
            - `labels` MappingRecordColumn
              - …
            - `attention_mask` MappingRecordColumn
              - …
        - `type` 'train'
      - OperationSrcValidationDataset
        - `id` string, required — The object identifier, which can be referenced in the API endpoints.
        - `version` string, nullable, required — Version of the dataset.
        - `mapping` union, required — Mapping for finetuning dataset, one of: text, messages, prompts, pretokenized.
          - FineTuningTextMapping
            - `type` 'text' — FineTuning mapping type for text format
            - `text` MappingRecordColumn, required
              - …
          - FineTuningPromptsMapping
            - `type` 'prompts' — FineTuning mapping type for prompts format
            - `prompt` MappingRecordColumn, required
              - …
            - `completion` MappingRecordColumn, required
              - …
          - FineTuningMessagesMapping
            - `type` 'messages' — FineTuning mapping type for messages format
            - `messages` MappingRecordColumn, required
              - …
          - FineTuningPretokenizedMapping
            - `type` 'pretokenized' — FineTuning mapping type for pretokenized format
            - `input_ids` MappingRecordColumn, required
              - …
            - `labels` MappingRecordColumn
              - …
            - `attention_mask` MappingRecordColumn
              - …
        - `type` 'validation'
      - OperationSrcDatasetToFile
        - `dataset` OperationDatasetToFileDataset, required
          - `id` string, required — The object identifier, which can be referenced in the API endpoints.
          - `version` string, required — Version of the dataset.
        - `mapping` union, required — Mapping for dataset-to-file export.
          - FineTuningTextMapping
            - `type` 'text' — FineTuning mapping type for text format
            - `text` MappingRecordColumn, required
              - …
          - FineTuningPromptsMapping
            - `type` 'prompts' — FineTuning mapping type for prompts format
            - `prompt` MappingRecordColumn, required
              - …
            - `completion` MappingRecordColumn, required
              - …
          - FineTuningMessagesMapping
            - `type` 'messages' — FineTuning mapping type for messages format
            - `messages` MappingRecordColumn, required
              - …
          - DatasetToFileBatchInferenceMapping
            - `type` 'text_messages'
            - `messages` MappingRecordColumn, required
              - …
            - `max_tokens` MappingRecordColumn
              - …
            - `custom_id` MappingRecordColumn
              - …
  - `dst` OperationDstDataset[], required — List of destination datasets for the operation.
    - `id` string, required — The object identifier, which can be referenced in the API endpoints.
    - `version` string, nullable, required — Version of the dataset.
  - `status` 'queued' | 'running' | 'succeeded' | 'failed' | 'cancelled' | 'unknown', required
  - `created_at` integer, required — The Unix timestamp (in seconds) for when the operation was created.
  - `in_progress_at` integer, nullable — The Unix timestamp (in seconds) for when the operation started processing.
  - `finished_at` integer, nullable — The Unix timestamp (in seconds) for when the operation was completed.
  - `ai_project_id` string, nullable — AI Studio project ID to associate with the dataset.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/nebius/apis/nebius-openai-compatible-inference-api.md) · [All operations](https://skmtc.net/nebius/apis/nebius-openai-compatible-inference-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nebius/nebius-openai-compatible-inference-api/versions/0fb323abba3c/schema)
