Claude · Files

Upload a file

Upload an image or document for use in this rental.

POST/v1/files

01

Request

curl -X POST https://scraping.loci.lat/v1/files \
  -H "X-API-Key: $LOCI_API_KEY" \
  -H "X-Loci-Account-Id: 1" \
  -F "file=@report.pdf;type=application/pdf"

Multipart form {}

filebinaryRequired multipart file. PNG, JPEG, GIF, WebP, PDF, plain text, CSV or JSON; 1 byte to 8 MiB.

02

Response

{
  "id": "file_11111111111141118111111111111111",
  "type": "file",
  "filename": "report.pdf",
  "mime_type": "application/pdf",
  "size_bytes": 2048,
  "created_at": "2026-10-17T10:00:00Z",
  "downloadable": true
}

Use the returned ID in a content block with source: {type: file, file_id: …}. Files belong to one rental and expire with it.