TokenLab

Gemini Files & Cache

Update Gemini cached content

Updates the cache lifetime.

PATCH
/v1beta/cachedContents/{cacheId}
Updates the cache lifetime. Invalid lifetime or unsupported fields return a Gemini-format error. Resources can only be read, referenced, changed, or deleted in their owning Workspace.
curl -X PATCH "https://example.com/v1beta/cachedContents/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "name": "string",  "model": "string",  "displayName": "string",  "createTime": "2019-08-24T14:15:22Z",  "updateTime": "2019-08-24T14:15:22Z",  "expireTime": "2019-08-24T14:15:22Z",  "usageMetadata": {}}

Authorization

AuthorizationBearer <token>

API Key authentication. Create or manage API keys in Dashboard > API > API Keys.

In: header

Path Parameters

cacheId*string

Query Parameters

key?string

API key alternative to Bearer or x-goog-api-key.

updateMask?string

Gemini field mask when required by the service.

Request Body

application/json

Update cached content lifetime using the fields accepted by the service.

Response

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json