Upload Gemini file
Uploads bytes or starts a resumable upload. For resumable start, send metadata and read X-Goog-Upload-URL. Continue only at that returned URL. The upload URL grants access to that upload, expires after one hour, and must be kept private. Resources can only be read, referenced, changed, or deleted in their owning Workspace. Missing, expired, or inaccessible resources return a Gemini-format error.
Request
- Base URL: https://api.tokenlab.sh
- URL: https://api.tokenlab.sh/upload/v1beta/files
- Auth: one of:
- HTTP bearer
- API key in header x-goog-api-key
Query parameters
API key alternative to Bearer or x-goog-api-key.
Headers
Reuse the same key and request body when recovering a create response. A different body with the same key returns a conflict.
Upload protocol such as resumable.
Upload command such as start or upload, finalize.
Expected file byte length when starting a resumable upload.
File MIME type when starting a resumable upload.
Request body
Response
Success
Changes
No recorded changes to this operation across all 1 revision of this API.