---
title: "Get Upload Url"
method: POST
path: "/v1/datasets/upload/url"
tags: ["datasets"]
---

# Get Upload Url

`POST /v1/datasets/upload/url`

## Request

- Base URL: `https://api.pioneer.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pioneer.ai/v1/datasets/upload/url`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/pioneer/apis/brain-api/docs/v1/datasets/upload/url/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a reserved dataset row and presigned upload URL.

## Request body

- DatasetUploadUrlRequest: Request to get presigned URL for dataset upload (bypasses API Gateway limits).
  - `dataset_name` string, required: Name for the dataset
  - `dataset_type` 'classification' | 'ner' | 'custom' | 'decoder': Type of dataset
  - `format` 'jsonl' | 'csv' | 'tsv' | 'parquet' | 'json', nullable: File format (auto-detected from filename if not provided)
  - `filename` string, nullable: Original filename (used for format detection if format not provided)
  - `schema` string, nullable: Expected schema as JSON object (e.g., {"age": "Int64", "name": "Utf8"}). Enforces column types during parsing. Valid types: Int8, Int16, Int32, Int64, UInt8-64, Float32, Float64, Utf8, Boolean, Date, Datetime, Time, Duration, Categorical, Binary
  - `project_id` string, nullable: Optional project ID (UUID) to assign this dataset to
  - `experiment_id` string, nullable: Optional Experiment ID (UUID) the upload was started from. The dataset is linked to it so it appears in that Experiment's Datasets tab (ENG-7109). Ignored when the caller may not access the Experiment.
  - `type` 'training' | 'evaluation' | 'benchmark', nullable: Dataset purpose: 'training' (trainable), 'evaluation' (not trainable), 'benchmark' (system-managed, evaluation-only; cannot be trained on or directly accessed).
  - `visibility` string, nullable: Dataset visibility: 'private' (owner only) or 'public' (anyone can see)
  - `generation_type` 'upload', nullable: Public uploads are always recorded as upload. Other generation methods are assigned by server-owned workflows.
  - `split_ratio` object, nullable: Split ratio when type is 'split', e.g. {'training': 0.8, 'evaluation': 0.2}
  - `column_mapping` object, nullable: Column mapping from source to standard names (e.g., {"sentence": "text", "category": "label"}). Valid standard targets: text, label, labels, entities.

## Response `200`

Successful Response

- DatasetUploadUrlResponse: Response with presigned S3 URL for direct upload.
  - `presigned_url` string, required: S3 presigned URL for PUT upload
  - `dataset_id` string, required: Dataset ID for subsequent processing
  - `dataset_name` string, required: Dataset name (for polling status via GET /{name}/{version})
  - `version_number` string, required: Version number for this dataset
  - `expires_in` integer, required: URL expiration time in seconds
  - `upload_instructions` string: Instructions for completing the upload

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-24** `0e5e86e2bae5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/pioneer/apis/brain-api/changes/v1/datasets/upload/url/post.md)

---

[API](https://skmtc.dev/pioneer/apis/brain-api.md) - [All operations](https://skmtc.dev/pioneer/apis/brain-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pioneer/apis/brain-api/revisions/0e5e86e2bae5?raw)
