Skip to main content
POST
A signed link to upload one file straight to storage.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
filename
string
required
Required string length: 1 - 255
mime_type
string
required
Required string length: 1 - 255
size_bytes
integer
required
Required range: x <= 9007199254740991

Response

The signed PUT link.

id
string
required
object
string
required
Allowed value: "file"
upload_url
string<uri>
required
upload_method
string
required
Allowed value: "PUT"
upload_headers
object
required
upload_expires_at
string
required

RFC 3339 timestamp

expires_at
string
required

RFC 3339 timestamp

url
string<uri>
required

ADR 0178: the file's link once uploaded, until expires_at: a short public link (https://g.spiral.ai/<12 chars>), or a signed link where the public bucket is not configured. Pass it, or the id, to any run.

short_upload_url
string<uri> | null
required

ADR 0178: PUT the file's bytes here with no header (type, length and filename come from the link), until upload_expires_at. Null for a file over the short-link limit or where the API origin does not serve it: use upload_url.

upload_command
string
required

ADR 0178: a curl line that uploads the file from disk (the MCP tool's file_path, else filename), to short_upload_url when there is one. Run it instead of sending the bytes or base64 anywhere.