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

# Upload Files to Storage

### Description

This endpoint generates an upload URL for file uploads, such as images, to the storage.

### Parameters

* **type** (required, query): The MIME type of the file (e.g., `image/png`, `image/jpg`, `image/jpeg`).
* **file\_size** (required, query): The size of the file to be uploaded.

### Responses

#### 200 OK

```json theme={null}


`{
  "upload_url": "string",  // URL to upload the file
  "file_id": "string",  // File ID for the uploaded file
  "download_url": "string"  // Download URL for the file
}`
```

#### 401 Invalid or Expired Token

```json theme={null}

`Invalid or expired token`
```

#### 500 Error Generating Upload URL

```json theme={null}

`{
  "error": "string"  // Error message detailing why the URL generation failed
}`
```
