API-ja Gemini Interactions u lejon zhvilluesve të ndërtojnë aplikacione gjeneruese të IA-së duke përdorur modelet Gemini. Gemini është modeli ynë më i aftë, i ndërtuar nga themeli për të qenë multimodal. Mund të përgjithësojë dhe të kuptojë, të funksionojë dhe të kombinojë pa probleme lloje të ndryshme informacioni, duke përfshirë gjuhën, imazhet, audion, videon dhe kodin. Ju mund ta përdorni API-në Gemini për raste përdorimi si arsyetimi nëpër tekst dhe imazhe, gjenerimi i përmbajtjes, agjentët e dialogut, sistemet e përmbledhjes dhe klasifikimit dhe më shumë.
Krijimi i një ndërveprimi
Krijon një ndërveprim të ri.
Parametrat e Shtegut / Pyetjes
Cilin version të API-t të përdoret.
Trupi i kërkesës
Trupi i kërkesës përmban të dhëna me strukturën e mëposhtme:
modeli ModelOpsioni (opsional)
Emri i `Modelit` të përdorur për gjenerimin e ndërveprimit.
E detyrueshme nëse `agjent` nuk është dhënë.
Vlerat e mundshme
-
models/gemini-2.5-flash-liteModeli ynë më i vogël dhe më ekonomik, i ndërtuar për përdorim në shkallë të gjerë.
-
models/gemini-2.5-flash-imageModeli ynë i gjenerimit të imazheve vendase, i optimizuar për shpejtësi, fleksibilitet dhe kuptim kontekstual. Futja dhe dalja e tekstit ka të njëjtin çmim si në Flash 2.5.
-
models/gemini-3.1-flash-liteModeli ynë më me kosto efektive, i optimizuar për detyra agjentike me vëllim të lartë, përkthim dhe përpunim të thjeshtë të të dhënave.
-
models/gemini-3.1-flash-imageInteligjencë vizuale e nivelit profesional me efikasitet me shpejtësinë e Flash-it dhe aftësi gjenerimi të bazuara në realitet.
-
models/gemini-3.5-flashModeli ynë më inteligjent për performancë të qëndrueshme në kufijtë e detyrave agjentike dhe të kodimit.
-
models/gemini-3.6-flashModeli ynë më inteligjent për performancë të qëndrueshme në kufijtë e detyrave agjentike dhe të kodimit.
-
models/gemini-3.7-flashModeli ynë më inteligjent për performancë të qëndrueshme në kufijtë e detyrave agjentike dhe të kodimit.
agjenti i agjentit (opsionale)
Emri i `Agjentit` të përdorur për gjenerimin e ndërveprimit.
E detyrueshme nëse `model` nuk është dhënë.
Vlerat e mundshme
-
deep-research-pro-preview-12-2025Agjent i Kërkimeve të Thellë Gemini
-
deep-research-preview-04-2026Agjent i Kërkimeve të Thellë Gemini
-
deep-research-max-preview-04-2026Agjenti Maksimal i Kërkimeve të Thellë Gemini
-
antigravity-preview-05-2026Përdorni agjentin e menaxhuar Antigravity për të kryer detyra me shumë hapa që kërkojnë arsyetim, operacione me skedarë dhe përdorim mjetesh.
Të dhënat hyrëse për bashkëveprimin (të përbashkëta si për Modelin ashtu edhe për Agjentin).
Udhëzime sistemi për bashkëveprimin.
Një listë e deklarimeve të mjeteve që modeli mund të thërrasë gjatë ndërveprimit.
Zbaton që përgjigjja e gjeneruar të jetë një objekt JSON që përputhet me skemën JSON të specifikuar në këtë fushë.
Vetëm të dhëna. Nëse bashkëveprimi do të transmetohet.
Vetëm hyrje. Nëse përgjigja dhe kërkesa do të ruhen për rikthim të mëvonshëm.
Vetëm të dhëna. Nëse do të ekzekutohet bashkëveprimi i modelit në sfond.
generation_config GenerationConfig (opsionale)
Konfigurimi i modelit
Parametrat e konfigurimit për bashkëveprimin e modelit.
Alternativë ndaj `agent_config`. I zbatueshëm vetëm kur është vendosur `model`.
Fushat
Numri maksimal i tokenëve që duhen përfshirë në përgjigje.
Farë e përdorur në dekodim për riprodhueshmëri.
Opsionale. Konfigurim për të folur dhe shumë altoparlantë.
Një listë e sekuencave të karaktereve që do të ndalojnë bashkëveprimin e daljes.
niveli_i_thinkingLevel_i_Thinking (opsionale )
Niveli i tokenëve të mendimit që modeli duhet të gjenerojë.
Vlerat e mundshme
-
minimalPak ose aspak mendim.
-
lowNivel i ulët i të menduarit.
-
mediumNivel i mesëm i të menduarit.
-
highNivel i lartë i të menduarit.
thinking_summaries Përmbledhje të të Menduarit (opsionale)
Nëse do të përfshihen përmbledhje të mendimeve në përgjigje.
Vlerat e mundshme
-
autoPërmbledhje të të menduarit automatik.
-
nonePa përmbledhje të të menduarit.
Konfigurimi i zgjedhjes së mjetit.
Vlerat e mundshme:
-
autoZgjedhja e mjetit automatik.
-
anyÇdo zgjedhje mjeti.
-
nonePa zgjedhje mjetesh.
-
validatedZgjedhje e mjetit të validuar.
agent_config DynamicAgentConfig (opsionale)
Konfigurimi i Agjentit
Konfigurimi për agjentin.
Alternativë ndaj `generation_config`. I zbatueshëm vetëm kur është vendosur `agent`.
Fushat
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "dynamic" .
Etiketat me meta të dhëna të përcaktuara nga përdoruesi për kërkesën.
Totali maksimal i tokenëve për ekzekutimin e agjentit.
ID-ja e ndërveprimit të mëparshëm, nëse ka.
Cilësimet e sigurisë për bashkëveprimin.
Përgjigje
Kthen një burim Ndërveprimi .
Kërkesë e thjeshtë
Shembull Përgjigjeje
{ "created": "2025-11-26T12:25:15Z", "id": "v1_ChdPU0F4YWFtNkFwS2kxZThQZ05lbXdROBIXT1NBeGFhbTZBcEtpMWU4UGdOZW13UTg", "model": "gemini-3.6-flash", "object": "interaction", "status": "completed", "steps": [ { "type": "model_output", "content": [ { "type": "text", "text": "Hello! I'm functioning perfectly and ready to assist you.\n\nHow are you doing today?" } ] } ], "updated": "2025-11-26T12:25:15Z", "usage": { "input_tokens_by_modality": [ { "modality": "text", "tokens": 7 } ], "total_cached_tokens": 0, "total_input_tokens": 7, "total_output_tokens": 20, "total_thought_tokens": 22, "total_tokens": 49, "total_tool_use_tokens": 0 } }
Shumëkthesë
Shembull Përgjigjeje
{ "created": "2025-11-26T12:22:47Z", "id": "v1_ChdPU0F4YWFtNkFwS2kxZThQZ05lbXdROBIXT1NBeGFhbTZBcEtpMWU4UGdOZW13UTg", "model": "gemini-3.6-flash", "object": "interaction", "status": "completed", "steps": [ { "type": "model_output", "content": [ { "type": "text", "text": "The capital of France is Paris." } ] } ], "updated": "2025-11-26T12:22:47Z", "usage": { "input_tokens_by_modality": [ { "modality": "text", "tokens": 50 } ], "total_cached_tokens": 0, "total_input_tokens": 50, "total_output_tokens": 10, "total_thought_tokens": 0, "total_tokens": 60, "total_tool_use_tokens": 0 } }
Futja e imazhit
Shembull Përgjigjeje
{ "created": "2025-11-26T12:22:47Z", "id": "v1_ChdPU0F4YWFtNkFwS2kxZThQZ05lbXdROBIXT1NBeGFhbTZBcEtpMWU4UGdOZW13UTg", "model": "gemini-3.6-flash", "object": "interaction", "status": "completed", "steps": [ { "type": "model_output", "content": [ { "type": "text", "text": "A white humanoid robot with glowing blue eyes stands holding a red skateboard." } ] } ], "updated": "2025-11-26T12:22:47Z", "usage": { "input_tokens_by_modality": [ { "modality": "text", "tokens": 10 }, { "modality": "image", "tokens": 258 } ], "total_cached_tokens": 0, "total_input_tokens": 268, "total_output_tokens": 20, "total_thought_tokens": 0, "total_tokens": 288, "total_tool_use_tokens": 0 } }
Thirrja e funksionit
Shembull Përgjigjeje
{ "created": "2025-11-26T12:22:47Z", "id": "v1_ChdPU0F4YWFtNkFwS2kxZThQZ05lbXdROBIXT1NBeGFhbTZBcEtpMWU4UGdOZW13UTg", "model": "gemini-3.6-flash", "object": "interaction", "status": "requires_action", "steps": [ { "name": "get_weather", "type": "function_call", "arguments": { "location": "Boston, MA" }, "id": "gth23981" } ], "updated": "2025-11-26T12:22:47Z", "usage": { "input_tokens_by_modality": [ { "modality": "text", "tokens": 100 } ], "total_cached_tokens": 0, "total_input_tokens": 100, "total_output_tokens": 25, "total_thought_tokens": 0, "total_tokens": 125, "total_tool_use_tokens": 50 } }
Anulimi i një ndërveprimi
Anulon një bashkëveprim me anë të ID-së. Kjo vlen vetëm për bashkëveprimet në sfond që janë ende në ekzekutim.
Parametrat e Shtegut / Pyetjes
Cilin version të API-t të përdoret.
Identifikuesi unik i ndërveprimit që do të anulohet.
Përgjigje
Kthen një burim Ndërveprimi .
Anulo Ndërveprimin
Shembull Përgjigjeje
{ "created": "2025-11-26T12:25:15Z", "id": "v1_ChdPU0F4YWFtNkFwS2kxZThQZ05lbXdROBIXT1NBeGFhbTZBcEtpMWU4UGdOZW13UTg", "model": "gemini-3.6-flash", "object": "interaction", "status": "cancelled", "updated": "2025-11-26T12:25:15Z" }
Duke marrë një ndërveprim
Merr detajet e plota të një bashkëveprimi të vetëm bazuar në `Interaction.id`-in e tij.
Parametrat e Shtegut / Pyetjes
Cilin version të API-t të përdoret.
Identifikuesi unik i ndërveprimit që do të rikuperohet.
Opsionale. Nëse vendoset, rifillon rrjedhën e ndërveprimit nga pjesa tjetër pas ngjarjes së shënuar nga ID-ja e ngjarjes. Mund të përdoret vetëm nëse `rrjedha` është e vërtetë.
Nëse vendoset në "e vërtetë", përmbajtja e gjeneruar do të transmetohet në mënyrë graduale.
Parazgjedhja është: False
Përgjigje
Kthen një burim Ndërveprimi .
Merr Ndërveprimin
Shembull Përgjigjeje
{ "created": "2025-11-26T12:25:15Z", "id": "v1_ChdPU0F4YWFtNkFwS2kxZThQZ05lbXdROBIXT1NBeGFhbTZBcEtpMWU4UGdOZW13UTg", "model": "gemini-3.6-flash", "object": "interaction", "status": "completed", "steps": [ { "type": "model_output", "content": [ { "type": "text", "text": "I'm doing great, thank you for asking! How can I help you today?" } ] } ], "updated": "2025-11-26T12:25:15Z" }
Fshirja e një ndërveprimi
Fshin ndërveprimin me anë të ID-së.
Parametrat e Shtegut / Pyetjes
Cilin version të API-t të përdoret.
Identifikuesi unik i ndërveprimit që do të fshihet.
Përgjigje
Nëse ka sukses, përgjigja është bosh.
Fshij
Burimet
Ndërveprimi
Burimi i Ndërveprimit.
Fushat
agjenti i agjentit (opsionale)
Emri i `Agjentit` të përdorur për gjenerimin e ndërveprimit.
Vlerat e mundshme
-
deep-research-pro-preview-12-2025Agjent i Kërkimeve të Thellë Gemini
-
deep-research-preview-04-2026Agjent i Kërkimeve të Thellë Gemini
-
deep-research-max-preview-04-2026Agjenti Maksimal i Kërkimeve të Thellë Gemini
-
antigravity-preview-05-2026Përdorni agjentin e menaxhuar Antigravity për të kryer detyra me shumë hapa që kërkojnë arsyetim, operacione me skedarë dhe përdorim mjetesh.
agent_config DynamicAgentConfig (opsionale)
Parametrat e konfigurimit për bashkëveprimin e agjentit.
Fushat
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "dynamic" .
Vetëm rezultati. Ora në të cilën u krijua përgjigja në formatin ISO 8601 (YYYY-MM-DDThh:mm:ssZ).
varg gabimesh (Gabim) (opsional)
Vetëm rezultate. Gabime diagnostikuese / gabime të platformës të regjistruara në bashkëveprim.
Fushat
Një URI që identifikon llojin e gabimit.
Një mesazh gabimi i lexueshëm nga njeriu.
E detyrueshme. Vetëm rezultat. Një identifikues unik për përfundimin e ndërveprimit.
Parazgjedhur në:
Të dhënat hyrëse për bashkëveprimin.
Etiketat me meta të dhëna të përcaktuara nga përdoruesi për kërkesën.
Totali maksimal i tokenëve për ekzekutimin e agjentit.
modeli ModelOpsioni (opsional)
Emri i `Modelit` të përdorur për gjenerimin e ndërveprimit.
Vlerat e mundshme
-
models/gemini-2.5-flash-liteModeli ynë më i vogël dhe më ekonomik, i ndërtuar për përdorim në shkallë të gjerë.
-
models/gemini-2.5-flash-imageModeli ynë i gjenerimit të imazheve vendase, i optimizuar për shpejtësi, fleksibilitet dhe kuptim kontekstual. Futja dhe dalja e tekstit ka të njëjtin çmim si në Flash 2.5.
-
models/gemini-3.1-flash-liteModeli ynë më me kosto efektive, i optimizuar për detyra agjentike me vëllim të lartë, përkthim dhe përpunim të thjeshtë të të dhënave.
-
models/gemini-3.1-flash-imageInteligjencë vizuale e nivelit profesional me efikasitet me shpejtësinë e Flash-it dhe aftësi gjenerimi të bazuara në realitet.
-
models/gemini-3.5-flashModeli ynë më inteligjent për performancë të qëndrueshme në kufijtë e detyrave agjentike dhe të kodimit.
-
models/gemini-3.6-flashModeli ynë më inteligjent për performancë të qëndrueshme në kufijtë e detyrave agjentike dhe të kodimit.
-
models/gemini-3.7-flashModeli ynë më inteligjent për performancë të qëndrueshme në kufijtë e detyrave agjentike dhe të kodimit.
output_audio AudioContent (opsionale)
Audioja e fundit e gjeneruar nga modeli në përgjigje të kërkesës aktuale. Shënim: kjo është shtuar nga SDK.
Fushat
Numri i kanaleve audio.
Përmbajtja audio.
Lloji i mimikës i audios.
Vlerat e mundshme:
-
audio/wavFormati audio WAV
-
audio/mp3Formati audio MP3
-
audio/aiffFormati audio AIFF
-
audio/aacFormati audio AAC
-
audio/oggFormati audio OGG
-
audio/flacFormati audio FLAC
-
audio/mpegFormati audio MPEG
-
audio/m4aFormati audio M4A
-
audio/l16Formati audio L16
-
audio/opusFormati audio OPUS
-
audio/alawFormati audio ALAW
-
audio/mulawFormati audio MULAW
Shpejtësia e mostrës së audios.
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "audio" .
URI-ja e audios.
Imazhi i fundit i gjeneruar nga modeli në përgjigje të kërkesës aktuale. Shënim: kjo është shtuar nga SDK.
Tekst i bashkuar nga rezultati i fundit i modelit në përgjigje të kërkesës aktuale. Shënim: kjo është shtuar nga SDK.
ID-ja e ndërveprimit të mëparshëm, nëse ka.
Zbaton që përgjigjja e gjeneruar të jetë një objekt JSON që përputhet me skemën JSON të specifikuar në këtë fushë.
Cilësimet e sigurisë për bashkëveprimin.
E detyrueshme. Vetëm rezultat. Statusi i ndërveprimit.
Vlerat e mundshme:
-
in_progressNdërveprimi është në zhvillim e sipër.
-
requires_actionNdërveprimi kërkon veprim/input nga përdoruesi.
-
completedNdërveprimi është përfunduar.
-
failedNdërveprimi dështoi.
-
cancelledNdërveprimi u anulua.
-
incompleteNdërveprimi është përfunduar, por përmban rezultate të paplota (p.sh., duke shtypur max_tokens).
Vetëm rezultati. Hapat që përbëjnë bashkëveprimin, kur përfshihen në përgjigje.
Udhëzime sistemi për bashkëveprimin.
Një listë e deklarimeve të mjeteve që modeli mund të thërrasë gjatë ndërveprimit.
Vetëm rezultati. Ora në të cilën përgjigja është përditësuar për herë të fundit në formatin ISO 8601 (YYYY-MM-DDThh:mm:ssZ).
Përdorimi Përdorimi (opsional)
Vetëm rezultate. Statistikat mbi përdorimin e tokenit të kërkesës së ndërveprimit.
Fushat
cached_tokens_by_modality matricë (ModalityTokens) (opsionale)
Një ndarje e përdorimit të tokenëve të ruajtur në memorje sipas modalitetit.
Fushat
modaliteti ResponseModality (opsionale)
Modaliteti i lidhur me numërimin e tokenëve.
Vlerat e mundshme
-
textTregon se modeli duhet të kthejë tekst.
-
imageTregon se modeli duhet të kthejë imazhe.
-
audioTregon se modeli duhet të kthejë audio.
-
videoTregon se modeli duhet të kthejë videon.
-
documentTregon se modeli duhet të kthejë dokumente.
Numri i tokenëve për modalitetin.
vargu grounding_tool_count (GroundingToolCount) (opsionale)
Numri i mjeteve të tokëzimit.
Fushat
Numri i mjeteve të tokëzimit numërohet.
Lloji i mjetit të tokëzimit i lidhur me numërimin.
Vlerat e mundshme:
-
google_searchBazë me Kërkimin në Ueb të Google dhe Kërkimin e Imazheve, dhe Bazë në Ueb për Ndërmarrjet.
-
google_mapsTokëzimi me Google Maps.
vargu input_tokens_by_modality (ModalityTokens) (opsionale)
Një ndarje e përdorimit të tokenit të hyrjes sipas modalitetit.
Fushat
modaliteti ResponseModality (opsionale)
Modaliteti i lidhur me numërimin e tokenëve.
Vlerat e mundshme
-
textTregon se modeli duhet të kthejë tekst.
-
imageTregon se modeli duhet të kthejë imazhe.
-
audioTregon se modeli duhet të kthejë audio.
-
videoTregon se modeli duhet të kthejë videon.
-
documentTregon se modeli duhet të kthejë dokumente.
Numri i tokenëve për modalitetin.
vargu output_tokens_by_modality (ModalityTokens) (opsionale)
Një ndarje e përdorimit të tokenit të daljes sipas modalitetit.
Fushat
modaliteti ResponseModality (opsionale)
Modaliteti i lidhur me numërimin e tokenëve.
Vlerat e mundshme
-
textTregon se modeli duhet të kthejë tekst.
-
imageTregon se modeli duhet të kthejë imazhe.
-
audioTregon se modeli duhet të kthejë audio.
-
videoTregon se modeli duhet të kthejë videon.
-
documentTregon se modeli duhet të kthejë dokumente.
Numri i tokenëve për modalitetin.
vargu tool_use_tokens_by_modality (ModalityTokens) (opsionale)
Një ndarje e përdorimit të tokenëve të përdorimit të mjeteve sipas modalitetit.
Fushat
modaliteti ResponseModality (opsionale)
Modaliteti i lidhur me numërimin e tokenëve.
Vlerat e mundshme
-
textTregon se modeli duhet të kthejë tekst.
-
imageTregon se modeli duhet të kthejë imazhe.
-
audioTregon se modeli duhet të kthejë audio.
-
videoTregon se modeli duhet të kthejë videon.
-
documentTregon se modeli duhet të kthejë dokumente.
Numri i tokenëve për modalitetin.
Numri i tokenëve në pjesën e ruajtur në memorien e përkohshme të kërkesës (përmbajtja e ruajtur në memorien e përkohshme).
Numri i tokenëve në kërkesë (konteksti).
Numri total i tokenëve në të gjitha përgjigjet e gjeneruara.
Numri i tokenëve të mendimeve për modelet e të menduarit.
Numri total i tokenëve për kërkesën e ndërveprimit (kërkesa + përgjigjet + tokenët e tjerë të brendshëm).
Numri i tokenëve të pranishëm në kërkesën/kërkesat e përdorimit të mjetit.
Shembuj
Shembull
{ "created": "2025-12-04T15:01:45Z", "id": "v1_ChdXS0l4YWZXTk9xbk0xZThQczhEcmlROBIXV0tJeGFmV05PcW5NMWU4UHM4RHJpUTg", "model": "gemini-3.6-flash", "object": "interaction", "status": "completed", "steps": [ { "type": "model_output", "content": [ { "type": "text", "text": "Hello! I'm doing well, functioning as expected. Thank you for asking! How are you doing today?" } ] } ], "updated": "2025-12-04T15:01:45Z", "usage": { "input_tokens_by_modality": [ { "modality": "text", "tokens": 7 } ], "total_cached_tokens": 0, "total_input_tokens": 7, "total_output_tokens": 23, "total_thought_tokens": 49, "total_tokens": 79, "total_tool_use_tokens": 0 } }
Modelet e të dhënave
Përmbajtja
Përmbajtja e përgjigjes.
Llojet e mundshme
Përmbajtje Audio
Një bllok përmbajtjeje audio.
Numri i kanaleve audio.
Përmbajtja audio.
Lloji i mimikës i audios.
Vlerat e mundshme:
-
audio/wavFormati audio WAV
-
audio/mp3Formati audio MP3
-
audio/aiffFormati audio AIFF
-
audio/aacFormati audio AAC
-
audio/oggFormati audio OGG
-
audio/flacFormati audio FLAC
-
audio/mpegFormati audio MPEG
-
audio/m4aFormati audio M4A
-
audio/l16Formati audio L16
-
audio/opusFormati audio OPUS
-
audio/alawFormati audio ALAW
-
audio/mulawFormati audio MULAW
Shpejtësia e mostrës së audios.
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "audio" .
URI-ja e audios.
Përmbajtja e Dokumentit
Një bllok përmbajtjeje dokumenti.
Përmbajtja e dokumentit.
Lloji mime i dokumentit.
Vlerat e mundshme:
-
application/pdfFormati i dokumentit PDF
-
text/csvFormati i dokumentit CSV
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "document" .
URI-ja e dokumentit.
Përmbajtje Imazhesh
Një bllok përmbajtjeje imazhi.
Përmbajtja e imazhit.
Lloji i mimikës së imazhit.
Vlerat e mundshme:
-
image/pngFormati i imazhit PNG
-
image/jpegFormati i imazhit JPEG
-
image/webpFormati i imazhit WebP
-
image/heicFormati i imazhit HEIC
-
image/heifFormati i imazhit HEIF
-
image/gifFormati i imazhit GIF
-
image/bmpFormati i imazhit BMP
-
image/tiffFormati i imazhit TIFF
rezolucioni i MediaResolution (opsional)
Zgjidhja e mediave.
Vlerat e mundshme
-
lowRezolucion i ulët.
-
mediumRezolucion i mesëm.
-
highRezolucion i lartë.
-
ultra_highRezolucion ultra i lartë.
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "image" .
URI-ja e imazhit.
Përmbajtje Teksti
Një bllok përmbajtjeje teksti.
vargu i shënimeve (Shënim) (opsional)
Informacion mbi citimin për përmbajtjen e gjeneruar nga modeli.
Llojet e mundshme
FileCitation
Një shënim citimi i skedarit.
Përdoruesi dha meta të dhëna rreth kontekstit të marrë.
URI-ja e skedarit.
Fundi i segmentit të atribuuar, ekskluziv.
Emri i skedarit.
ID e medias në rast të citimeve të imazheve, nëse ka.
Numri i faqes së dokumentit të cituar, nëse ka.
Burimi i atribuuar për një pjesë të tekstit.
Fillimi i segmentit të përgjigjes që i atribuohet këtij burimi. Indeksi tregon fillimin e segmentit, i matur në bajt.
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "file_citation" .
Citimi i Vendit
Një shënim citimi vendi.
Fundi i segmentit të atribuuar, ekskluziv.
Titulli i vendit.
ID-ja e vendit, në formatin `places/{place_id}`.
vargu review_snippets (ReviewSnippet) (opsionale)
Fragmente të vlerësimeve që përdoren për të gjeneruar përgjigje rreth karakteristikave të një vendi të caktuar në Google Maps.
Fushat
ID-ja e fragmentit të rishikimit.
Titulli i rishikimit.
Një lidhje që korrespondon me vlerësimin e përdoruesit në Google Maps.
Fillimi i segmentit të përgjigjes që i atribuohet këtij burimi. Indeksi tregon fillimin e segmentit, i matur në bajt.
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "place_citation" .
Referenca URI e vendit.
Citimi i Url-it
Një shënim citimi URL-je.
Fundi i segmentit të atribuuar, ekskluziv.
Fillimi i segmentit të përgjigjes që i atribuohet këtij burimi. Indeksi tregon fillimin e segmentit, i matur në bajt.
Titulli i URL-së.
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "url_citation" .
URL-ja.
E detyrueshme. Përmbajtja e tekstit.
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "text" .
Shembuj
Audio
{ "type": "audio", "data": "BASE64_ENCODED_AUDIO", "mime_type": "audio/wav" }
Dokument
{ "type": "document", "data": "BASE64_ENCODED_DOCUMENT", "mime_type": "application/pdf" }
Imazh
{ "type": "image", "data": "BASE64_ENCODED_IMAGE", "mime_type": "image/png" }
Tekst
{ "type": "text", "text": "Hello, how are you?" }
Mjet
Një mjet që mund të përdoret nga modeli.
Llojet e mundshme
Ekzekutimi i Kodit
Një mjet që mund të përdoret nga modeli për të ekzekutuar kodin.
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "code_execution" .
Kërkimi i skedarëve
Një mjet që mund të përdoret nga modeli për të kërkuar skedarë.
Kërkimi i skedarëve ruan emrat që duhen kërkuar.
Filtri i meta të dhënave për t'u aplikuar në dokumentet dhe pjesët e rikthimit semantik.
Numri i pjesëve të rikthimit semantik që duhen rikuperuar.
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "file_search" .
Funksioni
Një mjet që mund të përdoret nga modeli.
Një përshkrim i funksionit.
Emri i funksionit.
Skema JSON për parametrat e funksionit.
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "function" .
GoogleMaps
Një mjet që mund të përdoret nga modeli për të thirrur Google Maps.
Nëse duhet të kthehet një shenjë konteksti e widget-it në rezultatin e thirrjes së mjetit të përgjigjes.
Gjerësia gjeografike e vendndodhjes së përdoruesit.
Gjatësia gjeografike e vendndodhjes së përdoruesit.
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "google_maps" .
Kërkimi në Google
Një mjet që mund të përdoret nga modeli për të kërkuar në Google.
Llojet e tokëzimit të kërkimit që duhen aktivizuar.
Vlerat e mundshme:
-
web_searchVendosja e kësaj fushe aktivizon kërkimin në internet. Kthehen vetëm rezultatet me tekst.
-
image_searchVendosja e kësaj fushe aktivizon kërkimin e imazheve. Kthehen bajtet e imazheve.
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "google_search" .
Konteksti i Url-it
Një mjet që mund të përdoret nga modeli për të marrë kontekstin e URL-së.
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "url_context" .
Shembuj
Ekzekutimi i Kodit
Kërkimi i skedarëve
Funksioni
GoogleMaps
Kërkimi në Google
Konteksti i Url-it
Ngjarje NdërveprimiSse
Llojet e mundshme
Diskriminuesi polimorfik: event_type
Ngjarje Gabimi
gabim Gabim (opsional)
Nuk është dhënë përshkrim.
Fushat
Një URI që identifikon llojin e gabimit.
Një mesazh gabimi i lexueshëm nga njeriu.
Shenja event_id që do të përdoret për të rifilluar rrjedhën e ndërveprimit, nga kjo ngjarje.
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "error" .
Ngjarje e Përfunduar Ndërveprimi
Shenja event_id që do të përdoret për të rifilluar rrjedhën e ndërveprimit, nga kjo ngjarje.
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "interaction.completed" .
ndërveprim NdërveprimNgjarjeNdërveprim (i detyrueshëm)
Burim ndërveprimi i përfunduar pjesërisht i emetuar në fund të rrjedhës.
Fushat
Agjenti me të cilin duhet të ndërveprohet.
Vetëm rezultati. Koha në të cilën u krijua përgjigja në formatin ISO 8601.
E detyrueshme. Vetëm rezultat. Një identifikues unik për përfundimin e ndërveprimit.
Modeli që do të plotësojë kërkesën tuaj.
Vetëm rezultati. Lloji i burimit.
E detyrueshme. Vetëm rezultat. Statusi i ndërveprimit.
Vlerat e mundshme:
-
in_progressNdërveprimi është në zhvillim e sipër.
-
requires_actionNdërveprimi kërkon veprim/input nga përdoruesi.
-
completedNdërveprimi është përfunduar.
-
failedNdërveprimi dështoi.
-
cancelledNdërveprimi u anulua.
-
incompleteNdërveprimi është përfunduar, por përmban rezultate të paplota (p.sh., duke shtypur max_tokens).
Vetëm rezultati. Hapat që përbëjnë ndërveprimin, nëse përfshihen në këtë ngjarje.
Vetëm rezultati. Ora në të cilën përgjigja është përditësuar për herë të fundit në formatin ISO 8601.
Përdorimi Përdorimi (opsional)
Vetëm rezultate. Statistikat mbi përdorimin e tokenit të kërkesës së ndërveprimit.
Fushat
cached_tokens_by_modality matricë (ModalityTokens) (opsionale)
Një ndarje e përdorimit të tokenëve të ruajtur në memorje sipas modalitetit.
Fushat
modaliteti ResponseModality (opsionale)
Modaliteti i lidhur me numërimin e tokenëve.
Vlerat e mundshme
-
textTregon se modeli duhet të kthejë tekst.
-
imageTregon se modeli duhet të kthejë imazhe.
-
audioTregon se modeli duhet të kthejë audio.
-
videoTregon se modeli duhet të kthejë videon.
-
documentTregon se modeli duhet të kthejë dokumente.
Numri i tokenëve për modalitetin.
vargu grounding_tool_count (GroundingToolCount) (opsionale)
Numri i mjeteve të tokëzimit.
Fushat
Numri i mjeteve të tokëzimit numërohet.
Lloji i mjetit të tokëzimit i lidhur me numërimin.
Vlerat e mundshme:
-
google_searchBazë me Kërkimin në Ueb të Google dhe Kërkimin e Imazheve, dhe Bazë në Ueb për Ndërmarrjet.
-
google_mapsTokëzimi me Google Maps.
vargu input_tokens_by_modality (ModalityTokens) (opsionale)
Një ndarje e përdorimit të tokenit të hyrjes sipas modalitetit.
Fushat
modaliteti ResponseModality (opsionale)
Modaliteti i lidhur me numërimin e tokenëve.
Vlerat e mundshme
-
textTregon se modeli duhet të kthejë tekst.
-
imageTregon se modeli duhet të kthejë imazhe.
-
audioTregon se modeli duhet të kthejë audio.
-
videoTregon se modeli duhet të kthejë videon.
-
documentTregon se modeli duhet të kthejë dokumente.
Numri i tokenëve për modalitetin.
vargu output_tokens_by_modality (ModalityTokens) (opsionale)
Një ndarje e përdorimit të tokenit të daljes sipas modalitetit.
Fushat
modaliteti ResponseModality (opsionale)
Modaliteti i lidhur me numërimin e tokenëve.
Vlerat e mundshme
-
textTregon se modeli duhet të kthejë tekst.
-
imageTregon se modeli duhet të kthejë imazhe.
-
audioTregon se modeli duhet të kthejë audio.
-
videoTregon se modeli duhet të kthejë videon.
-
documentTregon se modeli duhet të kthejë dokumente.
Numri i tokenëve për modalitetin.
vargu tool_use_tokens_by_modality (ModalityTokens) (opsionale)
Një ndarje e përdorimit të tokenëve të përdorimit të mjeteve sipas modalitetit.
Fushat
modaliteti ResponseModality (opsionale)
Modaliteti i lidhur me numërimin e tokenëve.
Vlerat e mundshme
-
textTregon se modeli duhet të kthejë tekst.
-
imageTregon se modeli duhet të kthejë imazhe.
-
audioTregon se modeli duhet të kthejë audio.
-
videoTregon se modeli duhet të kthejë videon.
-
documentTregon se modeli duhet të kthejë dokumente.
Numri i tokenëve për modalitetin.
Numri i tokenëve në pjesën e ruajtur në memorien e përkohshme të kërkesës (përmbajtja e ruajtur në memorien e përkohshme).
Numri i tokenëve në kërkesë (konteksti).
Numri total i tokenëve në të gjitha përgjigjet e gjeneruara.
Numri i tokenëve të mendimeve për modelet e të menduarit.
Numri total i tokenëve për kërkesën e ndërveprimit (kërkesa + përgjigjet + tokenët e tjerë të brendshëm).
Numri i tokenëve të pranishëm në kërkesën/kërkesat e përdorimit të mjetit.
Ngjarje e Krijuar nga Ndërveprimi
Shenja event_id që do të përdoret për të rifilluar rrjedhën e ndërveprimit, nga kjo ngjarje.
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "interaction.created" .
ndërveprim NdërveprimNgjarjeNdërveprim (i detyrueshëm)
Burim i pjesshëm ndërveprimi i emetuar kur krijohet rrjedha.
Fushat
Agjenti me të cilin duhet të ndërveprohet.
Vetëm rezultati. Koha në të cilën u krijua përgjigja në formatin ISO 8601.
E detyrueshme. Vetëm rezultat. Një identifikues unik për përfundimin e ndërveprimit.
Modeli që do të plotësojë kërkesën tuaj.
Vetëm rezultati. Lloji i burimit.
E detyrueshme. Vetëm rezultat. Statusi i ndërveprimit.
Vlerat e mundshme:
-
in_progressNdërveprimi është në zhvillim e sipër.
-
requires_actionNdërveprimi kërkon veprim/input nga përdoruesi.
-
completedNdërveprimi është përfunduar.
-
failedNdërveprimi dështoi.
-
cancelledNdërveprimi u anulua.
-
incompleteNdërveprimi është përfunduar, por përmban rezultate të paplota (p.sh., duke shtypur max_tokens).
Vetëm rezultati. Hapat që përbëjnë ndërveprimin, nëse përfshihen në këtë ngjarje.
Vetëm rezultati. Ora në të cilën përgjigja është përditësuar për herë të fundit në formatin ISO 8601.
Përdorimi Përdorimi (opsional)
Vetëm rezultate. Statistikat mbi përdorimin e tokenit të kërkesës së ndërveprimit.
Fushat
cached_tokens_by_modality matricë (ModalityTokens) (opsionale)
Një ndarje e përdorimit të tokenëve të ruajtur në memorje sipas modalitetit.
Fushat
modaliteti ResponseModality (opsionale)
Modaliteti i lidhur me numërimin e tokenëve.
Vlerat e mundshme
-
textTregon se modeli duhet të kthejë tekst.
-
imageTregon se modeli duhet të kthejë imazhe.
-
audioTregon se modeli duhet të kthejë audio.
-
videoTregon se modeli duhet të kthejë videon.
-
documentTregon se modeli duhet të kthejë dokumente.
Numri i tokenëve për modalitetin.
vargu grounding_tool_count (GroundingToolCount) (opsionale)
Numri i mjeteve të tokëzimit.
Fushat
Numri i mjeteve të tokëzimit numërohet.
Lloji i mjetit të tokëzimit i lidhur me numërimin.
Vlerat e mundshme:
-
google_searchBazë me Kërkimin në Ueb të Google dhe Kërkimin e Imazheve, dhe Bazë në Ueb për Ndërmarrjet.
-
google_mapsTokëzimi me Google Maps.
vargu input_tokens_by_modality (ModalityTokens) (opsionale)
Një ndarje e përdorimit të tokenit të hyrjes sipas modalitetit.
Fushat
modaliteti ResponseModality (opsionale)
Modaliteti i lidhur me numërimin e tokenëve.
Vlerat e mundshme
-
textTregon se modeli duhet të kthejë tekst.
-
imageTregon se modeli duhet të kthejë imazhe.
-
audioTregon se modeli duhet të kthejë audio.
-
videoTregon se modeli duhet të kthejë videon.
-
documentTregon se modeli duhet të kthejë dokumente.
Numri i tokenëve për modalitetin.
vargu output_tokens_by_modality (ModalityTokens) (opsionale)
Një ndarje e përdorimit të tokenit të daljes sipas modalitetit.
Fushat
modaliteti ResponseModality (opsionale)
Modaliteti i lidhur me numërimin e tokenëve.
Vlerat e mundshme
-
textTregon se modeli duhet të kthejë tekst.
-
imageTregon se modeli duhet të kthejë imazhe.
-
audioTregon se modeli duhet të kthejë audio.
-
videoTregon se modeli duhet të kthejë videon.
-
documentTregon se modeli duhet të kthejë dokumente.
Numri i tokenëve për modalitetin.
vargu tool_use_tokens_by_modality (ModalityTokens) (opsionale)
Një ndarje e përdorimit të tokenëve të përdorimit të mjeteve sipas modalitetit.
Fushat
modaliteti ResponseModality (opsionale)
Modaliteti i lidhur me numërimin e tokenëve.
Vlerat e mundshme
-
textTregon se modeli duhet të kthejë tekst.
-
imageTregon se modeli duhet të kthejë imazhe.
-
audioTregon se modeli duhet të kthejë audio.
-
videoTregon se modeli duhet të kthejë videon.
-
documentTregon se modeli duhet të kthejë dokumente.
Numri i tokenëve për modalitetin.
Numri i tokenëve në pjesën e ruajtur në memorien e përkohshme të kërkesës (përmbajtja e ruajtur në memorien e përkohshme).
Numri i tokenëve në kërkesë (konteksti).
Numri total i tokenëve në të gjitha përgjigjet e gjeneruara.
Numri i tokenëve të mendimeve për modelet e të menduarit.
Numri total i tokenëve për kërkesën e ndërveprimit (kërkesa + përgjigjet + tokenët e tjerë të brendshëm).
Numri i tokenëve të pranishëm në kërkesën/kërkesat e përdorimit të mjetit.
Përditësimi i Statusit të Ndërveprimit
Shenja event_id që do të përdoret për të rifilluar rrjedhën e ndërveprimit, nga kjo ngjarje.
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "interaction.status_update" .
Nuk është dhënë përshkrim.
Nuk është dhënë përshkrim.
Vlerat e mundshme:
-
in_progressNdërveprimi është në zhvillim e sipër.
-
requires_actionNdërveprimi kërkon veprim/input nga përdoruesi.
-
completedNdërveprimi është përfunduar.
-
failedNdërveprimi dështoi.
-
cancelledNdërveprimi u anulua.
-
incompleteNdërveprimi është përfunduar, por përmban rezultate të paplota (p.sh., duke shtypur max_tokens).
StepDelta
delta StepDeltaData (e detyrueshme)
Nuk është dhënë përshkrim.
Llojet e mundshme
ArgumentetDelta
Nuk është dhënë përshkrim.
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "arguments_delta" .
AudioDelta
Numri i kanaleve audio.
Nuk është dhënë përshkrim.
Nuk është dhënë përshkrim.
Vlerat e mundshme:
-
audio/wavFormati audio WAV
-
audio/mp3Formati audio MP3
-
audio/aiffFormati audio AIFF
-
audio/aacFormati audio AAC
-
audio/oggFormati audio OGG
-
audio/flacFormati audio FLAC
-
audio/mpegFormati audio MPEG
-
audio/m4aFormati audio M4A
-
audio/l16Formati audio L16
-
audio/opusFormati audio OPUS
-
audio/alawFormati audio ALAW
-
audio/mulawFormati audio MULAW
Shpejtësia e mostrës së audios.
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "audio" .
Nuk është dhënë përshkrim.
CodeExecutionCallDelta
argumentet CodeExecutionCallArguments (e detyrueshme)
Nuk është dhënë përshkrim.
Fushat
Kodi që do të ekzekutohet.
Gjuha e programimit të `kodit`.
Vlerat e mundshme:
-
pythonPython >= 3.10, me numpy dhe simpy të disponueshëm.
Një hash nënshkrimi për validimin e backend-it.
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "code_execution_call" .
CodeExecutionResultDelta
Nuk është dhënë përshkrim.
Nuk është dhënë përshkrim.
Një hash nënshkrimi për validimin e backend-it.
Nuk është dhënë përshkrim.
Gjithmonë i vendosur në "code_execution_result" .
DocumentDelta
Nuk është dhënë përshkrim.
Nuk është dhënë përshkrim.
Vlerat e mundshme:
-
application/pdfFormati i dokumentit PDF
-
text/csvFormati i dokumentit CSV
Nuk është dhënë përshkrim.
Always set to "document" .
No description provided.
FileSearchCallDelta
A signature hash for backend validation.
No description provided.
Always set to "file_search_call" .
FileSearchResultDelta
result array (FileSearchResult) (required)
No description provided.
A signature hash for backend validation.
No description provided.
Always set to "file_search_result" .
FunctionResultDelta
Required. ID to match the ID from the function call block.
No description provided.
No description provided.
No description provided.
No description provided.
Always set to "function_result" .
GoogleMapsCallDelta
arguments GoogleMapsCallArguments (optional)
The arguments to pass to the Google Maps tool.
Fushat
The queries to be executed.
A signature hash for backend validation.
No description provided.
Always set to "google_maps_call" .
GoogleMapsResultDelta
result array (GoogleMapsResult) (optional)
The results of the Google Maps.
Fushat
places array (Places) (optional)
The places that were found.
Fushat
Title of the place.
The ID of the place, in `places/{place_id}` format.
review_snippets array (ReviewSnippet) (optional)
Snippets of reviews that are used to generate answers about the features of a given place in Google Maps.
Fushat
The ID of the review snippet.
Title of the review.
A link that corresponds to the user review on Google Maps.
URI reference of the place.
Resource name of the Google Maps widget context token.
A signature hash for backend validation.
No description provided.
Always set to "google_maps_result" .
GoogleSearchCallDelta
arguments GoogleSearchCallArguments (required)
No description provided.
Fushat
Web search queries for the following-up web search.
A signature hash for backend validation.
No description provided.
Always set to "google_search_call" .
GoogleSearchResultDelta
No description provided.
result array (GoogleSearchResult) (required)
No description provided.
Fushat
Web content snippet that can be embedded in a web page or an app webview.
A signature hash for backend validation.
No description provided.
Always set to "google_search_result" .
ImageDelta
No description provided.
No description provided.
Possible values:
-
image/pngPNG image format
-
image/jpegJPEG image format
-
image/webpWebP image format
-
image/heicHEIC image format
-
image/heifHEIF image format
-
image/gifGIF image format
-
image/bmpBMP image format
-
image/tiffTIFF image format
resolution MediaResolution (optional)
The resolution of the media.
Vlerat e mundshme
-
lowLow resolution.
-
mediumMedium resolution.
-
highHigh resolution.
-
ultra_highUltra high resolution.
No description provided.
Always set to "image" .
No description provided.
TextAnnotationDelta
annotations array (Annotation) (optional)
Citation information for model-generated content.
Possible Types
FileCitation
A file citation annotation.
User provided metadata about the retrieved context.
The URI of the file.
End of the attributed segment, exclusive.
The name of the file.
Media ID in-case of image citations, if applicable.
Page number of the cited document, if applicable.
Source attributed for a portion of the text.
Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.
No description provided.
Always set to "file_citation" .
PlaceCitation
A place citation annotation.
End of the attributed segment, exclusive.
Title of the place.
The ID of the place, in `places/{place_id}` format.
review_snippets array (ReviewSnippet) (optional)
Snippets of reviews that are used to generate answers about the features of a given place in Google Maps.
Fushat
The ID of the review snippet.
Title of the review.
A link that corresponds to the user review on Google Maps.
Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.
No description provided.
Always set to "place_citation" .
URI reference of the place.
UrlCitation
A URL citation annotation.
End of the attributed segment, exclusive.
Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.
The title of the URL.
No description provided.
Always set to "url_citation" .
The URL.
No description provided.
Always set to "text_annotation_delta" .
TextDelta
No description provided.
No description provided.
Always set to "text" .
ThoughtSignatureDelta
Signature to match the backend source to be part of the generation.
No description provided.
Always set to "thought_signature" .
ThoughtSummaryDelta
A new summary item to be added to the thought.
No description provided.
Always set to "thought_summary" .
UrlContextCallDelta
arguments UrlContextCallArguments (required)
No description provided.
Fushat
The URLs to fetch.
A signature hash for backend validation.
No description provided.
Always set to "url_context_call" .
UrlContextResultDelta
No description provided.
result array (UrlContextResult) (required)
No description provided.
Fushat
The status of the URL retrieval.
Possible values:
-
successUrl retrieval is successful.
-
errorUrl retrieval is failed due to error.
-
paywallUrl retrieval is failed because the content is behind paywall.
-
unsafeUrl retrieval is failed because the content is unsafe.
The URL that was fetched.
A signature hash for backend validation.
No description provided.
Always set to "url_context_result" .
The event_id token to be used to resume the interaction stream, from this event.
No description provided.
Always set to "step.delta" .
No description provided.
metadata StepDeltaMetadata (optional)
No description provided.
Fushat
total_usage Usage (optional)
Statistics on the interaction request's token usage.
Fushat
cached_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of cached token usage by modality.
Fushat
modality ResponseModality (optional)
The modality associated with the token count.
Vlerat e mundshme
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
grounding_tool_count array (GroundingToolCount) (optional)
Grounding tool count.
Fushat
The number of grounding tool counts.
The grounding tool type associated with the count.
Possible values:
-
google_searchGrounding with Google Web Search and Image Search, & Web Grounding for Enterprise.
-
google_mapsGrounding with Google Maps.
input_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of input token usage by modality.
Fushat
modality ResponseModality (optional)
The modality associated with the token count.
Vlerat e mundshme
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
output_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of output token usage by modality.
Fushat
modality ResponseModality (optional)
The modality associated with the token count.
Vlerat e mundshme
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
tool_use_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of tool-use token usage by modality.
Fushat
modality ResponseModality (optional)
The modality associated with the token count.
Vlerat e mundshme
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
Number of tokens in the cached part of the prompt (the cached content).
Number of tokens in the prompt (context).
Total number of tokens across all the generated responses.
Number of tokens of thoughts for thinking models.
Total token count for the interaction request (prompt + responses + other internal tokens).
Number of tokens present in tool-use prompt(s).
StepStart
The event_id token to be used to resume the interaction stream, from this event.
No description provided.
Always set to "step.start" .
No description provided.
No description provided.
StepStop
The event_id token to be used to resume the interaction stream, from this event.
No description provided.
Always set to "step.stop" .
No description provided.
step_usage Usage (optional)
Model usage stats for this specific step.
Fushat
cached_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of cached token usage by modality.
Fushat
modality ResponseModality (optional)
The modality associated with the token count.
Vlerat e mundshme
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
grounding_tool_count array (GroundingToolCount) (optional)
Grounding tool count.
Fushat
The number of grounding tool counts.
The grounding tool type associated with the count.
Possible values:
-
google_searchGrounding with Google Web Search and Image Search, & Web Grounding for Enterprise.
-
google_mapsGrounding with Google Maps.
input_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of input token usage by modality.
Fushat
modality ResponseModality (optional)
The modality associated with the token count.
Vlerat e mundshme
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
output_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of output token usage by modality.
Fushat
modality ResponseModality (optional)
The modality associated with the token count.
Vlerat e mundshme
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
tool_use_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of tool-use token usage by modality.
Fushat
modality ResponseModality (optional)
The modality associated with the token count.
Vlerat e mundshme
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
Number of tokens in the cached part of the prompt (the cached content).
Number of tokens in the prompt (context).
Total number of tokens across all the generated responses.
Number of tokens of thoughts for thinking models.
Total token count for the interaction request (prompt + responses + other internal tokens).
Number of tokens present in tool-use prompt(s).
usage Usage (optional)
Cumulative model usage stats from the start of the session.
Fushat
cached_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of cached token usage by modality.
Fushat
modality ResponseModality (optional)
The modality associated with the token count.
Vlerat e mundshme
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
grounding_tool_count array (GroundingToolCount) (optional)
Grounding tool count.
Fushat
The number of grounding tool counts.
The grounding tool type associated with the count.
Possible values:
-
google_searchGrounding with Google Web Search and Image Search, & Web Grounding for Enterprise.
-
google_mapsGrounding with Google Maps.
input_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of input token usage by modality.
Fushat
modality ResponseModality (optional)
The modality associated with the token count.
Vlerat e mundshme
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
output_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of output token usage by modality.
Fushat
modality ResponseModality (optional)
The modality associated with the token count.
Vlerat e mundshme
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
tool_use_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of tool-use token usage by modality.
Fushat
modality ResponseModality (optional)
The modality associated with the token count.
Vlerat e mundshme
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
Number of tokens in the cached part of the prompt (the cached content).
Number of tokens in the prompt (context).
Total number of tokens across all the generated responses.
Number of tokens of thoughts for thinking models.
Total token count for the interaction request (prompt + responses + other internal tokens).
Number of tokens present in tool-use prompt(s).
Shembuj
Error Event
{ "error": { "code": "not_found", "message": "Failed to get completed interaction: Result not found." }, "event_type": "error" }
Interaction Completed
{ "event_id": "evt_123", "event_type": "interaction.completed", "interaction": { "created": "2025-12-04T15:01:45Z", "id": "v1_ChdXS0l4YWZXTk9xbk0xZThQczhEcmlROBIXV0tJeGFmV05PcW5NMWU4UHM4RHJpUTg", "model": "gemini-3.6-flash", "status": "completed", "updated": "2025-12-04T15:01:45Z" } }
Interaction Completed
{ "event_id": "evt_123", "event_type": "interaction.completed", "interaction": { "created": "2025-12-04T15:01:45Z", "id": "v1_ChdXS0l4YWZXTk9xbk0xZThQczhEcmlROBIXV0tJeGFmV05PcW5NMWU4UHM4RHJpUTg", "model": "gemini-3-flash-preview", "object": "interaction", "status": "completed", "updated": "2025-12-04T15:01:45Z" } }
Interaction Created
{ "event_id": "evt_123", "event_type": "interaction.created", "interaction": { "created": "2025-12-04T15:01:45Z", "id": "v1_ChdXS0l4YWZXTk9xbk0xZThQczhEcmlROBIXV0tJeGFmV05PcW5NMWU4UHM4RHJpUTg", "model": "gemini-3.6-flash", "status": "in_progress", "updated": "2025-12-04T15:01:45Z" } }
Interaction Created
{ "event_id": "evt_123", "event_type": "interaction.created", "interaction": { "id": "v1_ChdXS0l4YWZXTk9xbk0xZThQczhEcmlROBIXV0tJeGFmV05PcW5NMWU4UHM4RHJpUTg", "model": "gemini-3-flash-preview", "object": "interaction", "status": "in_progress" } }
Interaction Status Update
{ "event_type": "interaction.status_update", "interaction_id": "v1_ChdTMjQ0YWJ5TUF1TzcxZThQdjRpcnFRcxIXUzI0NGFieU1BdU83MWU4UHY0aXJxUXM", "status": "in_progress" }
Step Delta
{ "delta": { "type": "text", "text": "Hello" }, "event_type": "step.delta", "index": 0 }
Step Start
{ "event_type": "step.start", "index": 0, "step": { "type": "model_output" } }
Step Stop
{ "event_type": "step.stop", "index": 0 }
ResponseFormat
Possible Types
AudioResponseFormat
Configuration for audio output format.
Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
The delivery mode for the audio output.
Possible values:
-
inlineAudio data is returned inline in the response.
-
uriAudio data is returned as a URI.
The MIME type of the audio output.
Possible values:
-
audio/mp3MP3 audio format.
-
audio/ogg_opusOGG Opus audio format.
-
audio/l16Raw PCM (L16) audio format.
-
audio/wavWAV audio format.
-
audio/alawA-law audio format.
-
audio/mulawMu-law audio format.
Sample rate in Hz.
No description provided.
Always set to "audio" .
ImageResponseFormat
Configuration for image output format.
The aspect ratio for the image output.
Possible values:
-
1:11:1 aspect ratio.
-
2:32:3 aspect ratio.
-
3:23:2 aspect ratio.
-
3:43:4 aspect ratio.
-
4:34:3 aspect ratio.
-
4:54:5 aspect ratio.
-
5:45:4 aspect ratio.
-
9:169:16 aspect ratio.
-
16:916:9 aspect ratio.
-
21:921:9 aspect ratio.
-
1:81:8 aspect ratio.
-
8:18:1 aspect ratio.
-
1:41:4 aspect ratio.
-
4:14:1 aspect ratio.
The delivery mode for the image output.
Possible values:
-
inlineImage data is returned inline in the response.
-
uriImage data is returned as a URI.
The size of the image output.
Possible values:
-
512512px image size.
-
1K1K image size.
-
2K2K image size.
-
4K4K image size.
The MIME type of the image output.
Possible values:
-
image/jpegJPEG image format.
No description provided.
Always set to "image" .
TextResponseFormat
Configuration for text output format.
The MIME type of the text output.
Possible values:
-
application/jsonJSON output format.
-
text/plainPlain text output format.
The JSON schema that the output should conform to. Only applicable when mime_type is application/json.
No description provided.
Always set to "text" .
VideoResponseFormat
Configuration for video output format.
The aspect ratio for the video output.
Possible values:
-
16:916:9 aspect ratio.
-
9:169:16 aspect ratio.
The delivery mode for the video output.
Possible values:
-
inlineVideo data is returned inline in the response.
-
uriVideo data is returned as a URI.
The duration for the video output.
The video output resolution. Defaults to 720p.
Possible values:
-
360p360p resolution.
-
720pRezolucion 720p.
-
1080p1080p resolution.
-
4k4K resolution.
No description provided.
Always set to "video" .
Shembuj
Dalja e audios
{ "type": "audio", "sample_rate": 24000 }
Dalja e imazhit
{ "type": "image", "aspect_ratio": "16:9", "image_size": "1K", "mime_type": "image/jpeg" }
Text Output (JSON Schema)
{ "type": "text", "mime_type": "application/json", "schema": { "type": "object", "properties": { "ingredients": { "type": "array", "items": { "type": "string" } }, "recipe_name": { "type": "string" } }, "required": [ "ingredients", "recipe_name" ] } }
VideoResponseFormat
No examples available for this type.
Hapi
A step in the interaction.
Possible Types
CodeExecutionCallStep
Code execution call step.
arguments CodeExecutionCallStepArguments (optional)
The arguments to pass to the code execution.
Fushat
The code to be executed.
Programming language of the `code`.
Possible values:
-
pythonPython >= 3.10, with numpy and simpy available.
Required. A unique ID for this specific tool call.
A signature hash for backend validation.
No description provided.
Always set to "code_execution_call" .
CodeExecutionResultStep
Code execution result step.
Required. ID to match the ID from the function call block.
Whether the code execution resulted in an error.
The output of the code execution.
A signature hash for backend validation.
No description provided.
Always set to "code_execution_result" .
FileSearchCallStep
File Search call step.
Required. A unique ID for this specific tool call.
A signature hash for backend validation.
No description provided.
Always set to "file_search_call" .
FileSearchResultStep
File Search result step.
Required. ID to match the ID from the function call block.
A signature hash for backend validation.
No description provided.
Always set to "file_search_result" .
FunctionCallStep
A function tool call step.
Required. The arguments to pass to the function.
Required. A unique ID for this specific tool call.
Required. The name of the tool to call.
No description provided.
Always set to "function_call" .
FunctionResultStep
Result of a function tool call.
Required. ID to match the ID from the function call block.
Whether the tool call resulted in an error.
The name of the tool that was called.
Required. The result of the tool call.
No description provided.
Always set to "function_result" .
GoogleMapsCallStep
Google Maps call step.
arguments GoogleMapsCallStepArguments (optional)
The arguments to pass to the Google Maps tool.
Fushat
The queries to be executed.
Required. A unique ID for this specific tool call.
A signature hash for backend validation.
No description provided.
Always set to "google_maps_call" .
GoogleMapsResultStep
Google Maps result step.
Required. ID to match the ID from the function call block.
result array (GoogleMapsResultItem) (optional)
No description provided.
Fushat
places array (GoogleMapsResultPlaces) (optional)
No description provided.
Fushat
No description provided.
No description provided.
review_snippets array (ReviewSnippet) (optional)
No description provided.
Fushat
The ID of the review snippet.
Title of the review.
A link that corresponds to the user review on Google Maps.
No description provided.
No description provided.
A signature hash for backend validation.
No description provided.
Always set to "google_maps_result" .
GoogleSearchCallStep
Google Search call step.
arguments GoogleSearchCallStepArguments (optional)
The arguments to pass to Google Search.
Fushat
Web search queries for the following-up web search.
Required. A unique ID for this specific tool call.
The type of search grounding enabled.
Possible values:
-
web_searchSetting this field enables web search. Only text results are returned.
-
image_searchSetting this field enables image search. Image bytes are returned.
A signature hash for backend validation.
No description provided.
Always set to "google_search_call" .
GoogleSearchResultStep
Google Search result step.
Required. ID to match the ID from the function call block.
Whether the Google Search resulted in an error.
result array (GoogleSearchResultItem) (optional)
The results of the Google Search.
Fushat
Web content snippet that can be embedded in a web page or an app webview.
A signature hash for backend validation.
No description provided.
Always set to "google_search_result" .
ModelOutputStep
Output generated by the model.
No description provided.
No description provided.
Always set to "model_output" .
ThoughtStep
A thought step.
A signature hash for backend validation.
A summary of the thought.
No description provided.
Always set to "thought" .
UrlContextCallStep
URL context call step.
arguments UrlContextCallArguments (optional)
The arguments to pass to the URL context.
Fushat
The URLs to fetch.
Required. A unique ID for this specific tool call.
A signature hash for backend validation.
No description provided.
Always set to "url_context_call" .
UrlContextResultStep
URL context result step.
Required. ID to match the ID from the function call block.
Whether the URL context resulted in an error.
result array (UrlContextResult) (optional)
The results of the URL context.
Fushat
The status of the URL retrieval.
Possible values:
-
successUrl retrieval is successful.
-
errorUrl retrieval is failed due to error.
-
paywallUrl retrieval is failed because the content is behind paywall.
-
unsafeUrl retrieval is failed because the content is unsafe.
The URL that was fetched.
A signature hash for backend validation.
No description provided.
Always set to "url_context_result" .
UserInputStep
Input provided by the user.
No description provided.
No description provided.
Always set to "user_input" .
Shembuj
CodeExecutionCallStep
{ "type": "code_execution_call", "arguments": { "code": "print(sum(range(1, 11)))" }, "id": "code_call_71021" }
CodeExecutionResultStep
{ "type": "code_execution_result", "call_id": "code_call_71021", "result": "55\n" }
FileSearchCallStep
{ "type": "file_search_call", "id": "file_call_88192" }
FileSearchResultStep
{ "type": "file_search_result", "call_id": "file_call_88192" }
FunctionCallStep
{ "name": "get_weather", "type": "function_call", "arguments": { "location": "Boston, MA" }, "id": "call_98231" }
FunctionResultStep
{ "name": "get_weather", "type": "function_result", "call_id": "call_98231", "result": [ { "type": "text", "text": "{\"weather\":\"sunny\"}" } ] }
GoogleMapsCallStep
{ "type": "google_maps_call", "arguments": { "latitude": 37.7749, "longitude": -122.4194 }, "id": "maps_call_39201" }
GoogleMapsResultStep
{ "type": "google_maps_result", "call_id": "maps_call_39201", "result": [ { "name": "Golden Gate Park", "place_id": "ChIJIQBpAG2ahYAR9R7bNdTLg8M", "rating": 4.8 } ] }
GoogleSearchCallStep
{ "type": "google_search_call", "arguments": { "query": "Who won the men's 100m in Paris 2024?" }, "id": "search_call_19201" }
GoogleSearchResultStep
{ "type": "google_search_result", "call_id": "search_call_19201", "result": [ { "title": "Paris 2024 Olympics: Noah Lyles wins men's 100m gold", "url": "https://olympics.com/en/news/paris-2024-noah-lyles-wins-mens-100m-gold", "snippet": "American Noah Lyles won the Olympic men's 100m gold medal in a photo finish." } ] }
ModelOutputStep
{ "type": "model_output", "content": [ { "type": "text", "text": "The capital of France is Paris." } ] }
ThoughtStep
{ "type": "thought", "signature": "thought_sig_abcd1234", "summary": [ { "type": "text", "text": "The model is searching Google for the capital of France." } ] }
UrlContextCallStep
{ "type": "url_context_call", "arguments": { "urls": [ "https://www.example.com" ] }, "id": "url_call_10219" }
UrlContextResultStep
{ "type": "url_context_result", "call_id": "url_call_10219", "result": [ { "title": "Example Domain", "url": "https://www.example.com", "snippet": "This domain is for use in illustrative examples in documents." } ] }
UserInputStep
{ "type": "user_input", "content": [ { "type": "text", "text": "What is the capital of France?" } ] }
ToolChoiceConfig
The tool choice configuration containing allowed tools.
Fushat
allowed_tools AllowedTools (optional)
The allowed tools.
Fushat
The mode of the tool choice.
Possible values:
-
autoAuto tool choice.
-
anyAny tool choice.
-
noneNo tool choice.
-
validatedValidated tool choice.
The names of the allowed tools.
Shembuj
Shembull
{ "allowed_tools": { "mode": "any", "tools": [ "my_tool" ] } }
ImageContent
An image content block.
Fushat
The image content.
The mime type of the image.
Possible values:
-
image/pngPNG image format
-
image/jpegJPEG image format
-
image/webpWebP image format
-
image/heicHEIC image format
-
image/heifHEIF image format
-
image/gifGIF image format
-
image/bmpBMP image format
-
image/tiffTIFF image format
resolution MediaResolution (optional)
The resolution of the media.
Vlerat e mundshme
-
lowLow resolution.
-
mediumMedium resolution.
-
highHigh resolution.
-
ultra_highUltra high resolution.
No description provided.
Always set to "image" .
The URI of the image.
Shembuj
Imazh
{ "type": "image", "data": "BASE64_ENCODED_IMAGE", "mime_type": "image/png" }
TextContent
A text content block.
Fushat
annotations array (Annotation) (optional)
Citation information for model-generated content.
Possible Types
FileCitation
A file citation annotation.
User provided metadata about the retrieved context.
The URI of the file.
End of the attributed segment, exclusive.
The name of the file.
Media ID in-case of image citations, if applicable.
Page number of the cited document, if applicable.
Source attributed for a portion of the text.
Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.
No description provided.
Always set to "file_citation" .
PlaceCitation
A place citation annotation.
End of the attributed segment, exclusive.
Title of the place.
The ID of the place, in `places/{place_id}` format.
review_snippets array (ReviewSnippet) (optional)
Snippets of reviews that are used to generate answers about the features of a given place in Google Maps.
Fushat
The ID of the review snippet.
Title of the review.
A link that corresponds to the user review on Google Maps.
Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.
No description provided.
Always set to "place_citation" .
URI reference of the place.
UrlCitation
A URL citation annotation.
End of the attributed segment, exclusive.
Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.
The title of the URL.
No description provided.
Always set to "url_citation" .
The URL.
Required. The text content.
No description provided.
Always set to "text" .
Shembuj
Tekst
{ "type": "text", "text": "Hello, how are you?" }