Add media by uploading a file
create_media_uploadAdd a file to Pitchlane by uploading its bytes: a pitch video, an outro, a page video or a page image. pitch_video: the recorded pitch (video with audio). outro_video: a clip played after the pitch. page_video: a clip shown as a page. page_image: a picture shown as a page. Use this when you can send an HTTP request with the file as its body; if the file is at a public https URL, create_media_from_url is simpler. The answer has upload: send ONE PUT to upload.url with every header in upload.headers exactly as given and the file as the body, of exactly size_bytes bytes. The URL works once and expires at upload.expires_at (60 minutes). The file is then checked: poll get_media until ready or failed. The media's id can be used in create_campaign or update_campaign straight away.
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": {
"type": "<type>",
"content_type": "<content_type>",
"size_bytes": "<size_bytes>"
},
"name": "create_media_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | What the file is for. It cannot be changed later. | |
| filename | No | A name for the file, for the user's reference. | |
| size_bytes | Yes | The exact size of the file in bytes. The upload must be exactly this long. | |
| content_type | Yes | The file's MIME type, e.g. `video/mp4`, `video/webm` or `image/png`. |