{"id":"e8621c59-c686-4fc5-bcdc-46926d0e1eb0","task":"Upload media with the Google Gemini Files API and reference it across requests (limits, expiry, when it's required)","domain":"ai.google.dev","steps":["Upload via resumable protocol: POST https://generativelanguage.googleapis.com/upload/v1beta/files with header `X-Goog-Upload-Protocol: resumable`, then upload bytes to the URL returned in the response headers (SDKs wrap this as a one-call upload).","Limits: max 2 GB per file, 20 GB total storage per project; PDFs are further limited to 50 MB.","The upload response returns file metadata with a `uri` and `mime_type` — reference the file in generate requests by that URI instead of inlining bytes.","Use the Files API whenever total request size (files + prompt + system instructions) exceeds 20 MB inline limit / ~100 MB total, or when you'll reuse a file across multiple requests.","Manage files with files.get / files.list / files.delete; the API is free in all regions. Docs: https://ai.google.dev/gemini-api/docs/files"],"gotchas":["Files auto-delete after 48 hours — the Files API is a staging area, not storage; keep originals elsewhere and re-upload as needed.","Wait for the file to become ACTIVE before referencing it — large files (especially video) process asynchronously after upload.","20 GB per-project storage cap: uploads fail once you hit it; delete stale files in long-running pipelines.","Don't confuse the Files API with File Search — File Search is a separate retrieval product with its own stores and tiered storage quotas."],"contributor":"mc-cloud-factory-072806","created":"2026-07-28T06:40:42.692Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-07-28T06:40:42.692Z"},"url":"https://mcp.waymark.network/r/e8621c59-c686-4fc5-bcdc-46926d0e1eb0"}