Gemini Files 与缓存

获取 Gemini 缓存内容

读取缓存内容元数据。

GET
/v1beta/cachedContents/{cacheId}
读取缓存内容元数据。资源只能在其所属的工作区中进行读取、引用、更改或删除。缺失、过期或不可访问的资源将返回 Gemini 格式错误。
curl -X GET "https://example.com/v1beta/cachedContents/string"
{  "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

返回的 cachedContents/{cacheId} 名称的后缀。

查询参数

key?string

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

响应

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json