---
updatedAt: 2026-10-25T15:46:36.000Z
agentTools:
  projectIndex: https://docs.superwise.ai/llms.txt
---

# Create Dataset

Create a new Dataset

- **payload** (DatasetCreate): Required. The payload that includes:
    - **name** (str): Name of the dataset, min_length=1, max_length=100.
    - **description** (str or None): A description about the dataset.
    - **model_version_id** (str or None): Model version identifier.
    - **tags** (list of DatasetTag or None): A list of tags related to the dataset.
    - **schema** (Schema): The schema of the dataset.

Creates a dataset with a name and, optionally, a description, a model version ID, key-value tags, and a schema. The schema defines the dataset's fields and their types.

## When to use it

Use it to create a place to log records over the API, connect a source, or monitor data with policies. If you leave out the schema, SUPERWISE discovers it from the first data the dataset receives.

## Required parameters

* `name` (body): a descriptive name for the dataset, 1 to 100 characters.

Optional body fields: `description`, `model_version_id`, `tags`, `schema`.

## Response

A successful call returns `201 Created` with the `DatasetResponse` object: `id`, `name`, `description`, `schema`, `tags`, `created_by`, and timestamps.

**Related:** [Get a dataset](https://docs.superwise.ai/reference/get_dataset), [Update a dataset](https://docs.superwise.ai/reference/update_dataset), [Log a record to a dataset](https://docs.superwise.ai/reference/log_v1_datasets__dataset_id__log_post), [Create a dataset source](https://docs.superwise.ai/reference/create_dataset_source)

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "paths": {
    "/v1/datasets": {
      "post": {
        "tags": [
          "Dataset"
        ],
        "summary": "Create Dataset",
        "description": "Create a new Dataset\n\n- **payload** (DatasetCreate): Required. The payload that includes:\n    - **name** (str): Name of the dataset, min_length=1, max_length=100.\n    - **description** (str or None): A description about the dataset.\n    - **model_version_id** (str or None): Model version identifier.\n    - **tags** (list of DatasetTag or None): A list of tags related to the dataset.\n    - **schema** (Schema): The schema of the dataset.",
        "operationId": "create_dataset",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DatasetCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "info": {
    "title": "Superwise Main Entities",
    "description": "API reference",
    "version": "0.1.0"
  },
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "DatasetCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "title": "Dataset Name",
            "description": "A descriptive name for this dataset"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dataset Description",
            "description": "Relevant information about the context of this dataset"
          },
          "model_version_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Version Id"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/DatasetTag"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "schema": {
            "$ref": "#/components/schemas/Schema-Input",
            "default": {}
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "DatasetCreate",
        "example": {
          "description": "Some Dataset Description",
          "model_version_id": "catboost_v365",
          "name": "Name for Some Dataset",
          "schema": {
            "fields": {
              "age": {
                "type": "numeric"
              }
            }
          },
          "tags": {
            "project": "churn_prediction",
            "type": "training"
          }
        }
      },
      "DatasetResponse": {
        "properties": {
          "_id": {
            "type": "string",
            "title": "Id"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Dataset Name",
            "description": "A descriptive name for this dataset"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dataset Description",
            "description": "Relevant information about the context of this dataset"
          },
          "model_version_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Version Id"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "created_by": {
            "type": "string",
            "title": "Created By"
          },
          "updated_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated By",
            "description": "User who last updated this dataset"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/DatasetTag"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "schema": {
            "$ref": "#/components/schemas/Schema-Output",
            "default": {}
          },
          "tenant_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tenant Id"
          },
          "tag_ids": {
            "items": {
              "type": "string",
              "format": "uuid4"
            },
            "type": "array",
            "title": "Tag Ids"
          },
          "archived_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Archived At"
          }
        },
        "type": "object",
        "required": [
          "_id",
          "id",
          "name",
          "created_by"
        ],
        "title": "DatasetResponse",
        "example": {
          "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "created_by": "1514f337-7b42-435d-bc19-99be46c13098",
          "description": "Some Dataset Description",
          "id": "Training_16101988",
          "model_version_id": "catboost_v365",
          "name": "Name for Some Dataset",
          "tags": {
            "project": "churn_prediction",
            "type": "training"
          }
        }
      },
      "DatasetTag": {
        "properties": {
          "key": {
            "type": "string",
            "title": "Key"
          },
          "value": {
            "type": "string",
            "title": "Value"
          }
        },
        "type": "object",
        "required": [
          "key",
          "value"
        ],
        "title": "DatasetTag"
      },
      "Schema-Input": {
        "properties": {
          "fields": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/SchemaItem"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fields"
          },
          "key_field": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key Field"
          }
        },
        "type": "object",
        "title": "Schema"
      },
      "Schema-Output": {
        "properties": {
          "fields": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/SchemaItem"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fields"
          },
          "key_field": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key Field"
          }
        },
        "type": "object",
        "title": "Schema"
      },
      "SchemaItem": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/Type"
          },
          "default_value": {
            "title": "Default Value"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "SchemaItem"
      },
      "Type": {
        "type": "string",
        "enum": [
          "numeric",
          "string",
          "boolean",
          "datetime",
          "date",
          "json",
          "image",
          "image_link"
        ],
        "title": "Type"
      }
    },
    "securitySchemes": {
      "implicit": {
        "type": "oauth2",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://authentication.superwise.ai/identity/resources/auth/v1/api-token",
            "scopes": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "implicit": []
    }
  ],
  "servers": [
    {
      "url": "api.superwise.ai",
      "description": "Superwise Api Gateway"
    }
  ]
}
```