Skip to main content

Setup Your API Key

To use Google AI with Orq.ai, follow these steps:
  1. Navigate to AI Gateway > BYOK
  2. Find Google AI in the list
  3. Click the Configure button next to Google AI
  4. In the modal that opens, select Setup your own API Key
  5. Enter a name for this configuration (e.g., “Google AI Production”)
  6. Paste your Google AI API Key into the provided field
  7. Click Save to complete the setup
Your Google AI API key is now configured and ready to use through the AI Gateway.

Available Models

The AI Gateway supports all current Google Gemini models. Here are the most commonly used:
ModelContextBest For
google-ai/gemini-3.1-pro-preview1MLatest Gemini 3.1, most advanced (experimental)
google-ai/gemini-3.1-pro-preview-customtools1MGemini 3.1 with custom tools support
google-ai/gemini-3.1-flash-lite-preview1MCost-efficient Gemini 3.1 inference
google-ai/gemini-2.5-pro1MLatest stable, most capable
google-ai/gemini-2.5-flash1MFast, balanced performance
google-ai/gemini-2.5-flash-lite1MLightweight, cost-effective

Latest Generation (Gemini 3.1: Preview)

  • google-ai/gemini-3.1-pro-preview: Latest Gemini 3.1, most advanced
  • google-ai/gemini-3.1-pro-preview-customtools: Gemini 3.1 with custom tools support
  • google-ai/gemini-3.1-flash-lite-preview: Cost-efficient inference, Flash Lite variant

Current Generation (Gemini 2.5)

  • google-ai/gemini-2.5-pro: Latest stable, most capable
  • google-ai/gemini-2.5-flash: Fast, balanced performance
  • google-ai/gemini-2.5-flash-lite: Lightweight, cost-effective
  • google-ai/gemini-2.5-flash-preview-09-2025: Flash preview
  • google-ai/gemini-2.5-flash-lite-preview-09-2025: Lite preview

Stable Generation (Gemini 2.0)

  • google-ai/gemini-2.0-flash: Stable, reliable
  • google-ai/gemini-2.0-flash-001: Specific version
  • google-ai/gemini-2.0-flash-lite: Lightweight variant
  • google-ai/gemini-2.0-flash-lite-001: Lite specific version
  • google-ai/gemini-2.0-flash-lite-preview-02-05: Preview version

Latest Versions

  • google-ai/gemini-flash-latest: Latest flash model
  • google-ai/gemini-flash-lite-latest: Latest lite model
For a complete and up-to-date list of all available Google Gemini models, see Supported Models.All models are available through the AI Gateway with the google-ai/ prefix.
Use google-ai/gemini-3.1-pro-preview for the latest preview, google-ai/gemini-2.5-pro for the latest stable model, or google-ai/gemini-2.5-flash for the best balance of performance and cost.

Quick Start

Access Google Gemini models through the AI Gateway.
curl -X POST https://api.orq.ai/v3/router/responses \
  -H "Authorization: Bearer $ORQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google-ai/gemini-2.5-pro",
    "input": "Explain quantum computing in simple terms"
  }'

Using the AI Gateway

Access Google Gemini models through the AI Gateway with advanced chat completions, streaming, and intelligent model routing. All Gemini models are available with consistent formatting and automatic request logging.
Google AI models use the provider slug format: google-ai/model-name. For example: google-ai/gemini-2.5-pro

Prerequisites

Before making requests to the AI Gateway, you need to configure your environment and install the SDKs if you choose to use them. Endpoint
POST https://api.orq.ai/v3/router/responses
Required Headers Include the following headers in all requests:
Authorization: Bearer $ORQ_API_KEY
Content-Type: application/json
Getting your API Key:
  1. Go to API Keys
  2. Click Create API Key and copy it
  3. Store it in your environment as ORQ_API_KEY
SDK Installation Install the OpenAI SDK for your language (compatible with Google Gemini models):
npm install openai
# or
yarn add openai

Basic Usage

If your OpenAI code is already functioning, you only need to change the base_url and api_key to the AI Gateway endpoint and ORQ_API_KEY.
Send messages to Gemini models and get intelligent responses:
curl -X POST https://api.orq.ai/v3/router/responses \
  -H "Authorization: Bearer $ORQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google-ai/gemini-2.5-pro",
    "input": "Explain machine learning"
  }'

Streaming

Stream responses for real-time output and improved user experience:
curl -X POST https://api.orq.ai/v3/router/responses \
  -H "Authorization: Bearer $ORQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google-ai/gemini-2.5-pro",
    "input": "Write a short poem about the ocean",
    "stream": true
  }'

AI Gateway Features

Reasoning models

Configure thinking_level for Gemini 3 preview models and budget_tokens for Gemini 2.5 through the AI Gateway.

Web Search

Enable Google Search grounding for supported Gemini models via the Responses API.

Reference