Skip to main content
POST
Create file upload
Create a file record and receive a signed URL to upload the file directly to cloud storage.

Upload flow

  1. Call POST /files with the filename and content type
  2. Upload the file to the returned upload_url using a PUT request
  3. The file status transitions from awaiting_upload to processing automatically
  4. Once processed, the file’s text content is extracted and indexed
The signed upload URL expires after 15 minutes. If it expires, create a new file record.

Authorizations

Authorization
string
header
required

API key prefixed with sk_. Example: Authorization: Bearer sk_xxx

Headers

X-API-Version
string
default:2026-01-01

API version

Body

application/json
project_id
string
required
filename
string
required
content_type
enum<string>
required
Available options:
application/pdf,
image/png,
image/jpeg,
image/tiff

Response

Success

data
object
Example: