यह हमारा सबसे किफ़ायती मल्टीमॉडल है. यह ज़्यादा फ़्रीक्वेंसी वाले और कम समय में पूरे होने वाले कामों को सबसे तेज़ी से पूरा करता है. Gemini 3.1 Flash-Lite, ज़्यादा मात्रा में एजेंटिक टास्क, डेटा निकालने के आसान काम, और बहुत कम समय में जवाब देने वाले ऐप्लिकेशन के लिए सबसे अच्छा है. इन कामों में बजट और स्पीड सबसे अहम होती है.
gemini-3.1-flash-lite-preview
| प्रॉपर्टी | ब्यौरा |
|---|---|
| मॉडल कोड | gemini-3.1-flash-lite-preview |
| इस्तेमाल किए जा सकने वाले डेटा टाइप |
इनपुट टेक्स्ट, इमेज, वीडियो, ऑडियो, और PDF आउटपुट टेक्स्ट |
| टोकन की सीमाएं[*] |
इनपुट टोकन की सीमा 1,048,576 आउटपुट टोकन की सीमा 65,536 |
| मिलने वाली अनुमतियां |
ऑडियो जनरेट करने की सुविधा काम नहीं करता है Batch API काम करता है कैश मेमोरी में सेव होना काम करता है कोड चलाने की सुविधा काम करता है कंप्यूटर का इस्तेमाल काम नहीं करता है फ़ाइल खोजना काम करता है फ़ंक्शन कॉलिंग काम करता है Google Maps की मदद से जवाब पाना काम नहीं करता है इमेज जनरेट करना काम नहीं करता है Live API काम नहीं करता है भरोसेमंद स्रोतों से जानकारी लेना काम करता है स्ट्रक्चर्ड आउटपुट काम करता है सोचना काम करता है यूआरएल का कॉन्टेक्स्ट काम करता है |
| वर्शन |
|
| नया अपडेट | मार्च 2026 |
| जानकारी न मिलना | जनवरी 2025 |
डेवलपर गाइड
Gemini 3.1 Flash-Lite, सीधे तौर पर किए जाने वाले टास्क को बड़े पैमाने पर हैंडल करने के लिए सबसे अच्छा है. यहां Gemini 3.1 Flash-Lite के इस्तेमाल के कुछ उदाहरण दिए गए हैं:
अनुवाद: तेज़ी से, कम लागत में, और ज़्यादा मात्रा में अनुवाद करना. जैसे, चैट मैसेज, समीक्षाएं, और सहायता टिकट को बड़े पैमाने पर प्रोसेस करना. सिस्टम के निर्देशों का इस्तेमाल करके, जवाब को सिर्फ़ अनुवाद किए गए टेक्स्ट तक सीमित किया जा सकता है. इसमें कोई अतिरिक्त टिप्पणी शामिल नहीं होगी:
text = "Hey, are you down to grab some pizza later? I'm starving!" response = client.models.generate_content( model="gemini-3.1-flash-lite-preview", config={ "system_instruction": "Only output the translated text" }, contents=f"Translate the following text to German: {text}" ) print(response.text)ट्रांसक्रिप्शन: रिकॉर्डिंग, वॉइस नोट या किसी भी ऑडियो कॉन्टेंट को प्रोसेस करें. इससे आपको टेक्स्ट ट्रांसक्रिप्ट मिलती है. इसके लिए, आपको स्पीच-टू-टेक्स्ट की अलग पाइपलाइन शुरू करने की ज़रूरत नहीं होती. इसमें मल्टीमॉडल इनपुट का इस्तेमाल किया जा सकता है. इसलिए, ट्रांसक्रिप्शन के लिए सीधे तौर पर ऑडियो फ़ाइलें पास की जा सकती हैं:
# URL = "https://storage.googleapis.com/generativeai-downloads/data/State_of_the_Union_Address_30_January_1961.mp3" # Upload the audio file to the GenAI File API uploaded_file = client.files.upload(file='sample.mp3') prompt = 'Generate a transcript of the audio.' response = client.models.generate_content( model="gemini-3.1-flash-lite-preview", contents=[prompt, uploaded_file] ) print(response.text)लाइटवेट एजेंटिक टास्क और डेटा एक्सट्रैक्शन: इसमें स्ट्रक्चर्ड JSON आउटपुट के साथ, इकाई की जानकारी निकालना, क्लासिफ़िकेशन करना, और लाइटवेट डेटा प्रोसेसिंग पाइपलाइन जैसे काम किए जा सकते हैं. उदाहरण के लिए, ई-कॉमर्स प्लैटफ़ॉर्म पर खरीदार की समीक्षा से स्ट्रक्चर्ड डेटा निकालना:
from pydantic import BaseModel, Field prompt = "Analyze the user review and determine the aspect, sentiment score, summary quote, and return risk" input_text = "The boots look amazing and the leather is high quality, but they run way too small. I'm sending them back." class ReviewAnalysis(BaseModel): aspect: str = Field(description="The feature mentioned (e.g., Price, Comfort, Style, Shipping)") summary_quote: str = Field(description="The specific phrase from the review about this aspect") sentiment_score: int = Field(description="1 to 5 (1=worst, 5=best)") is_return_risk: bool = Field(description="True if the user mentions returning the item") response = client.models.generate_content( model="gemini-3.1-flash-lite-preview", contents=[prompt, input_text], config={ "response_mime_type": "application/json", "response_json_schema": ReviewAnalysis.model_json_schema(), }, ) print(response.text)दस्तावेज़ प्रोसेस करना और खास जानकारी देना: PDF फ़ाइलों को पार्स करें और कम शब्दों में खास जानकारी दें. जैसे, दस्तावेज़ प्रोसेस करने की पाइपलाइन बनाने या आने वाली फ़ाइलों को तुरंत प्राथमिकता देने के लिए:
import httpx # Download a sample PDF document doc_url = "https://storage.googleapis.com/generativeai-downloads/data/med_gemini.pdf" doc_data = httpx.get(doc_url).content prompt = "Summarize this document" response = client.models.generate_content( model="gemini-3.1-flash-lite-preview", contents=[ types.Part.from_bytes( data=doc_data, mime_type='application/pdf', ), prompt ] ) print(response.text)मॉडल राउटिंग: कम समय में जवाब देने वाले और कम लागत वाले मॉडल का इस्तेमाल क्लासिफ़ायर के तौर पर करें. यह मॉडल, टास्क की जटिलता के आधार पर क्वेरी को सही मॉडल पर राउट करता है. यह प्रोडक्शन में एक असली पैटर्न है — ओपन-सोर्स Gemini CLI, टास्क की मुश्किल को कैटगरी में बांटने के लिए Flash-Lite का इस्तेमाल करता है. इसके बाद, टास्क को Flash या Pro पर भेजता है.
FLASH_MODEL = 'flash' PRO_MODEL = 'pro' CLASSIFIER_SYSTEM_PROMPT = f""" You are a specialized Task Routing AI. Your sole function is to analyze the user's request and classify its complexity. Choose between `{FLASH_MODEL}` (SIMPLE) or `{PRO_MODEL}` (COMPLEX). 1. `{FLASH_MODEL}`: A fast, efficient model for simple, well-defined tasks. 2. `{PRO_MODEL}`: A powerful, advanced model for complex, open-ended, or multi-step tasks. A task is COMPLEX if it meets ONE OR MORE of the following criteria: 1. High Operational Complexity (Est. 4+ Steps/Tool Calls) 2. Strategic Planning and Conceptual Design 3. High Ambiguity or Large Scope 4. Deep Debugging and Root Cause Analysis A task is SIMPLE if it is highly specific, bounded, and has Low Operational Complexity (Est. 1-3 tool calls). """ user_input = "I'm getting an error 'Cannot read property 'map' of undefined' when I click the save button. Can you fix it?" response_schema = { "type": "object", "properties": { "reasoning": { "type": "string", "description": "A brief, step-by-step explanation for the model choice, referencing the rubric." }, "model_choice": { "type": "string", "enum": [FLASH_MODEL, PRO_MODEL] } }, "required": ["reasoning", "model_choice"] } response = client.models.generate_content( model="gemini-3.1-flash-lite-preview", contents=user_input, config={ "system_instruction": CLASSIFIER_SYSTEM_PROMPT, "response_mime_type": "application/json", "response_json_schema": response_schema }, ) print(response.text)सोचने की क्षमता: ऐसे टास्क के लिए सोचने की क्षमता को कॉन्फ़िगर करें जिनमें सिलसिलेवार तरीके से तर्क करने से बेहतर नतीजे मिलते हैं. इससे मॉडल, फ़ाइनल आउटपुट देने से पहले, तर्क करने के लिए ज़्यादा कंप्यूटिंग पावर का इस्तेमाल कर पाएगा:
response = client.models.generate_content( model="gemini-3.1-flash-lite-preview", contents="How does AI work?", config=types.GenerateContentConfig( thinking_config=types.ThinkingConfig(thinking_level="high") ), ) print(response.text)