googleapis / googleapis/python-genai
Files API should accept TTL shorter than 48 hours
- Dominant language
- Python
- Stars
- 4k
- Forks
- 1k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 40
Description
https://ai.google.dev/gemini-api/docs/files#usage_info
> Files are stored for 48 hours.
I am processing a large number of video files, and am uploading via the Gemini Files API. However, they all have an automatic 48 hour TTL, and as a result I quickly go past my 20GB `FileStorageBytesPerProject` quota.
```
RESOURCE_EXHAUSTED: You exceeded your current quota, please check your plan and billing details. For more information on this error, head to: https://ai.google.dev/gemini-api/docs/rate-limits. [type.googleapis.com/util.MessageSetPayload=\'[google.rpc.error_details_ext] { details { [type.googleapis.com/google.rpc.QuotaFailure] { violations { quota_metric: "generativelanguage.googleapis.com/file_storage_bytes" quota_id: "FileStorageBytesPerProject" quota_value: 21474836480 } } } details { [type.googleapis.com/google.rpc.Help] { links { description: "Learn more about Gemini API quotas" url: "https://ai.google.dev/gemini-api/docs/rate-limits" } } } details { [type.googleapis.com/google.rpc.RetryInfo] { retry_delay { seconds: 9223372036854775807 } } } }\']'}]}}
```
I would like to be able to set a TTL as part of the file create API similar to how I can set a TTL with the cache create API.
Contributor guide
Assessment
This issue has not been assessed yet.