POST /v1/uploads
Start an upload
Reserves an upload and answers with where to PUT the bytes. PUT them with every `upload_headers` entry, then call `POST /v1/uploads/{id}/complete`.
Permission
A key with chosen permissions needs generation.write. A key made with every permission may always call it. It can spend: send an Idempotency-Key so a retry replays the first answer.
Parameters
Idempotency-Key (header)string · optionalAny string up to 255 characters. Send the same value to retry a request without spending twice; a different body under a used key is refused with 409.
up to 255 characters
Body
filenamestring · requiredup to 220 characters
mime_typestring · requiredSuch as "image/png" or "video/mp4".
up to 120 characters
bytesinteger · requiredmin 0
checksum_sha256string · optionalHex SHA-256 of the bytes, checked when the upload completes.
Response: UploadTicket
201 · Where to send a file's bytes. Then call `POST /v1/uploads/{id}/complete`.
object"upload_ticket"upload_idstringuuid
upload_urlstringPUT the file's bytes here.
uri
upload_headersobjectSend every one of these on the PUT, exactly as given: they are signed into the URL.
expires_atstringdate-time
Example
The required fields only, each a placeholder. Replace them before sending.
curl -X POST "https://api.meetkuro.com/v1/uploads" \
-H "Authorization: Bearer $KURO_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"filename":"<filename>","mime_type":"<mime_type>","bytes":0}'import { Kuro } from "@meetkuro/sdk";
const kuro = new Kuro(); // reads KURO_API_KEY
await kuro.uploads.file(bytes, { filename: "photo.png", mimeType: "image/png" });