Gemini Resources

Update Gemini cached content

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. Missing, expired, or inaccessible resources return a Gemini-format error.

patch/v1beta/cachedContents/{cacheId}

Request

  • Base URL: https://api.tokenlab.sh
  • URL: https://api.tokenlab.sh/v1beta/cachedContents/{cacheId}
  • Auth: one of:
    • HTTP bearer
    • API key in header x-goog-api-key

Path parameters

cacheIdstring required

Query parameters

keystring

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

updateMaskstring

Gemini field mask when required by the service.

Request body

ttlstring

Positive duration such as 3600s.

expireTimestring date-time

Response

Success

namestring

Resource name such as cachedContents/{cacheId}.

modelstring

TokenLab model ID associated with the cached content.

displayNamestring

Human-readable cache name.

createTimestring date-time
updateTimestring date-time
expireTimestring date-time
usageMetadataobject

Changes

No recorded changes to this operation across all 1 revision of this API.