Create upload
create_uploadGet a signed URL to upload a local file too large for a data URL (over about 3 MB): an image, a video, or an audio clip, up to 100 MB. Only for a file on a machine where you can run commands: this server cannot read files attached to the chat. PUT the file to upload_url before upload_url_expires_at with exactly the returned headers, for example curl -X PUT -T clip.mp4 -H 'Content-Type: video/mp4' -H 'x-goog-content-length-range: 0,104857600' '<upload_url>'. Then pass url as a media input to generate (a first frame, reference images, or a source video) or as the image or audio of create_character or create_reference; estimate_cost measures a video at url to price it. Each upload holds one file: for a new or corrected file, call create_upload again, never PUT to an earlier upload_url, because the CDN keeps serving the first file at url for up to 4 hours. The file is deleted at url_expires_at.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content_type | Yes | The file's media type: one of image/jpeg, image/png, video/mp4, video/quicktime, video/webm, audio/mpeg, audio/mp3, audio/wav, audio/wave, audio/x-wav. |