Gemini Files 与缓存

获取 Gemini 文件

读取 Gemini 文件的元数据。

GET
/v1beta/files/{fileId}
读取 Gemini 文件的元数据。资源只能在其所属的工作区中进行读取、引用、更改或删除。缺失、过期或不可访问的资源将返回 Gemini 格式错误。
curl -X GET "https://example.com/v1beta/files/string"
{  "name": "string",  "displayName": "string",  "mimeType": "string",  "sizeBytes": "string",  "uri": "string",  "state": "string",  "createTime": "2019-08-24T14:15:22Z",  "updateTime": "2019-08-24T14:15:22Z",  "expirationTime": "2019-08-24T14:15:22Z",  "error": {}}

授权

AuthorizationBearer <token>

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

位置: header

路径参数

fileId*string

返回的 files/{fileId} 名称的后缀。

查询参数

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