Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex AI Studio
  • Getting started with Model Gallery
    • About Yandex AI Studio
    • Yandex Workflows
    • Quotas and limits
    • Terms and definitions
    • All guides
    • Disabling request logging
    • Getting an API key
      • Image generation
      • Batch processing
        • Creating a dataset
        • Creating a dataset for tuning a text generation model
        • Creating a dataset for tuning a text classifier
        • Delete dataset
  • Switching from the AI Assistant API to Responses API
  • Compatibility with OpenAI
  • Access management
  • Pricing policy
  • Audit Trails events
  • Public materials
  • Release notes

In this article:

  • Getting started
  • Delete a dataset
  1. Step-by-step guides
  2. Model Gallery
  3. Working with datasets
  4. Delete dataset

Deleting a dataset

Written by
Yandex Cloud
Updated at December 29, 2025
  • Getting started
  • Delete a dataset

Getting startedGetting started

To use the examples:

Management console
SDK
cURL

You can start working from the management console right away.

  1. Create a service account and assign it the ai.editor role.

  2. Get and save the service account's API key with yc.ai.foundationModels.execute as the specified scope.

    The following examples use API key authentication. Yandex Cloud ML SDK also supports IAM token and OAuth token authentication. For more information, see Authentication in Yandex Cloud ML SDK.

  3. Use the pip package manager to install the ML SDK library:

    pip install yandex-cloud-ml-sdk
    
  1. Get API authentication credentials as described in Authentication with the Yandex AI Studio API.

  2. To use the examples, install cURL.

  3. Install gRPCurl.

  4. (Optional) Install the jq JSON stream processor.

  5. Get an IAM token used for authentication in the API.

    The account for which you want to obtain the IAM token must have the ai.editor role or higher.

    Note

    The IAM token has a short lifetime up to 12 hours.

Delete a datasetDelete a dataset

To delete a dataset:

Management console
SDK
cURL
  1. In the management console, select the folder for which your account has the ai.playground.user and ai.datasets.editor roles or higher.
  2. Go to AI Studio.
  3. In the AI Studio panel, select Datasets.
  4. In the list that opens, click next to the dataset in question and select Delete.
  5. In the window that opens, confirm the deletion.
  1. Create a file named dataset-delete.py and paste the following code into it:

    from __future__ import annotations
    
    from yandex_cloud_ml_sdk import YCloudML
    
    YANDEX_API_KEY = "<API_key>"
    YANDEX_FOLDER_ID = "<folder_ID>"
    DATASET_ID = "<dataset_ID>"
    
    
    def main() -> None:
    
        sdk = YCloudML(
            folder_id=YANDEX_FOLDER_ID,
            auth=YANDEX_API_KEY,
        )
    
        # Saving the object with the dataset to delete into a variable
        dataset_to_delete = sdk.datasets.get(dataset_id=DATASET_ID)
    
        # Deleting a dataset
        dataset_to_delete.delete()
    
    
    if __name__ == "__main__":
        main()
    

    Where:

    • YANDEX_API_KEY: Service account API key you got before you started.

    • YANDEX_FOLDER_ID: ID of the folder containing the dataset you are deleting.

    • DATASET_ID: ID of the dataset to delete. You can view the list of all datasets in the folder using the management console or the API.

      In ML SDK, you can view the list of datasets in the folder using the list() method.

      for dataset in sdk.datasets.list():
          print(f"List of existing datasets {dataset=}")
      
  2. Run the file you created:

    python3 dataset-delete.py
    

    This will delete the specified dataset.

  1. Get the ID of the dataset you want to delete:

    grpcurl \
      -H "Authorization: Bearer <IAM_token>" \
      -d @ \
      llm.api.cloud.yandex.net:443 yandex.cloud.ai.dataset.v1.DatasetService/List <<EOM
      {
        "folder_id": "<folder_ID>"
      }
    EOM
    

    Where:

    • <IAM_token>: IAM token of the service account you got before you started.
    • <folder_ID>: ID of the folder you are creating the dataset in.

    Result:

     {
       "datasets": [
         {
           "datasetId": "fdsl9hf65509********",
           "folderId": "b1gt6g8ht345********",
           "name": "sample-dataset",
           "status": "READY",
           "taskType": "TextToTextGeneration",
           "createdAt": "2025-11-28T08:53:59Z",
           "updatedAt": "2025-11-28T08:54:38Z",
           "rows": "354",
           "sizeBytes": "32314",
           "createdById": "ajeol2afu1js********",
           "createdBy": "ajeol2afu1js********"
         }
       ]
     }
    

    Save the ID of the dataset you want to delete (the datasetId field value): you will need it to delete the dataset.

  2. Delete the dataset:

    grpcurl \
      -H "Authorization: Bearer <IAM_token>" \
      -d @ \
      llm.api.cloud.yandex.net:443 yandex.cloud.ai.dataset.v1.DatasetService/Delete <<EOM
      {
        "dataset_id": "<dataset_ID>"
      }
    EOM
    

    Where:

    • <IAM_token>: IAM token of the service account you got before you started.
    • <dataset_ID>: Dataset ID you saved in the previous step.

    The gRPC call will delete the specified dataset.

See alsoSee also

  • Creating a dataset

Was the article helpful?

Previous
Creating a dataset for tuning a text classifier
Next
Fine-tuning a text generation model
© 2026 Direct Cursus Technology L.L.C.