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

# Upload Object

> Upload one or more files directly.

Upload one or more files to a specific bucket and optional path.

<Info>
  As stated before and following our recent [API update](/changelog#march-3-2026-scloud-cdn-the-speed-of-light-update), uploading files is now exclusively supported via multipart/form-data.

  Old methods such as binary or base64 are now deprecated and removed from the API.
</Info>

## Authentication

Requires an API Key via `Authorization`, `X-API-Key`, or `apiKey` query parameter.

## Headers

<ParamField header="Content-Type" type="string" default="multipart/form-data" required>
  `multipart/form-data`
</ParamField>

## Query Parameters

<ParamField query="overwrite" type="boolean" default="false">
  If `false`, handle duplicates with Windows-style `(1)` suffix.
</ParamField>

<ParamField query="randomizeName" type="boolean" default="false">
  If `true`, randomizes the filename with a UUID.
</ParamField>

## Form Data

<ParamField body="files" type="file[]" required>
  One or more files to upload.
</ParamField>

## Response

```json theme={null}
{
    "success": true,
    "message": "Successfully uploaded X file(s)",
    "url": "https://cdn.sacul.cloud/bucket/file.png", 
    "urls": ["..."]
}
```

## Examples

```bash Standard Upload theme={null}
curl -X POST https://cdn.sacul.cloud/my-bucket/images/ \
    -H "Authorization: Bearer <your-api-key>" \
    -F "files=@/path/to/your/image.png"
```

```bash Batch Upload theme={null}
curl -X POST https://cdn.sacul.cloud/my-bucket/uploads/ \
    -H "Authorization: Bearer <your-api-key>" \
    -F "files=@file1.png" \
    -F "files=@file2.png"
```
