Create a file
Creates a file owned by your account and returns a presigned URL for its bytes. Unlike a
session upload, the file exists before any session: name it in POST /sessions under
extra_configs.file_ids, and the model receives it under upload_id equal to its
file_id. Any session of the account can name the file until expires_at (24 hours
after creation).
Then PUT exactly size bytes to presigned_url, with Content-Type equal to
mime_type, within 15 minutes. Any other size or type is refused by the storage. A session
can name the file only after that upload succeeds.
API keys only, held by a developer or account_admin. Send the key as
Authorization: Bearer rk_... (or Reactor-API-Key: rk_...; Authorization wins when
both are present). A session token is refused with 401. The account comes from the key.
Authorizations
A Reactor API key (rk_...), sent as Authorization: Bearer rk_.... Keep it on a server.
Body
The file name. Only its base name is kept.
"fox.png"
The file size in bytes, at most the account's limit (50 MiB by default). Signed into the upload as Content-Length.
x >= 1The MIME type. Signed into the upload as Content-Type.
"image/png"
Response
The file was created. Upload its bytes next.