get_upload_session
Scope: generate:media. PRE-FETCH (mandatory if you haven't already): resources/read kubeez://skills/media-upload AND kubeez://skills/billing-confirmation. The duration fields returned here are what powers exact per-second billing — handle them per the skills.
Fetch uploaded file URLs from a temp upload session created by get_upload_url. Call this after the user confirms they finished uploading at the link (or to poll until files appear). Pass the same token get_upload_url returned. Returns media_urls for use as source_media_urls in generate_media (or other tools expecting HTTPS media URLs). ALSO returns a per-file media array with {url, kind: image|video|audio, duration_seconds?, measurement?, width?, height?, mime_type?, file_size_bytes?} and aggregates total_video_seconds / total_audio_seconds / unknown_duration_count. duration_seconds is the SERVER's own measurement of the file, the exact number length-billed models charge on (e.g. seedance-2-fast-*-video-ref: (ref_video_seconds + output_seconds) × rate; p-video with audio: audio_seconds × rate). Pass it to estimate for an exact quote. billing_readiness is 'exact' only when every audio/video file is measured. If unknown_duration_count > 0, media[].measurement says why ('unavailable': call again shortly; 'unreadable': ask for a standard MP4/MOV/MP3/WAV); length-billed models refuse such a file rather than guess. If count is 0, nothing uploaded yet — remind them to use the link; you cannot substitute local files.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"token": "<token>"
},
"name": "get_upload_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||