Cached Contents
POST /v1beta/cachedContents
bash
curl https://api.layso.ai/v1beta/cachedContents \
-H "x-goog-api-key: $LAYSO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "models/gemini-model-id",
"contents": [{"parts": [{"text": "Reusable long context"}]}],
"ttl": "3600s"
}'Reference the returned cache name with the cachedContent field in a Generate Content request.
