> ## 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.

# Carga de Archivo

> Permite enviar un archivo al sistema.

## Endpoint

`POST /upload-file`

**Autenticación**\
Requiere el encabezado `authorization: <tu_token>`.

## Parámetros

Envíe el archivo como **base64**.

```json theme={null}
{
  "file": "archivo en base64",
  "filename" : "nombre del archivo"
}
```

| Nombre   | Tipo   | Obligatorio | Descripción        |
| -------- | ------ | ----------- | ------------------ |
| file     | base64 | Sí          | archivo            |
| filename | string | Sí          | nombre del archivo |

## Cuerpo de la solicitud

Envíe el archivo como **base64**.

## Ejemplo (cURL)

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

## Respuestas

### Response - Success

```json response theme={null}
{
  "status": "OK",
  "data": "ruta de la url del documento"
}
```

### 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
}
```
