Send the file to an upload link
The upload_url POST /uploads returned.
Authorised by the signed token in the path, not an API key: send the raw bytes (curl -X PUT --data-binary @file). Text and fonts only: text must be UTF-8, a font must carry its container's magic number (otherwise 415 type_mismatch). An audio, image or video token is refused here (400 wrong_door): those go to their presigned upload_url, then complete_url.
Path Parameters
Request Body
application/octet-stream
TypeScript Definitions
Use the request body type in TypeScript.
binaryResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/uploads/string" \ -H "Content-Type: application/octet-stream" \ -d 'string'{
"data": {
"public_url": "http://example.com",
"bytes": 0,
"content_type": "string",
"asset_id": "b4695157-0d1d-4da0-8f9e-5c53149389e4",
"track_id": "89443c0f-6172-4ccb-98e3-b20b8a4e4aba",
"analysis": "queued",
"next": "string"
}
}{
"error": {
"type": "string",
"code": "string",
"message": "string"
}
}{
"error": {
"type": "string",
"code": "string",
"message": "string"
}
}{
"error": {
"type": "string",
"code": "string",
"message": "string"
}
}{
"error": {
"type": "string",
"code": "string",
"message": "string"
}
}Get a link to upload a file POST
A short-lived signed link to PUT ONE file from your own disk, so its bytes never pass through an agent's conversation.
Finish an image, video or audio upload POST
After the bytes of an image/video/audio upload are in storage (one PUT to upload_url, or every part), POST here.