FREE AI INDEX / 统一产品界面我的收藏提交资源 ↗

FreeLLM 免费 AI 资源索引FreeLLM Free AI Index / 资源详情Offer details

Google AI Studio · Gemini API free tierGoogle AI Studio · Gemini API free tier

Google · InternationalGoogle AI Studio

✓ 实测通过✓ Network verified仅国外可用Global only国内 — · 海外 53msChina — · Global 53ms✓ 接口已验证✓ Endpoint verified

这个资源提供什么What this offer provides

Google's official Gemini API pricing page shows a Free Tier column where input, output and context caching prices are listed as 'Free of charge'. The free tier is rate limited and, per the same page, free-tier data may be used to improve Google products.Google's official Gemini API pricing page shows a Free Tier column where input, output and context caching prices are listed as 'Free of charge'. The free tier is rate limited and, per the same page, free-tier data may be used to improve Google products.

关键信息Key details

免费方式Free methodFree tier: input, output and context caching listed as Free of chargeFree tier: input, output and context caching listed as Free of charge
有效期ValidityOngoing free tier; limits and terms can changeOngoing free tier; limits and terms can change
访问条件AccessGoogle account; availability may vary by regionGoogle account; availability may vary by region
最后核验Last checked2026-09-17

快速上手Quick start

Call Gemini models through the official Gemini API free tierFollow the model-specific steps to register, create a key and connect the model.

✓

注册与接入步骤Registration and access steps

准备条件Prerequisites

  • Google account
  • API key created in Google AI Studio
  1. Sign in to Google AI Studio and create an API keySign in to Google AI Studio and create an API key
  2. Send a generateContent request with the key and read the rate-limit page for current free tier limitsSend a generateContent request with the key and read the rate-limit page for current free tier limits
4

发送第一条请求Send first request

使用下方命令开始调用。Use the command below to make your first request.

可复制命令Copyable command
export GEMINI_API_KEY="你的 Key"
curl https://generativelanguage.googleapis.com/v1beta/models/gemini-3.8-flash:generateContent --header "x-goog-api-key: $GEMINI_API_KEY" --header 'Content-Type: application/json' -X POST --data '{"contents":[{"parts":[{"text":"Hello"}]}]}'

详细操作步骤Detailed operation paths

每条路径都拆成前置条件、步骤、可复制命令和验证动作;免费条件仍以官方页面实时状态为准。curl 命令按 macOS / Linux shell 编写,Windows 用户可使用同页的 Python 或 Node.js 示例。Each path includes prerequisites, steps, copyable commands and a validation action; free terms still follow the provider's live official policy. The curl examples use a macOS/Linux shell; Windows users can run the Python or Node.js examples on this page.

Gemini API 第一次调用

api

EndpointEndpoint
https://generativelanguage.googleapis.com/v1beta
认证Authentication
x-goog-api-key: API Key
额度与限制Limits

官方 Free Tier 按模型与账号项目分别设置限额;具体 RPM、token/minute 与每日限制在 AI Studio Usage / 官方定价页核对。

前置条件Prerequisites

  • Google AI Studio 支持地区内可用的 Google 账号Google AI Studio Google
  • 从 Google AI Studio API Keys 页面获取密钥Google AI Studio API Keys
  • 从当前模型列表确认目标 Gemini 模型及其 Free Tier 状态Gemini Free Tier

操作步骤Steps

  1. 创建或查看 API Key

    登录 Google AI Studio,在 API Keys 页面创建或查看项目密钥。将密钥保存到 GEMINI_API_KEY 环境变量,不要写进源码、截图或公开仓库。

    操作Action:打开 https://aistudio.google.com/app/apikey

  2. 确认模型和免费层级

    先在官方模型与定价页面确认模型是否有 Free Tier,以及账号所在地区能否使用。模型清单和速率限制会变化。

    操作Action:打开 https://ai.google.dev/gemini-api/docs/pricing

  3. 发送 REST 请求

    将模型名替换为当前官方模型页确认的可用 ID。

    命令已在上方「快速上手」给出。The copyable command already appears in Quick start above.

    预期结果Expected:返回 candidates[0].content.parts 中的文本;到 Google AI Studio Usage 页面检查请求与用量。

  4. Python SDK 示例

    Python 3.9+;SDK 从 GEMINI_API_KEY 环境变量读取密钥。

    可复制命令Copyable command
    python -m pip install -U google-genai
    
    from google import genai
    
    client = genai.Client()
    response = client.models.generate_content(
        model="gemini-3.8-flash",
        contents="用一句话解释 API 是什么。",
    )
    print(response.text)

    预期结果Expected:终端打印模型生成的文本;若模型不可用,先从当前官方模型清单复制模型 ID。

  5. Node.js SDK 示例

    安装官方 Google Gen AI SDK;确保启动终端的环境中已设置 GEMINI_API_KEY。

    可复制命令Copyable command
    npm install @google/genai
    
    import { GoogleGenAI } from "@google/genai";
    
    const ai = new GoogleGenAI({});
    const response = await ai.models.generateContent({
      model: "gemini-3.8-flash",
      contents: "用一句话解释 API 是什么。",
    });
    console.log(response.text);

    预期结果Expected:Node.js 打印模型生成的文本。

验证动作Validation

响应包含 candidates 文本;在 AI Studio Usage 页面确认请求记入预期项目与层级。

常见问题Common issues
  • 400 或 403:检查 API Key、项目权限、模型 ID 与账号地区支持情况。400 403: API Key、 、 ID 。
  • 429:查看 AI Studio Usage 中该模型的速率限制与配额重置时间;降低请求频率后再试。429: AI Studio Usage ; 。
  • 免费层级不用于敏感数据;Google 官方定价说明 Free Tier 内容可能用于改进产品。;Google Free Tier 。

官方来源Official sources

官方来源Official sources

Official pricing page: 'Gemini 3.8 Flash ... Free Tier ... Input price Free of charge ... Output price (including thinking tokens) Free of charge ... Context caching price Free of charge', and free tier 'Used to improve our products: Yes'.Official pricing page: 'Gemini 3.8 Flash ... Free Tier ... Input price Free of charge ... Output price (including thinking tokens) Free of charge ... Context caching price Free of charge', and free tier 'Used to improve our products: Yes'.

相关资源Related resources