---
title: "Upload Dataset Files"
method: POST
path: "/v1/accounts/{account_id}/datasets/{dataset_id}:upload"
tags: ["Gateway"]
---

# Upload Dataset Files

`POST /v1/accounts/{account_id}/datasets/{dataset_id}:upload`

## Request

- Base URL: `https://api.fireworks.ai/inference`
- URL: `https://api.fireworks.ai/inference/v1/accounts/{account_id}/datasets/{dataset_id}:upload`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/fireworks/apis/fireworks-ai-anthropic-compatible-messages-api/docs/v1/accounts/:account_id/datasets/:dataset_id:upload/post.ts> (a function with typed inputs; its response is checked against the schema)

Provides a streamlined way to upload a dataset file in a single API request. This path can handle file sizes up to 150Mb. For larger file sizes use [Get Dataset Upload Endpoint](get-dataset-upload-endpoint).

## Path parameters

- `account_id` string, required
- `dataset_id` string, required

## Request body `multipart/form-data`

- object
  - `file` string, binary

## Response `200`

A successful response.

- FileUploadResponse
  - `id` string: The dataset id.
  - `object` string: The object type, which is always file.
  - `bytes` integer: The size of the file, in bytes.
  - `created_at` integer: The Unix timestamp (in seconds) for when the file was created.
  - `filename` string: The name of the file.
  - `purpose` string: The intended purpose of the file.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `404`: Not Found
- `500`: Internal Server Error

---

[API](https://skmtc.dev/fireworks/apis/fireworks-ai-anthropic-compatible-messages-api.md) - [All operations](https://skmtc.dev/fireworks/apis/fireworks-ai-anthropic-compatible-messages-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fireworks/apis/fireworks-ai-anthropic-compatible-messages-api/revisions/954d6bc5d922?raw)
