Skip to main content
POST
/
files
/
base64
# Encode the file first
base64 -i /path/to/local/file.csv -o /tmp/file.b64

curl -X POST https://api.u1.archetypeai.app/v0.5/files/base64 \
  -H "Authorization: Bearer $ATAI_API_KEY" \
  -F "file=@/tmp/file.b64;filename=file.csv"
{
  "is_valid": true,
  "file_id": "file-abc123",
  "file_uid": "8f2c1e5a-7b3d-4d9e-9c1a-2f5b7d8e4a6c"
}

Documentation Index

Fetch the complete documentation index at: https://docs.archetypeai.app/llms.txt

Use this file to discover all available pages before exploring further.

File Upload Note: The interactive playground doesn’t support file uploads due to browser limitations. Use the cURL examples below to test file uploads.

Overview

Upload a file whose contents have been Base64-encoded. The request body is multipart/form-data; the server decodes the Base64 payload as it streams. Use this endpoint when the source environment cannot transmit raw binary contents (for example, embedding a small file in a JSON-bearing channel that has been wrapped in a multipart form). For files over 512MB, use the streaming binary upload or the direct-to-cloud upload workflow.

Request

The request must be sent as multipart/form-data with a form field containing the base64-encoded file contents. The server decodes the contents on the fly.

Supported File Types

  • Images: .jpg, .jpeg, .png
  • Documents: .txt, .csv, .json
  • Maximum size: 512 MB (after Base64 encoding)

Response

is_valid
boolean
Whether the upload was successful. Check this field to detect errors.
file_id
string
Filename of the uploaded file. Use this to download, delete, or fetch metadata for the file.
file_uid
string
Internal unique identifier for the uploaded file.
# Encode the file first
base64 -i /path/to/local/file.csv -o /tmp/file.b64

curl -X POST https://api.u1.archetypeai.app/v0.5/files/base64 \
  -H "Authorization: Bearer $ATAI_API_KEY" \
  -F "file=@/tmp/file.b64;filename=file.csv"
{
  "is_valid": true,
  "file_id": "file-abc123",
  "file_uid": "8f2c1e5a-7b3d-4d9e-9c1a-2f5b7d8e4a6c"
}