> ## Documentation Index
> Fetch the complete documentation index at: https://docs.budecosystem.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload File

> Upload a file for use with the Batch API.

<RequestExample>
  ```bash cURL theme={null}
  curl https://gateway.bud.studio/v1/files \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -F "purpose=batch" \
    -F "file=@batch_requests.jsonl"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "file-abc123",
    "object": "file",
    "bytes": 2048,
    "created_at": 1699000000,
    "filename": "batch_requests.jsonl",
    "purpose": "batch",
    "status": "processed",
    "status_details": null
  }
  ```
</ResponseExample>

## Headers

| Parameter     | Type   | Required | Description                  |
| ------------- | ------ | -------- | ---------------------------- |
| Authorization | string | Yes      | Bearer authentication header |

## Body

| Parameter | Type   | Required | Description                                       |
| --------- | ------ | -------- | ------------------------------------------------- |
| file      | file   | Yes      | File to upload (max 100MB for batch files)        |
| purpose   | string | Yes      | Purpose of the file: batch, assistants, fine-tune |

## Supported Providers

<CardGroup cols={2}>
  <Card title="OpenAI" icon="openai">
    File management for Batch API and Assistants
  </Card>

  <Card title="Azure OpenAI" icon="microsoft">
    Enterprise file storage with compliance
  </Card>
</CardGroup>
