TokenLab

Gemini Files & Cache

Continue Gemini file upload

Sends bytes or commands to the exact URL returned by resumable start.

POSThttps://api.tokenlab.sh/upload/v1beta/files/session/{sessionId}
Sends bytes or commands to the exact URL returned by resumable start. The session in the URL authorizes this upload; an API key is not required. Keep the URL private.
curl -X POST "https://example.com/upload/v1beta/files/session/string" \  -H "Content-Type: application/octet-stream" \  -d 'string'
{  "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": {}  }}

Path Parameters

sessionId*string

Headers

X-Goog-Upload-Command?string

Upload command such as upload, finalize.

X-Goog-Upload-Offset?string

Zero-based byte offset of the chunk.

Request Body

body?file
Formatbinary

Response

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json