Skip to main content
POST
/
files
curl -X POST https://api.u1.archetypeai.app/v0.5/files \
  -H "Authorization: Bearer $ATAI_API_KEY" \
  -F "file=@/path/to/local/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 to the Newton Platform for processing. The request body is multipart/form-data and the file contents are streamed to reduce memory usage. The simple upload endpoint accepts files up to 512 MB. For files above this — or for any case where you need resumable uploads — use the direct-to-cloud multipart workflow instead, which supports up to 250 GB. The Developer Console UI caps its uploads through this endpoint at 255 MB; client integrations can go up to the full 512 MB.

Request

The request must be sent as multipart/form-data with the file contents in a form field. The exact form-field name depends on the client; most HTTP clients (e.g. curl -F, requests files=) will use the file’s name as the field name.

Required Header

  • Authorization: Bearer YOUR_API_KEY
  • Content-Type: multipart/form-data (automatically set by cURL’s -F flag)

Supported File Types

The server’s Content-Type validator accepts:
  • Images: image/jpeg, image/png
  • Video: video/mp4
  • Text & data: text/plain, text/csv, application/json
JSONL (application/x-ndjson) is rejected by this endpoint despite appearing in the server’s “supported types” error message. Use the direct-to-cloud multipart flow for JSONL — initiate accepts it as the file_type.
Maximum size: 512 MB

Response

is_valid
boolean
Whether the upload was successful. Check this field to detect errors.
file_id
string
The 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
curl -X POST https://api.u1.archetypeai.app/v0.5/files \
  -H "Authorization: Bearer $ATAI_API_KEY" \
  -F "file=@/path/to/local/file.csv"
{
  "is_valid": true,
  "file_id": "file-abc123",
  "file_uid": "8f2c1e5a-7b3d-4d9e-9c1a-2f5b7d8e4a6c"
}
Quick Test: Navigate to your file’s directory and run:
curl -X POST  https://api.u1.archetypeai.app/v0.5/files \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@test_image.jpg"
Getting Full Metadata: This endpoint returns a minimal response. To get complete file information including size, dimensions, and timestamps, use the Get File Metadata endpoint.

Next Steps

  1. Get file details:
curl  https://api.u1.archetypeai.app/v0.5/files/metadata/YOUR_FILE_ID \
  -H "Authorization: Bearer YOUR_API_KEY"
  1. List all files:
curl  https://api.u1.archetypeai.app/v0.5/files/metadata \
  -H "Authorization: Bearer YOUR_API_KEY"
  1. Get storage summary:
curl  https://api.u1.archetypeai.app/v0.5/files/info \
  -H "Authorization: Bearer YOUR_API_KEY"