/v1/datasetsCreate a DatasetCreate a dataset by uploading a file. See 'Dataset Creation' for more information.
Parameters
namestringqueryrequiredThe name of the uploaded dataset.
typestringqueryrequiredThe dataset type, which is used to validate the data. The only valid type is `embed-input` used in conjunction with the Embed Jobs API.
keep_original_filebooleanqueryIndicates if the original file should be stored.
skip_malformed_inputbooleanqueryIndicates whether rows with malformed input should be dropped (instead of failing the validation check). Dropped rows will be returned in the warnings field.
keep_fieldsarrayqueryList of names of fields that will be persisted in the Dataset. By default the Dataset will retain only the required fields indicated in the [schema for the corresponding Dataset type](https://docs.cohere.com/docs/datasets#dataset-types). For example, datasets of type `embed-input` will drop all fields other than the required `text` field. If any of the fields in `keep_fields` are missing from the uploaded file, Dataset validation will fail.
optional_fieldsarrayqueryList of names of fields that will be persisted in the Dataset. By default the Dataset will retain only the required fields indicated in the [schema for the corresponding Dataset type](https://docs.cohere.com/docs/datasets#dataset-types). For example, Datasets of type `embed-input` will drop all fields other than the required `text` field. If any of the fields in `optional_fields` are missing from the uploaded file, Dataset validation will pass.
text_separatorstringqueryRaw .txt uploads will be split into entries using the text_separator value.
csv_delimiterstringqueryThe delimiter used for .csv uploads.
X-Client-NamestringheaderThe name of the project that is making the request.
Request body
multipart/form-data
datastring · binaryrequiredThe file to upload
eval_datastring · binaryAn optional evaluation file to upload
{
"data": "binary",
"eval_data": "binary"
}Responses
idstringThe dataset ID
{
"id": "string"
}idstringmessagestring{
"id": "string",
"message": "string"
}idstringmessagestring{
"id": "string",
"message": "string"
}idstringmessagestring{
"id": "string",
"message": "string"
}idstringmessagestring{
"id": "string",
"message": "string"
}idstringmessagestring{
"id": "string",
"message": "string"
}idstringmessagestring{
"id": "string",
"message": "string"
}idstringmessagestring{
"id": "string",
"message": "string"
}idstringmessagestring{
"id": "string",
"message": "string"
}idstringmessagestring{
"id": "string",
"message": "string"
}idstringmessagestring{
"id": "string",
"message": "string"
}idstringmessagestring{
"id": "string",
"message": "string"
}idstringmessagestring{
"id": "string",
"message": "string"
}