All insights

Model APIs

Gemini 2.5 Flash-Lite API: Access, REST Quickstart, and Limits

Find out whether you can access Gemini 2.5 Flash-Lite, then make a direct Google Gemini API request with the documented model ID, endpoint, and API-key header.

Illustration for Gemini 2.5 flash-lite api

Short answer

For the direct Google Gemini API, the model ID is gemini-2.5-flash-lite. Eligible projects can call it with the generateContent REST method at the v1beta endpoint below. Google currently limits Gemini 2.5 API access to users who have actively used the 2.5 models before. Google’s Gemini API model page says this model is not deprecated and will continue to be served through the API until further notice; it recommends newer models for new projects. Check access in Google AI Studio before choosing Flash-Lite for a new integration. These lifecycle statements refer to the Gemini API route, not every Google Cloud product that may offer the model. (aistudio.google.com)

Make a first direct API request

This example calls Google’s Gemini Developer API directly—not a third-party gateway—and sends a text prompt.

  1. In Google AI Studio, create or select a project and obtain a Gemini API key. Keep the key private; don’t commit it to source control or expose it in browser code. Google recommends supplying the key through an environment variable. (aistudio.google.com)
  2. Set the key in your shell, then send the request:
export GEMINI_API_KEY='YOUR_GEMINI_API_KEY'

curl -X POST \
  'https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-lite:generateContent' \
  -H "x-goog-api-key: ${GEMINI_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "contents": [
      {
        "parts": [
          { "text": "Summarize what an API does in one sentence." }
        ]
      }
    ]
  }'

In the JSON response, generated text is at candidates[0].content.parts[0].text. Handle the response structure rather than assuming every response contains exactly one text part. The request method, endpoint format, API-key header, body structure, and response path follow Google’s generateContent documentation; the model-specific identifier comes from its Flash-Lite model page. (aistudio.google.com)

Check model fit and limits

Google lists text, image, video, audio, and PDF as inputs for Gemini 2.5 Flash-Lite, and text as its output. The listed input-token limit is 1,048,576 and the output-token limit is 65,536. Listed capabilities include function calling, code execution, search grounding, structured outputs, and thinking. Check the documentation for the specific feature you plan to use before adding its configuration to a request. (aistudio.google.com)

Google’s model page lists gemini-2.5-flash-lite as the stable model and gemini-2.5-flash-lite-preview-09-2025 as shut down. The preview was shut down on March 31, 2026; don’t use that preview ID in place of the stable model ID. (aistudio.google.com)

Production checks: quota, billing, and data

  • Check your project’s live quota before estimating capacity. Gemini API limits vary by model and usage tier, apply per project rather than per API key, and can be viewed in Google AI Studio. Don’t rely on a quota number copied from an older guide. (ai.google.dev)
  • Check your billing tier and its data-use terms. Google says prompts and responses in Paid Tier services are not used to improve Google products under the stated terms. That assurance is specific to Paid Services; don’t assume it applies to Free Tier usage. Review the current terms for your project before sending sensitive or confidential information. (ai.google.dev)
  • Review request storage separately from product improvement. Google says Generate Content API requests are stored by default for projects created on or after October 26, 2026. Projects created before that date keep their existing setting—off by default unless enabled in AI Studio. Google documents a request-level store setting that takes precedence over the project setting; its documented SDK versions for setting it are Python google-genai 2.33.0+, JavaScript @google/genai 2.31.0+, Java google-genai 1.79.0+, and Go google.golang.org/genai 1.76.0+. You can also change project logging in AI Studio. Logging controls are distinct from whether prompts and responses may be used to improve products. (ai.google.dev)
  • Confirm access before selecting Flash-Lite for a new project. Google’s model documentation says Gemini 2.5 access is limited to users who actively used the models previously and recommends newer models for new projects. (aistudio.google.com)

Don’t reuse a Flash or gateway configuration

A Gemini 2.5 Flash example—or a third-party gateway’s model name, endpoint, and key—is not automatically valid for Flash-Lite through Google. For this direct integration, use the Google model ID gemini-2.5-flash-lite, the generativelanguage.googleapis.com endpoint, and a Gemini API key. Verify the identifier and endpoint against the provider route you choose.

Sources

Gemini 2.5 Flash-Lite | Gemini API | Google AI for Developers

Text generation - generateContent API | Google AI for Developers

Using Gemini API keys | Google AI for Developers

Rate limits | Gemini API | Google AI for Developers

Billing | Gemini API | Google AI for Developers

Gemini API Additional Terms of Service | Google AI for Developers

Logs and datasets | Gemini API | Google AI for Developers

Gemini 2.5 Flash-Lite preview | Gemini API | Google AI for Developers

Contact us