Google Gemini API

Google Gemini API — free tier is generous, multimodal (image + video + text).

AIFreemiumfreemiumדורש מפתחAI
Official siteDocumentation

About this API

Gemini is Google's model family. Big pluses: a real free tier (60 rpm), multimodal including video, tight integration with the Google ecosystem. Gemini 1.5 Pro supports up to 2M tokens of context — the largest in market. Downside: Hebrew still trails GPT-4 and Claude.

Who it's for

Developers who want a free tier
Video/image processing
Huge-context tasks
Google-ecosystem integrations

How to use it

  1. 1
    Create a key at aistudio.google.com.
  2. 2
    Install `@google/generative-ai`.
  3. 3
    Call generateContent with a prompt (image/video attachments supported).

Installation & setup

`npm install @google/generative-ai` or `pip install google-generativeai`. SDK shape differs slightly from OpenAI.

Code examples

import { GoogleGenerativeAI } from "@google/generative-ai";

const genAI = new GoogleGenerativeAI(process.env.GEMINI_API_KEY);
const model = genAI.getGenerativeModel({ model: "gemini-1.5-flash" });

const result = await model.generateContent("הסבר בקצרה מה זה Next.js");
console.log(result.response.text());

Sample response

{
  "candidates": [
    {
      "content": {
        "parts": [
          {
            "text": "Next.js הוא פריימוורק React לבניית אתרים…"
          }
        ],
        "role": "model"
      },
      "finishReason": "STOP"
    }
  ],
  "usageMetadata": {
    "promptTokenCount": 12,
    "candidatesTokenCount": 48
  }
}

FAQ

Yes — 60 rpm for Flash. Pro is more limited.

Tips & pitfalls

Gemini 1.5 Flash = cheap/fast, Pro = quality/expensive.
For truly huge documents — only Gemini offers 2M context.

Guides

Related APIs