Skip to main content
POST
Legacy Dataset, Evaluation, and Report endpoints are deprecated for new workflows. Use the Tables API for new dataset import, evaluation, scoring, recalculation, and reporting workflows.
Create a dataset version by submitting a base64-encoded CSV or JSON file. PromptLayer queues the file for asynchronous processing and creates a draft dataset while the job runs.

Behavior Notes

  • The draft dataset starts with version_number = -1 and receives a real version number after processing succeeds.
  • The dataset_version_created_by_file webhook event is sent when processing succeeds.
  • The dataset_version_created_by_file_failed webhook event is sent when processing fails.
  • Decoded file content must be 100MB or smaller.
  • Failed drafts are automatically cleaned up.

Authorizations

X-API-KEY
string
header
required

Body

application/json
dataset_group_id
integer
required

ID of the dataset group where the new version will be created.

Required range: x >= 1
file_name
string
required

Name of the CSV or JSON file. Must end with .csv or .json.

Required string length: 1 - 255
file_content_base64
string
required

Base64-encoded file content. Maximum decoded file size is 100MB.

Minimum string length: 1

Response

Dataset version creation job queued.

success
enum<boolean>
required
Available options:
true
message
string
required
dataset_id
integer
required

ID of the draft dataset created for asynchronous processing.