---
title: "Upload File"
method: POST
path: "/v1/files/upload"
tags: ["Files"]
---

# Upload File

`POST /v1/files/upload`

## Request

- Base URL: `https://api.minimax.io`
- URL: `https://api.minimax.io/v1/files/upload`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/minimax/apis/minimax-api-2/docs/v1/files/upload/post.ts> (a function with typed inputs; its response is checked against the schema)

Upload a file to the platform for processing

## Query parameters

- `GroupId` string, required

## Request body `multipart/form-data`

- object
  - `purpose` 'fine-tune' | 'assistants' | 'batch' | 'vision', required: Purpose of the file upload
  - `file` string, binary, required: File to upload

## Response `200`

Successful response

- UploadFileResp
  - `file` FileObject
    - `id` string: File ID
    - `object` 'file': Object type
    - `bytes` integer: File size in bytes
    - `created_at` integer: Unix timestamp of file creation
    - `filename` string: Original filename
    - `purpose` 'fine-tune' | 'assistants' | 'batch' | 'vision': Purpose of the file
    - `status` 'uploaded' | 'processing' | 'processed' | 'error': File processing status

## Other responses

- `400`: Bad request
- `401`: Authentication failed
- `500`: Internal server error

---

[API](https://skmtc.dev/minimax/apis/minimax-api-2.md) - [All operations](https://skmtc.dev/minimax/apis/minimax-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/minimax/apis/minimax-api-2/revisions/b18c2ab45c0e?raw)
