Skip to main content
POST
https://api.u1.archetypeai.app/v0.5
/
files
curl -X POST  https://api.u1.archetypeai.app/v0.5/files \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@test_image.jpg"
{
  "is_valid": true,
  "file_id": "test_image.jpg",
  "file_uid": "2511053133de1366dab1ab"
}
File Upload Note: The interactive playground doesn’t support file uploads due to browser limitations. Use the cURL examples below to test file uploads.
Upload a file to the Newton Platform for processing. The API returns a minimal response with file ID and unique identifier.
curl -X POST  https://api.u1.archetypeai.app/v0.5/files \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@test_image.jpg"
{
  "is_valid": true,
  "file_id": "test_image.jpg",
  "file_uid": "2511053133de1366dab1ab"
}

Request

Required Header:
  • Authorization: Bearer YOUR_API_KEY
  • Content-Type: multipart/form-data (automatically set by cURL’s -F flag)
Body:
  • file (file, required): The file to upload

Supported File Types

  • Images: .jpg, .jpeg, .png
  • Documents: .txt, .csv, .json
  • Maximum size: 255 MB

Response

FieldTypeDescription
is_validbooleanWhether the upload was successful
file_idstringThe filename of the uploaded file
file_uidstringUnique 22-character identifier for the file
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"