En uygun maliyetli çok formatlı modelimiz. Yüksek sıklıkta gerçekleştirilen, basit görevlerde en hızlı performansı sunar. Gemini 3.1 Flash-Lite, yüksek hacimli yapay zeka aracılı görevler, basit veri ayıklama ve bütçe ile hızın temel kısıtlamalar olduğu son derece düşük gecikmeli uygulamalar için en iyisidir.
gemini-3.1-flash-lite-preview
| Mülk | Açıklama |
|---|---|
| Model kodu | gemini-3.1-flash-lite-preview |
| Desteklenen veri türleri |
Girişler Metin, Resim, Video, Ses ve PDF Çıkış Metin |
| Jeton sınırları[*] |
Giriş jetonu sınırı 1.048.576 Çıkış jetonu sınırı 65.536 |
| Özellikler |
Ses üretimi Desteklenmiyor Batch API Destekleniyor Önbelleğe alma Destekleniyor Kod yürütme Destekleniyor Bilgisayar kullanımı Desteklenmiyor Dosya arama Destekleniyor İşlev çağırma Destekleniyor Google Haritalar ile temellendirme Desteklenmiyor Görüntü üretme Desteklenmiyor Live API Desteklenmiyor Arama temellendirme Destekleniyor Yapılandırılmış çıkışlar Destekleniyor Düşünme (Thinking) Destekleniyor URL bağlamı Destekleniyor |
| Sürümler |
|
| Son güncelleme | Mart 2026 |
| Son güncel bilgi tarihi | Ocak 2025 |
Geliştirici kılavuzu
Gemini 3.1 Flash-Lite, basit görevleri önemli ölçüde büyük ölçekte yönetmek için en uygun modeldir. Gemini 3.1 Flash-Lite'ın en iyi şekilde kullanılabileceği bazı alanlar:
Çeviri: Sohbet mesajları, yorumlar ve destek talepleri gibi büyük hacimli içeriklerin hızlı ve uygun maliyetli şekilde çevrilmesi. Çıkışı yalnızca çevrilmiş metinle sınırlamak için sistem talimatlarını kullanabilirsiniz. Ek yorum eklenmez:
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)Transkripsiyon: Ayrı bir metin okuma işlem hattı oluşturmadan, metin transkriptine ihtiyaç duyduğunuz kayıtları, sesli notları veya ses içeriklerini işleyin. Çok formatlı girişleri desteklediği için transkripsiyon için doğrudan ses dosyaları gönderebilirsiniz:
# 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)Basit aracı görevleri ve veri ayıklama: Yapılandırılmış JSON çıkışıyla desteklenen, öğe ayıklama, sınıflandırma ve basit veri işleme ardışık düzenleri. Örneğin, bir e-ticaret müşteri yorumundan yapılandırılmış verileri ayıklama:
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)Belge işleme ve özetleme: PDF'leri ayrıştırın ve belge işleme hattı oluşturma veya gelen dosyaları hızlı bir şekilde önceliklendirme gibi konularda kısa özetler döndürün:
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)Model yönlendirme: Sorguları görev karmaşıklığına göre uygun modele yönlendiren bir sınıflandırıcı olarak düşük gecikmeli ve düşük maliyetli bir model kullanın. Bu, üretimde kullanılan gerçek bir kalıptır. Açık kaynaklı Gemini KSA, görev karmaşıklığını sınıflandırmak ve buna göre Flash veya Pro'ya yönlendirmek için Flash-Lite'ı kullanır.
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)Düşünme: Adım adım akıl yürütme gerektiren görevlerde daha iyi doğruluk için düşünme özelliğini, modelin nihai çıktıyı oluşturmadan önce dahili akıl yürütme için ek işlem gücü harcayacak şekilde yapılandırın:
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)