Skip to main content
Verwende /v1beta/models/{model}:generateContent für Gemini-kompatible Integrationen.
Das Modell im Pfad ist eine öffentliche APIAny.AI-Modell-ID.

Streaming

Rufe :streamGenerateContent statt :generateContent auf, um einen Gemini-Server-Sent-Eventstream mit inkrementellen candidates-Chunks zu empfangen.

Strukturierte Ausgabe

Verwende generationConfig.responseMimeType: "application/json" zusammen mit responseSchema für JSON-Ausgabe:

Parameter

Unterstützte generationConfig: temperature, topP, topK, maxOutputTokens, stopSequences, responseMimeType, responseSchema, responseModalities (füge IMAGE für Bildausgabe hinzu). Außerdem auf oberster Ebene tools (functionDeclarations) und systemInstruction.