Text Google

Gemini API

Use the Gemini API via RunAPI with a model skill, unified auth, and pay-as-you-go pricing.

runapi.ai
# Base URL
https://runapi.ai

# Endpoints
POST /v1/chat/completions
POST /v1/responses
POST /v1/messages
POST /v1beta/models/{model}:generateContent
POST /v1beta/models/{model}:streamGenerateContent
curl https://runapi.ai/v1/chat/completions \
  -H "Authorization: Bearer $RUNAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gemini-3.8-flash",
  "messages": [
    {
      "role": "user",
      "content": "Analyze this codebase and suggest three performance improvements with before/after examples."
    }
  ]
}'
from openai import OpenAI

client = OpenAI(
    base_url="https://runapi.ai/v1",
    api_key="your-runapi-key"
)

response = client.chat.completions.create(
    model="gemini-3.8-flash",
    messages=[{"role": "user", "content": "Analyze this codebase and suggest three performance improvements with before/after examples."}]
)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://runapi.ai/v1",
  apiKey: "your-runapi-key"
});

const response = await client.chat.completions.create({
  model: "gemini-3.8-flash",
  messages: [{ role: "user", content: "Analyze this codebase and suggest three performance improvements with before/after examples." }]
});
https://runapi.ai 5 endpoints
OVERVIEW

About Gemini

Gemini is Google's multimodal large language model family supporting text, image, audio, and code understanding. Available in Flash and Pro variants, it handles tasks from quick summarization to deep reasoning and complex coding.

Provider
Google
Modality
Text

Gemini API endpoints

EndpointProtocol
POST /v1/chat/completionsOpenAI compatible
POST /v1/responsesOpenAI Responses
POST /v1/messagesAnthropic compatible
POST /v1beta/models/{model}:generateContentGemini generateContent
POST /v1beta/models/{model}:streamGenerateContentGemini streamGenerateContent

Available Versions

Variant Billing Pricing
gemini-2.5-flash 1K tokens Input $0.30 / 1M tokens | Output $2.50 / 1M tokens View →
gemini-2.5-pro 1K tokens Input $1.25-$2.50 / 1M tokens | Output $10.00-$15.00 / 1M tokens View →
gemini-3-flash-preview 1K tokens Input $0.50 / 1M tokens | Output $3.00 / 1M tokens · Input $0.30 / 1M tokens | Output $1.80 / 1M tokens View →
gemini-3.1-pro-preview 1K tokens Input $1.00-$2.00 / 1M tokens | Output $7.00-$10.50 / 1M tokens View →
gemini-3.5-flash 1K tokens Input $1.50 / 1M tokens | Output $9.00 / 1M tokens · Input $0.90 / 1M tokens | Output $5.40 / 1M tokens View →
gemini-3.5-flash-lite 1K tokens Input $0.15 / 1M tokens | Output $1.25 / 1M tokens View →
gemini-3.6-flash 1K tokens Input $0.75 / 1M tokens | Output $3.75 / 1M tokens View →
gemini-3.7-flash 1K tokens Input $0.45 / 1M tokens | Output $2.25 / 1M tokens View →
gemini-3.8-flash 1K tokens Input $0.45 / 1M tokens | Output $2.25 / 1M tokens View →
PRICING

Gemini Pricing

Endpoint Resolution Duration Price
chat_completion — — Input $0.30 / 1M tokens | Output $2.50 / 1M tokens

Prices shown for gemini-2.5-flash. Other variants retain their own endpoint pricing.

Agent integration

Run Gemini From an Agent

HOW IT WORKS

Get Started with Gemini

  1. Create an API key

    Sign up and generate an API key from the dashboard.

  2. Pick a version

    Choose the version that best matches your quality and cost requirements.

  3. Send a request

    Submit your prompt and parameters to the model's documented endpoint.

  4. Get your result

    Poll the task or set a webhook, then download the completed output.

CONTEXT

About Gemini on RunAPI

Gemini is Google's flagship multimodal LLM, available in Flash (fast) and Pro (frontier reasoning) variants. Through RunAPI, all Gemini models share the same API shape and billing.

Provider
Google
See all →
Modality
Text
Browse models →

Why Use Gemini Through RunAPI

One auth, every provider

A single RunAPI API key unlocks the whole model catalog across all providers. No separate accounts to create, no API keys to rotate per integration, and no credential management overhead. Add a new model to your app by changing one parameter.

Unified pricing & billing

Per-call pricing in USD, billed monthly into a single invoice. No subscription tiers, no minimum spend, and failed generations are never charged. The pricing page and check_pricing API show exact costs before you commit to a model.

Schema-first SDK

Typed schemas, parameter constraints, and setup notes are packaged in the model skill so your implementation starts from the right contract. The skill loads into Claude Code, Codex, Gemini CLI, Cursor, and VS Code — your agent knows the correct request shape before you write a line of code.

Gemini Questions

What is the context window size for Gemini?

Up to 1 million tokens across all variants. This handles entire codebases, long documents, and multi-turn conversations without truncation.

What input modalities does Gemini accept?

Text, images, audio, and video. You can pass multimodal inputs in a single request for cross-modal reasoning.

What is Google Search grounding?

Gemini can ground responses in real-time Google Search results, reducing hallucination for factual and time-sensitive queries.

How do Flash and Pro compare?

Flash is optimized for speed and cost — ideal for high-volume tasks. Pro delivers deeper reasoning and is better for complex multi-step analysis.

Does Gemini support function calling?

Yes — Gemini supports structured function calling with typed JSON schemas, making it suitable for agentic workflows and tool use.

Which variant should I start with?

Pick the cheapest variant that meets your quality bar. Most teams start on the fast variant and graduate to pro for production.

SIMILAR MODELS

Similar Text Models

Start generating with Gemini