create_upload
Start an upload
Reserve an upload and get a presigned URL to PUT the bytes to. Send the returned upload_headers on that PUT exactly as given — they are signed into the URL, and a missing one is a 403, not a network failure. Follow with complete_upload once the PUT succeeds.
Limits: images and audio up to 50 MB, video up to 250 MB.
If this client cannot make an HTTP request of its own, or the PUT is refused, use request_upload_link (or import_media for a file at a URL).
Scope
generation.write— Makes, edits, imports, shares and deletes media in the account.
Behaviour
- Writes
- Creates or changes items in the caller's own account.
- Adds or updates
- Adds or updates; nothing the caller already has is deleted or overwritten.
- Stays in the account
- Stays inside the caller's private Kuro account: any media provider it calls acts on Kuro's account, and the result is visible to no one else.
Inputs
filenamestring · requiredat least 1 character · at most 220 characters
mime_typestring · requiredat least 1 character · at most 120 characters
bytesinteger · required> 0
checksum_sha256string · optionalmatches ^[0-9a-f]{64}$
Example call
A tools/call request with the required arguments only, each a placeholder read off the schema. Replace them before sending.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "create_upload",
"arguments": {
"filename": "<filename>",
"mime_type": "<mime_type>",
"bytes": 1
}
}
}Input schema
As the server sends it in tools/list.
{
"type": "object",
"properties": {
"filename": {
"type": "string",
"minLength": 1,
"maxLength": 220
},
"mime_type": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"bytes": {
"type": "integer",
"exclusiveMinimum": 0
},
"checksum_sha256": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
}
},
"required": [
"filename",
"mime_type",
"bytes"
],
"additionalProperties": false
}Related tools
- complete_upload
Verify uploaded bytes against their declared size, type and checksum, and return the upload ready to bind to a generation.
- request_upload_link
Get a link the user taps to send pictures or videos from their own phone or computer straight into the account, with no setup and no sign-in.
- import_media
Fetch a file the client cannot upload itself and store it as an account upload.
- generate_clip
Start a short video clip generation.