GET
/
api
/
v1
/
training-datasets
/
{dataset_id}
/
export
cURL
curl --request GET \
  --url https://labs.tacitintelligence.co/api/v1/training-datasets/{dataset_id}/export \
  --header 'Authorization: Bearer <token>'
{
  "row_count": 0,
  "message": "<string>",
  "error": "<string>"
}
The schema below documents the non-ready response branches (202 / 409 / 500) only. When status='ready' this endpoint streams application/x-ndjson instead, with one DeepSeek-R1-shape row per line. See Training Datasets concept page for the full NDJSON row shape and the canonical token reference.

Worked example

A single NDJSON line from a successful export looks like this:
{"scenario_id":"...","agent_template_id":"...","messages":[{"role":"user","content":"Hi Luke, here's my update for week 3..."},{"role":"assistant","content":"<no_response/>"}],"metadata":{"temperature":0.7,"rollout_index":0,"turn_count":1,"quality_score":0.84,"complexity_score":0.62,"ifd_score":null}}
The <no_response/> token is emitted whenever the operator deliberately chose silence at a reach-out moment. It is a first-class learnable target, not an absence of data. See the token reference for the full table.

Polling pattern

# 1. Poll status until ready
curl -H "Authorization: Bearer $LABS_KEY" \
  "$LABS_URL"/api/v1/training-datasets/$ID/status

# 2. When status='ready', download the NDJSON
curl -H "Authorization: Bearer $LABS_KEY" \
  -o dataset.jsonl \
  "$LABS_URL"/api/v1/training-datasets/$ID/export
Response headers on the success branch:
HeaderMeaning
Content-Typeapplication/x-ndjson
Content-Dispositionattachment; filename="training-dataset-{id}.jsonl"
X-Row-CountNumber of rows in the body
X-Request-IDEcho of the request ID for correlation
X-RateLimit-*Standard rate-limit headers (see Authentication)

Authorizations

Authorization
string
header
required

API key obtained from Labs Portal

Path Parameters

dataset_id
string<uuid>
required

Training dataset UUID

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$

Response

Success

status
enum<string>
required

Lifecycle status. The 200 NDJSON path is only served when status=ready.

Available options:
pending,
preview,
running,
filtering,
cancelled,
failed
row_count
integer | null
required

Completed rows so far. Null until finalised.

Required range: -9007199254740991 <= x <= 9007199254740991
message
string
required

Human-readable explanation

error
string

Stored error string when status=failed