Gemini Files 与缓存

更新 Gemini 缓存内容

更新缓存生命周期。

PATCH
/v1beta/cachedContents/{cacheId}
更新缓存生命周期。无效的生命周期或不支持的字段将返回 Gemini 格式错误。资源只能在其所属的工作区中进行读取、引用、更改或删除。
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": {}}

授权

AuthorizationBearer <token>

API Key 身份验证。在 Dashboard > API > API Keys 中创建或管理 API Key。

位置: header

路径参数

cacheId*string

查询参数

key?string

替代 Bearer 或 x-goog-api-key 的 API key。

updateMask?string

服务要求时的 Gemini 字段掩码 (field mask)。

请求体

application/json

使用服务接受的字段更新缓存内容生命周期。

响应

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json