Gemini Files & Cache
Upload Gemini file
Uploads bytes or starts a resumable upload.
curl -X POST "https://example.com/upload/v1beta/files" \ -H "Content-Type: application/json" \ -d '{}'{ "file": { "name": "string", "displayName": "string", "mimeType": "string", "sizeBytes": "string", "uri": "string", "state": "string", "createTime": "2019-08-24T14:15:22Z", "updateTime": "2019-08-24T14:15:22Z", "expirationTime": "2019-08-24T14:15:22Z", "error": {} }}API Key authentication. Create or manage API keys in Dashboard > API > API Keys.
In: header
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.
Gemini file metadata request. Supported fields and values are validated by the service. File bytes are uploaded through /upload/v1beta/files.
Response
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json