> For the complete documentation index, see [llms.txt](https://docs.clore.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clore.ai/guides/guides_v2-de/sprachmodelle/gemini-3-1-flash-lite.md).

# Gemini 3.1 Flash Lite

> **Gemini 3.1 Flash Lite** ist Googles günstigstes und schnellstes Produktionsmodell Stand März 2026, veröffentlicht am 3. März 2026. Es ist die API-optimierte Stufe der Gemini-3.1-Familie — entwickelt für Workloads mit hohem Durchsatz und niedrigen Kosten, wie Echtzeit-Chatbots, Klassifizierungs-Pipelines und RAG-Abrufschichten. Betreiben Sie es selbst per Ollama oder vLLM auf Clore.ai-GPUs für maximale Kostenkontrolle.

## Was ist Gemini 3.1 Flash Lite?

Veröffentlicht am 3. März 2026 als der leichtgewichtige Einstieg in die Gemini-3.1-Familie (zu der auch Gemini 3.1 Pro vom 19. Februar 2026 gehört), tauscht Flash Lite etwas Tiefgang beim Reasoning gegen deutlich geringere Latenz und Kosten. Es ist Googles Antwort auf die "schnell und günstig"-Stufe — im Preis-Leistungs-Verhältnis direkte Konkurrenz zu den Mini-Varianten von GPT-5.4 und Claude Sonnet.

**Wichtige Spezifikationen:**

* **Multimodal**: Text-, Bild-, Audio- und Videoeingaben
* **Kontextfenster**: 1 Mio. Tokens (wie bei Gemini 3.1 Pro)
* **Ausgabe**: bis zu 8K Tokens pro Anfrage
* **Latenz**: \~120 ms Zeit bis zum ersten Token für kurze Prompts (API)
* **Architektur**: Destilliert aus Gemini 3.1 Pro mit spekulativem Decoding

> **Hinweis:** Gemini 3.1 Flash Lite ist ein **nur über die Google API** Modell — die Gewichte sind nicht öffentlich verfügbar. Dieser Leitfaden behandelt (a) die Nutzung der Google-Gemini-API auf Clore.ai-Infrastruktur und (b) vergleichbare Open-Source-Alternativen, die Sie vollständig selbst hosten können.

## Option A: Gemini 3.1 Flash Lite API auf einem Clore.ai-Server nutzen

Auch wenn Sie die Gewichte nicht lokal ausführen können, ist das Hosting Ihrer API-verbrauchenden Anwendung auf den günstigen Servern von Clore.ai sinnvoll für langlebige Prozesse, Automatisierungspipelines und Batch-Jobs.

### Einrichtung: API-Proxy + FastAPI auf Clore.ai

```bash
# Mieten Sie einen CPU- oder leichtgewichtigen GPU-Server auf Clore.ai
# Eine RTX 3060 (~0,25 $/h) ist für API-Proxy-Workloads mehr als ausreichend

pip install google-generativeai fastapi uvicorn

cat > gemini_proxy.py << 'EOF'
import google.generativeai as genai
from fastapi import FastAPI, HTTPException
from pydantic import BaseModel
import os

genai.configure(api_key=os.environ["GOOGLE_API_KEY"] )
model = genai.GenerativeModel("gemini-3.1-flash-lite")

app = FastAPI(title="Gemini 3.1 Flash Lite Proxy")

class ChatRequest(BaseModel):
    message: str
    system_prompt: str = "Sie sind ein hilfreicher Assistent."
    max_tokens: int = 2048

@app.post("/chat")
async def chat(req: ChatRequest):
    try:
        response = model.generate_content(
            [req.system_prompt, req.message],
            generation_config=genai.GenerationConfig(
                max_output_tokens=req.max_tokens,
                temperature=0.7
            )
        )
        return {"response": response.text, "model": "gemini-3.1-flash-lite"}
    except Exception as e:
        raise HTTPException(status_code=500, detail=str(e))

@app.post("/vision")
async def vision_chat(image_url: str, prompt: str):
    import httpx
    async with httpx.AsyncClient() as client:
        img_data = await client.get(image_url)
    
    import PIL.Image
    import io
    image = PIL.Image.open(io.BytesIO(img_data.content))
    response = model.generate_content([prompt, image])
    return {"response": response.text}

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8080)
EOF

GOOGLE_API_KEY=your-key uvicorn gemini_proxy:app --host 0.0.0.0 --port 8080
```

### Batch-Verarbeitung mit hohem Durchsatz

```python
import google.generativeai as genai
import asyncio
from typing import List

genai.configure(api_key="YOUR_API_KEY")

async def batch_classify(texts: List[str], batch_size: int = 50) -> List[str]:
    """Texte in parallelen Batches klassifizieren — Kosten ca. 0,001 $ pro 1K Texte."""
    model = genai.GenerativeModel("gemini-3.1-flash-lite")
    
    results = []
    for i in range(0, len(texts), batch_size):
        batch = texts[i:i + batch_size]
        tasks = [
            model.generate_content_async(
                f"Klassifiziere diesen Text als POSITIV, NEGATIV oder NEUTRAL. Antworte nur mit einem Wort.\n\nText: {text}"
            )
            for text in batch
        ]
        responses = await asyncio.gather(*tasks, return_exceptions=True)
        results.extend([
            r.text.strip() if not isinstance(r, Exception) else "FEHLER"
            for r in responses
        ])
    return results

# Beispiel
texts = ["Tolles Produkt!", "Schlechter Service.", "Es ist okay, denke ich."]
labels = asyncio.run(batch_classify(texts))
print(list(zip(texts, labels)))
```

## Option B: Open-Source-Alternativen (selbst auf Clore.ai hosten)

Wenn Sie vollständig lokale Inferenz ohne API-Kosten möchten, erreichen diese Modelle die "schnell/günstig"-Stufe von Gemini 3.1 Flash Lite:

### Gemma 3 4B (Googles offenes leichtgewichtiges Modell)

```bash
# Läuft auf jeder GPU mit 6 GB+ VRAM — sogar RTX 3060
docker run --gpus all -d \
  -p 11434:11434 \
  -v ollama_data:/root/.ollama \
  ollama/ollama

docker exec -it $(docker ps -q) ollama pull gemma3:4b
docker exec -it $(docker ps -q) ollama run gemma3:4b "Erkläre Quantenverschränkung einfach."
```

### Qwen3.5 7B (schneller, für die Größe höhere Qualität)

```bash
docker exec -it $(docker ps -q) ollama pull qwen3.5:7b
# ~3,8 GB VRAM, ~45 tok/s auf RTX 3080
```

### Geschwindigkeitsvergleich auf Clore.ai-Hardware

| Modell                      | VRAM  | Tokens/Sek. (RTX 4090) | Kosten/1 Mio. Tokens (Clore.ai)                     |
| --------------------------- | ----- | ---------------------- | --------------------------------------------------- |
| Gemini 3.1 Flash Lite (API) | N/A   | \~200 (API)            | \~0,25 $ Eingabe / 1,50 $ Ausgabe pro 1 Mio. Tokens |
| Gemma 3 4B (lokal)          | 4 GB  | 95 tok/s               | \~0,002 $ (bei 2 $/h)                               |
| Qwen3.5 7B (lokal)          | 8 GB  | 78 tok/s               | \~0,005 $ (bei 2 $/h)                               |
| Gemma 3 12B (lokal)         | 12 GB | 55 tok/s               | \~0,008 $ (bei 2 $/h)                               |
| Gemma 3 27B (lokal)         | 20 GB | 32 tok/s               | \~0,014 $ (bei 2 $/h)                               |

> **Fazit:** Für Workloads mit hohem Volumen (>100 Mio. Tokens/Monat) ist das Selbst-Hosting von Gemma 3 / Qwen3.5 auf Clore.ai **35–50× günstiger** als die Gemini-API.

## Auf Clore.ai bereitstellen

### Empfohlene GPU für Workloads der Flash-Lite-Stufe

| Anwendungsfall              | Empfohlene GPU                      | Preis auf Clore.ai |
| --------------------------- | ----------------------------------- | ------------------ |
| API-Proxy / Automatisierung | Keine GPU erforderlich (CPU-Server) | \~0,05 $/h         |
| Lokales 4B-Modell           | RTX 3060 12 GB                      | \~0,25 $/h         |
| Lokales 7B-Modell           | RTX 3080 10 GB                      | \~0,35 $/h         |
| Lokales 27B-Modell          | RTX 4090 24 GB                      | \~1,20 $/h (Spot)  |

### Ein-Klick-Ollama-Start auf Clore.ai

Wählen Sie im Clore.ai-Dashboard **Ollama** aus den Vorlagen:

```bash
# Oder manuell per SSH:
curl -fsSL https://ollama.com/install.sh | sh
ollama serve &
ollama pull gemma3:4b
ollama run gemma3:4b
```

## Anwendungsfälle, die sich am besten für die Flash-Lite-Stufe eignen

1. **RAG-Abrufschicht** — schnelles Kontext-Ranking, nicht die endgültige Generierung
2. **Echtzeit-Chatbot-Antworten** — unter 200 ms für kurze Anfragen
3. **Dokumentklassifizierung** — Tausende von Dokumenten pro Minute verarbeiten
4. **Code-Autovervollständigung** — Vorschlagsgenerierung mit geringer Latenz
5. **Übersetzungspipelines** — Inhalte stapelweise kostengünstig übersetzen
6. **Inhaltsmoderation** — Nutzerinhalte in großem Maßstab klassifizieren

## Kostenrechner

| Monatliches Volumen | Google-API-Kosten | Clore.ai (Gemma 3 4B)             |
| ------------------- | ----------------- | --------------------------------- |
| 10 Mio. Tokens      | \~$8.75           | \~3,60 $ (50 Std./Monat RTX 3060) |
| 100 Mio. Tokens     | \~$7.00           | \~3,60 $ (durchgehend)            |
| 1 Mrd. Tokens       | \~$70.00          | \~26 $ (durchgehend RTX 3060)     |

> Bei Volumen über ca. 200 Mio. Tokens/Monat schlägt das Selbst-Hosting auf Clore.ai die Kosten der Gemini-API.

## API-Nutzung überwachen

```python
# Gemini-API-Nutzung und -Kosten verfolgen
import google.generativeai as genai
import json
from datetime import datetime

genai.configure(api_key="YOUR_API_KEY")

def tracked_generate(prompt: str, log_file: str = "usage.jsonl"):
    model = genai.GenerativeModel("gemini-3.1-flash-lite")
    response = model.generate_content(prompt)
    
    # Nutzung protokollieren
    usage = {
        "timestamp": datetime.utcnow().isoformat(),
        "prompt_tokens": response.usage_metadata.prompt_token_count,
        "output_tokens": response.usage_metadata.candidates_token_count,
        "total_tokens": response.usage_metadata.total_token_count,
        "estimated_cost_usd": response.usage_metadata.total_token_count / 1_000_000 * 0.07
    }
    
    with open(log_file, "a") as f:
        f.write(json.dumps(usage) + "\n")
    
    return response.text

# Verwendung
result = tracked_generate("Was ist die Hauptstadt von Frankreich?")
print(result)
```

## Verwandte Leitfäden

* [Gemma 3 auf Clore.ai](/guides/guides_v2-de/sprachmodelle/gemma3.md) — Googles Open-Source-Modellfamilie
* [Ollama-Leitfaden](/guides/guides_v2-de/sprachmodelle/ollama.md) — jedes LLM lokal mit einem Befehl ausführen
* [RAGFlow](/guides/guides_v2-de/rag-and-vektordatenbanken/ragflow.md) — RAG-Pipeline, die gut mit schnellen Modellen funktioniert
* [vLLM Serving](/guides/guides_v2-de/sprachmodelle/vllm.md) — OpenAI-kompatibler Server mit hohem Durchsatz
* [GPU-Vergleich](/guides/guides_v2-de/erste-schritte/gpu-comparison.md) — die günstigste GPU für Ihre Anforderungen finden

***

*Zuletzt aktualisiert: 16. März 2026 | Gemini 3.1 Flash Lite veröffentlicht: 3. März 2026 | Gewichte: nur API (Google)*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.clore.ai/guides/guides_v2-de/sprachmodelle/gemini-3-1-flash-lite.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
