cURL
curl --request POST \ --url https://api.cartesia.ai/datasets/{id}/files \ --header 'Authorization: Bearer <token>' \ --header 'Cartesia-Version: <cartesia-version>' \ --header 'Content-Type: multipart/form-data' \ --form file='@example-file' \ --form 'purpose=<string>'
Upload a new file to a dataset
Cartesia API key
API version header. Must be set to the API version, e.g. '2024-06-10'.
2024-06-10
2024-11-13
2025-04-16
"2025-04-16"
ID of the dataset to upload to
Purpose of the file (e.g., fine_tune)