Endpoints
List Datasets
Query Parameters
Cursor for pagination (base64-encoded dataset ID)
Optional dataset name to filter by
Maximum number of datasets to return (must be greater than 0)
Response
Array of dataset objects
Cursor for the next page (null if no more results)
Example
Get Dataset
Path Parameters
Global ID of the dataset
Response
Dataset object with all fields including
example_countExample
Upload Dataset
Query Parameters
If
true, process synchronously and return dataset ID. If false, queue for async processing.Request Body
The request format depends on the Content-Type:JSON Format (application/json)
JSON Format (application/json)
Dataset name
"create" or "append"Dataset description
Array of input objects (any JSON structure)
Array of output objects (same length as inputs)
Array of metadata objects (same length as inputs)
Array of split assignments per example:
- String: Single split name
- Array of strings: Multiple splits
- null: No splits
Array of span IDs to link examples back to traces (string or null per example)
File Upload (multipart/form-data)
File Upload (multipart/form-data)
Dataset name
"create" or "append"Dataset description
Column names for input fields
Column names for output fields
Column names for metadata fields
Column names containing split assignments
Column name containing span IDs
File to upload (CSV, JSONL, or PyArrow format)
Response (when sync=true)
Example
Get Dataset Examples
Path Parameters
Global ID of the dataset
Query Parameters
ID of the dataset version (defaults to latest version)
List of split identifiers (Global IDs or names) to filter by
Response
Example
Delete Dataset
Path Parameters
Global ID of the dataset
Response
Returns HTTP 204 (No Content) on success.Example
Export Dataset
Phoenix provides multiple export endpoints for datasets:Export as CSV
Export as OpenAI Fine-tuning JSONL
messages and tools fields.
Export as OpenAI Evals JSONL
messages and ideal fields.
Query Parameters (all export endpoints)
ID of the dataset version (defaults to latest)
Example
Dataset Versions
List Dataset Versions
Path Parameters
Global ID of the dataset
Query Parameters
Cursor for pagination
Maximum number of versions to return
Response
Array of dataset version objects
Pagination cursor
Error Handling
Dataset, version, or examples not found
Dataset with the same name already exists (on create)
Invalid request:
- Invalid dataset ID format
- Missing required fields (name, inputs)
- Invalid file format
- Mismatched array lengths
Too many requests (async queue full)
Best Practices
Version Your Data
Datasets are automatically versioned - each upload creates a new version
Use Splits
Assign examples to splits (train/test/validation) for organized experimentation
Link to Traces
Use
span_ids to connect dataset examples back to production tracesAsync for Large Datasets
Use
sync=false for large dataset uploads to avoid timeouts