Gemini Files 与缓存

列出 Gemini 缓存内容

列出属于当前工作区中的缓存内容。

GET
/v1beta/cachedContents
列出属于当前工作区中的缓存内容。使用 nextPageToken 继续。资源只能在其所属的工作区中进行读取、引用、更改或删除。
curl -X GET "https://example.com/v1beta/cachedContents"
{  "cachedContents": [    {      "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": {}    }  ],  "nextPageToken": "string"}

授权

AuthorizationBearer <token>

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

位置: header

查询参数

key?string

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

pageSize?integer

请求的页面大小;同时也接受 page_size。

pageToken?string

来自上一个响应的不透明 nextPageToken。同时也接受 page_token。

响应

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json