POST/v1/dataset

Create dataset

Create a new dataset. If there is an existing dataset in the project with the same name as the one specified in the request, will return the existing data

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

4 body fields

Any desired information about the new dataset object

project_idstringrequired

Unique identifier for the project that the dataset belongs under

namestringrequired

Name of the dataset. Within a project, dataset names are unique

descriptionstringoptional

Textual description of the dataset

metadataobjectoptional

User-controlled metadata about the dataset

6 status codes
200Returns the new dataset object
idstringrequired

Unique identifier for the dataset

project_idstringrequired

Unique identifier for the project that the dataset belongs under

namestringrequired

Name of the dataset. Within a project, dataset names are unique

descriptionstringoptional

Textual description of the dataset

createdstringoptional

Date of dataset creation

deleted_atstringoptional

Date of dataset deletion, or null if the dataset is still active

user_idstringoptional

Identifies the user who created the dataset

metadataobjectoptional

User-controlled metadata about the dataset

400The request was unacceptable, often due to missing a required parameter
401No valid API key provided
403The API key doesn’t have permissions to perform the request
429Too many requests hit the API too quickly. We recommend an exponential backoff of your requests
500Something went wrong on Braintrust's end. (These are rare.)

Error handling

A 400 is returned: The request was unacceptable, often due to missing a required parameter A 401 is returned: No valid API key provided A 403 is returned: The API key doesn’t have permissions to perform the request A 429 is returned: Too many requests hit the API too quickly. We recommend an exponential backoff of your requests A 500 is returned: Something went wrong on Braintrust's end. (These are rare.)