AI Proxy Advanced

AI License Required

Native Gemini API routev3.8+

Configure a route that uses native Gemini APIs with the Gemini SDK. This example uses the gemini-1.5-flash model.

Supported native Gemini APIs include:

  • /generateContent
  • /streamGenerateContent

Set llm_format: gemini to enable compatibility with these APIs. Use default values for genai_category and route_type parameters (text/generation and llm/v1/chat).

Prerequisites

  • Google Cloud account with access to Gemini APIs

Environment variables

  • GEMINI_API_KEY: The API key to use to connect to Gemini.

Set up the plugin

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!