Skip to main content

Download dataset

Endpoint: GET /datasets/{dataset_id}/download

Description

Exports the dataset’s rows as a CSV file. Columns match the dataset’s structure (which may include external_id when that field was imported). The response includes Content-Disposition: attachment with a generated filename (for example My_evaluation_set_20260402_120000.csv).

Unlike run download, every column in structure is written for every row (empty cells stay empty). Proprietary datasets are downloadable when the id is known; custom datasets require normal access (including project scope for project-scoped keys).

Parameters

  • Path: dataset_id — integer.

Error responses

  • 401 — Authentication failed.
  • 403 — Dataset exists but you are not allowed to download it (for example custom dataset outside your org/project access).
  • 404 — Dataset id not found, or the dataset has no records.
  • 500 — Server error.

Responses

  • 200text/csv body. Header row = dataset structure; each following row is one record in that column order.

Example response (200)

For a dataset whose structure is ["external_id", "prompt", "output", "golden_answer"]:

external_id,prompt,output,golden_answer
row-42,What is the refund policy?,Refunds are available within 30 days.,30-day refund window.
row-43,Capital of Germany?,Munich,Berlin

curl

curl -L -o export.csv \
"https://api.aegisevals.ai/api/v1/datasets/3/download" \
-H "Authorization: Bearer sk_00000000000000000000000000000000"