---
title: "Create a Dataset"
method: POST
path: "/v1/datasets"
tags: ["/datasets"]
---

# Create a Dataset

`POST /v1/datasets`

Create a dataset by uploading a file. See ['Dataset Creation'](https://docs.cohere.com/docs/datasets#dataset-creation) for more information.

## Query parameters

- `name` string, required
- `type` 'embed-input' | 'embed-result' | 'cluster-result' | 'cluster-outliers' | 'reranker-finetune-input' | 'single-label-classification-finetune-input' | 'chat-finetune-input' | 'multi-label-classification-finetune-input' | 'batch-chat-input' | 'batch-openai-chat-input' | 'batch-embed-v2-input' | 'batch-chat-v2-input', required — The type of the dataset
- `keep_original_file` boolean
- `skip_malformed_input` boolean
- `keep_fields` string[]
- `optional_fields` string[]
- `text_separator` string
- `csv_delimiter` string

## Headers

- `X-Client-Name` string

## Response `200`

A successful response.

- object
  - `id` string — The dataset ID

## Other responses

- `400` — This error is returned when the request is not well formed. This could be because: - JSON is invalid - The request is missing required fields - The request contains an invalid combination of fields
- `401` — This error indicates that the operation attempted to be performed is not allowed. This could be because: - The api token is invalid - The user does not have the necessary permissions
- `403` — This error indicates that the operation attempted to be performed is not allowed. This could be because: - The api token is invalid - The user does not have the necessary permissions
- `404` — This error is returned when a resource is not found. This could be because: - The endpoint does not exist - The resource does not exist eg model id, dataset id
- `422` — This error is returned when the request is not well formed. This could be because: - JSON is invalid - The request is missing required fields - The request contains an invalid combination of fields
- `429` — Too many requests
- `498` — This error is returned when a request or response contains a deny-listed token.
- `499` — This error is returned when a request is cancelled by the user.
- `500` — This error is returned when an uncategorised internal server error occurs.
- `501` — This error is returned when the requested feature is not implemented.
- `503` — This error is returned when the service is unavailable. This could be due to: - Too many users trying to access the service at the same time
- `504` — This error is returned when a request to the server times out. This could be due to: - An internal services taking too long to respond

---

[API](https://skmtc.net/cohere-ai/apis/api-reference.md) · [All operations](https://skmtc.net/cohere-ai/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cohere-ai/api-reference/versions/dbed69eda210/schema)
