get_upload_url
Scope: generate:media. PRE-FETCH (mandatory): resources/read kubeez://skills/media-upload — explains the full flow, what the response contains, and how duration_seconds powers exact billing.
Create a temporary upload session that returns BOTH a browser link (for a human user) AND a direct upload endpoint the agent POSTs to itself from its own environment (shell, code execution sandbox, Claude Code, Cursor). REQUIRED whenever the user wants to supply a photo / video / audio file to edit, animate, reference, lip-sync, or stem-separate but does not already have a stable public HTTPS URL. Pass model_id from get_models for the generation you plan (enforces max_input_images and input_media_types). Response fields:
• url — browser link the user opens to upload (no Kubeez login).
• direct_upload_url + direct_upload_curl_example — POST endpoint for AI agents that already have the file on disk. Multipart form: token + one or MORE file parts (repeat -F "file=@..." to batch several files in one curl). Same token as the browser link; both write to the same session.
• direct_upload_python_example — the same upload with Python requests, for sandboxes without curl.
• direct_upload_allowlist_domains — the one domain the upload needs (a kubeez.com host). If your sandbox blocks the request (DNS failure, connection refused, proxy 403), ask the user to allow it in the sandbox's network settings, or try direct_upload_fallback_url.
• token — pass to get_upload_session afterwards.
If you (the agent) already have the file in your environment, upload it yourself with the direct endpoint — no need to round-trip the user. If the file is on the user's device only, share url and ask them to upload there. After upload(s), call get_upload_session(token) to retrieve media_urls, then pass those as source_media_urls to generate_media.
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": {
"model_id": "<model_id>"
},
"name": "get_upload_url"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||