GenAI Integration

Create cached content (Gemini format)

Creates a cached content entry that can be re-used across subsequent generate-content calls to reduce repeated prefix tokens.

post/genai/v1beta/cachedContents

Request

Headers

x-model-providerstring

Optional provider override. Defaults to gemini. Use vertex to route to Vertex.

Request body

modelstring required

Gemini model identifier (e.g. gemini-1.5-pro). The models/ prefix is stripped.

displayNamestring
systemInstructionobject

System instruction content.

toolConfigunknown
ttlstring

TTL in protobuf duration format (e.g. 3600s).

expireTimestring date-time

Response

Successful response

object required

Changes

No recorded changes to this operation across all 1 revision of this API.