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

# File Upload

> Allows sending a file to the system.

## Endpoint

`POST /upload-file`

**Authentication**\
Requires header `authorization: <your_token>`.

## Parameters

Send the file as **base64**.

```json theme={null}
{
  "file": "file in base64",
  "filename" : "file name"
}
```

| Name     | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| file     | base64 | Yes      | file        |
| filename | string | Yes      | file name   |

## Request Body

Send the file as **base64**.

## Example (cURL)

```bash theme={null}
curl -X POST "https://gateway.orkeia.ai/upload-file"   -H "authorization:  <your_token>"   -F "file=@/path/to/file.txt"
```

## Responses

### Response - Success

```json response theme={null}
{
  "status": "OK",
  "data": "document path url"
}
```

### 500 — Bad Request

```json theme={null}
{
  "status": "ERROR",
  "code": "server/error",
  "data": null
}
```

### 400 — Client Error

```json theme={null}
{
  "status": "ERROR",
  "code": "client/error",
  "data": null
}
```
