Gemini Interactions API

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ë.

Versioni i API-t: v1beta v1

Krijimi i një ndërveprimi

postoni https://generativelanguage.googleapis.com/v1beta/interactions

Krijon një ndërveprim të ri.

Parametrat e Shtegut / Pyetjes

vargu api_version (i detyrueshëm)

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ë.

Modeli që do të plotësojë kërkesën tuaj.\n\nShihni [models](https://ai.google.dev/gemini-api/docs/models) për detaje shtesë.

Vlerat e mundshme

  • models/gemini-2.5-flash-lite

    Modeli ynë më i vogël dhe më ekonomik, i ndërtuar për përdorim në shkallë të gjerë.

  • models/gemini-2.5-flash-image

    Modeli 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-lite

    Modeli 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-image

    Inteligjencë vizuale e nivelit profesional me efikasitet me shpejtësinë e Flash-it dhe aftësi gjenerimi të bazuara në realitet.

  • models/gemini-3.5-flash

    Modeli ynë më inteligjent për performancë të qëndrueshme në kufijtë e detyrave agjentike dhe të kodimit.

  • models/gemini-3.6-flash

    Modeli ynë më inteligjent për performancë të qëndrueshme në kufijtë e detyrave agjentike dhe të kodimit.

  • models/gemini-3.7-flash

    Modeli 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ë.

Agjenti me të cilin duhet të ndërveprohet.

Vlerat e mundshme

  • deep-research-pro-preview-12-2025

    Agjent i Kërkimeve të Thellë Gemini

  • deep-research-preview-04-2026

    Agjent i Kërkimeve të Thellë Gemini

  • deep-research-max-preview-04-2026

    Agjenti Maksimal i Kërkimeve të Thellë Gemini

  • antigravity-preview-05-2026

    Përdorni agjentin e menaxhuar Antigravity për të kryer detyra me shumë hapa që kërkojnë arsyetim, operacione me skedarë dhe përdorim mjetesh.

fut Përmbajtje ose varg ( Përmbajtje ) ose varg ( Hapë ) ose varg (i detyrueshëm)

Të dhënat hyrëse për bashkëveprimin (të përbashkëta si për Modelin ashtu edhe për Agjentin).

vargu i udhëzimit_të_sistem-it (opsional)

Udhëzime sistemi për bashkëveprimin.

varg mjetesh ( Mjet ) (opsional)

Një listë e deklarimeve të mjeteve që modeli mund të thërrasë gjatë ndërveprimit.

response_format ResponseFormat ose varg ( ResponseFormat ) (opsionale)

Zbaton që përgjigjja e gjeneruar të jetë një objekt JSON që përputhet me skemën JSON të specifikuar në këtë fushë.

vlera booleane e rrjedhës (opsionale)

Vetëm të dhëna. Nëse bashkëveprimi do të transmetohet.

ruaj vlerën booleane (opsionale)

Vetëm hyrje. Nëse përgjigja dhe kërkesa do të ruhen për rikthim të mëvonshëm.

boolean i sfondit (opsional)

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`.

Parametrat e konfigurimit për ndërveprimet e modelit.

Fushat

numër i plotë max_output_tokens (opsional)

Numri maksimal i tokenëve që duhen përfshirë në përgjigje.

numër i plotë fillestar (opsional)

Farë e përdorur në dekodim për riprodhueshmëri.

speech_config Konfigurimi i Speaker-it ose vargu (SpeechConfig) (opsional)

Opsionale. Konfigurim për të folur dhe shumë altoparlantë.

vargu stop_sequences (varg) (opsional)

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

  • minimal

    Pak ose aspak mendim.

  • low

    Nivel i ulët i të menduarit.

  • medium

    Nivel i mesëm i të menduarit.

  • high

    Nivel 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

  • auto

    Përmbledhje të të menduarit automatik.

  • none

    Pa përmbledhje të të menduarit.

tool_choice ToolChoiceConfig ose enum (string) (opsionale)

Konfigurimi i zgjedhjes së mjetit.

Vlerat e mundshme:

  • auto

    Zgjedhja e mjetit automatik.

  • any

    Çdo zgjedhje mjeti.

  • none

    Pa zgjedhje mjetesh.

  • validated

    Zgjedhje 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`.

Konfigurimi për agjentë dinamikë.

Fushat

objekt tipi (opsionale)

Nuk është dhënë përshkrim.

Gjithmonë i vendosur në "dynamic" .

objekt etiketash (opsional)

Etiketat me meta të dhëna të përcaktuara nga përdoruesi për kërkesën.

vargu max_total_tokens (opsional)

Totali maksimal i tokenëve për ekzekutimin e agjentit.

vargu previous_interaction_id (opsional)

ID-ja e ndërveprimit të mëparshëm, nëse ka.

vargu i cilësimeve_të_safety-t (SafetySetting) (opsionale)

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

posto https://generativelanguage.googleapis.com/v1beta/interactions/{id}/cancel

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

vargu api_version (i detyrueshëm)

Cilin version të API-t të përdoret.

vargu i identifikimit (i detyrueshëm)

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

merrni https://generativelanguage.googleapis.com/v1beta/interactions/{id}

Merr detajet e plota të një bashkëveprimi të vetëm bazuar në `Interaction.id`-in e tij.

Parametrat e Shtegut / Pyetjes

vargu api_version (i detyrueshëm)

Cilin version të API-t të përdoret.

vargu i identifikimit (i detyrueshëm)

Identifikuesi unik i ndërveprimit që do të rikuperohet.

vargu last_event_id (opsional)

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ë.

vlera booleane e rrjedhës (opsionale)

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

fshi https://generativelanguage.googleapis.com/v1beta/interactions/{id}

Fshin ndërveprimin me anë të ID-së.

Parametrat e Shtegut / Pyetjes

vargu api_version (i detyrueshëm)

Cilin version të API-t të përdoret.

vargu i identifikimit (i detyrueshëm)

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.

Agjenti me të cilin duhet të ndërveprohet.

Vlerat e mundshme

  • deep-research-pro-preview-12-2025

    Agjent i Kërkimeve të Thellë Gemini

  • deep-research-preview-04-2026

    Agjent i Kërkimeve të Thellë Gemini

  • deep-research-max-preview-04-2026

    Agjenti Maksimal i Kërkimeve të Thellë Gemini

  • antigravity-preview-05-2026

    Pë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.

Konfigurimi për agjentë dinamikë.

Fushat

objekt tipi (opsionale)

Nuk është dhënë përshkrim.

Gjithmonë i vendosur në "dynamic" .

varg i krijuar (opsional)

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.

Mesazh gabimi nga një bashkëveprim.

Fushat

varg kodi (opsional)

Një URI që identifikon llojin e gabimit.

varg mesazhi (opsional)

Një mesazh gabimi i lexueshëm nga njeriu.

vargu i identifikimit (opsional)

E detyrueshme. Vetëm rezultat. Një identifikues unik për përfundimin e ndërveprimit.

Parazgjedhur në:

fut Përmbajtje ose varg ( Content ) ose varg ( Step ) ose varg (opsional)

Të dhënat hyrëse për bashkëveprimin.

objekt etiketash (opsional)

Etiketat me meta të dhëna të përcaktuara nga përdoruesi për kërkesën.

vargu max_total_tokens (opsional)

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.

Modeli që do të plotësojë kërkesën tuaj.\n\nShihni [models](https://ai.google.dev/gemini-api/docs/models) për detaje shtesë.

Vlerat e mundshme

  • models/gemini-2.5-flash-lite

    Modeli ynë më i vogël dhe më ekonomik, i ndërtuar për përdorim në shkallë të gjerë.

  • models/gemini-2.5-flash-image

    Modeli 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-lite

    Modeli 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-image

    Inteligjencë vizuale e nivelit profesional me efikasitet me shpejtësinë e Flash-it dhe aftësi gjenerimi të bazuara në realitet.

  • models/gemini-3.5-flash

    Modeli ynë më inteligjent për performancë të qëndrueshme në kufijtë e detyrave agjentike dhe të kodimit.

  • models/gemini-3.6-flash

    Modeli ynë më inteligjent për performancë të qëndrueshme në kufijtë e detyrave agjentike dhe të kodimit.

  • models/gemini-3.7-flash

    Modeli 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.

Një bllok përmbajtjeje audio.

Fushat

numër i plotë i kanaleve (opsionale)

Numri i kanaleve audio.

varg të dhënash (opsionale)

Përmbajtja audio.

mime_type enum (string) (opsionale)

Lloji i mimikës i audios.

Vlerat e mundshme:

  • audio/wav

    Formati audio WAV

  • audio/mp3

    Formati audio MP3

  • audio/aiff

    Formati audio AIFF

  • audio/aac

    Formati audio AAC

  • audio/ogg

    Formati audio OGG

  • audio/flac

    Formati audio FLAC

  • audio/mpeg

    Formati audio MPEG

  • audio/m4a

    Formati audio M4A

  • audio/l16

    Formati audio L16

  • audio/opus

    Formati audio OPUS

  • audio/alaw

    Formati audio ALAW

  • audio/mulaw

    Formati audio MULAW

numër i plotë i shkallës së_sample-it (opsional)

Shpejtësia e mostrës së audios.

objekt tipi (opsionale)

Nuk është dhënë përshkrim.

Gjithmonë i vendosur në "audio" .

vargu uri (opsional)

URI-ja e audios.

output_image ImageContent (opsionale)

Imazhi i fundit i gjeneruar nga modeli në përgjigje të kërkesës aktuale. Shënim: kjo është shtuar nga SDK.

vargu i tekstit_të_outputit (opsional)

Tekst i bashkuar nga rezultati i fundit i modelit në përgjigje të kërkesës aktuale. Shënim: kjo është shtuar nga SDK.

vargu previous_interaction_id (opsional)

ID-ja e ndërveprimit të mëparshëm, nëse ka.

response_format ResponseFormat ose varg ( ResponseFormat ) (opsionale)

Zbaton që përgjigjja e gjeneruar të jetë një objekt JSON që përputhet me skemën JSON të specifikuar në këtë fushë.

vargu i cilësimeve_të_safety-t (SafetySetting) (opsionale)

Cilësimet e sigurisë për bashkëveprimin.

numërimi i statusit (varg) (opsional)

E detyrueshme. Vetëm rezultat. Statusi i ndërveprimit.

Vlerat e mundshme:

  • in_progress

    Ndërveprimi është në zhvillim e sipër.

  • requires_action

    Ndërveprimi kërkon veprim/input nga përdoruesi.

  • completed

    Ndërveprimi është përfunduar.

  • failed

    Ndërveprimi dështoi.

  • cancelled

    Ndërveprimi u anulua.

  • incomplete

    Ndërveprimi është përfunduar, por përmban rezultate të paplota (p.sh., duke shtypur max_tokens).

vargu i hapave ( Hapi ) (opsional)

Vetëm rezultati. Hapat që përbëjnë bashkëveprimin, kur përfshihen në përgjigje.

vargu i udhëzimit_të_sistem-it (opsional)

Udhëzime sistemi për bashkëveprimin.

varg mjetesh ( Mjet ) (opsional)

Një listë e deklarimeve të mjeteve që modeli mund të thërrasë gjatë ndërveprimit.

varg i përditësuar (opsional)

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.

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.

Numërimi i tokenëve për një modalitet të vetëm përgjigjeje.

Fushat

modaliteti ResponseModality (opsionale)

Modaliteti i lidhur me numërimin e tokenëve.

Vlerat e mundshme

  • text

    Tregon se modeli duhet të kthejë tekst.

  • image

    Tregon se modeli duhet të kthejë imazhe.

  • audio

    Tregon se modeli duhet të kthejë audio.

  • video

    Tregon se modeli duhet të kthejë videon.

  • document

    Tregon se modeli duhet të kthejë dokumente.

numër i plotë i tokenëve (opsionale)

Numri i tokenëve për modalitetin.

vargu grounding_tool_count (GroundingToolCount) (opsionale)

Numri i mjeteve të tokëzimit.

Numri i mjeteve të tokëzimit numërohet.

Fushat

numër i plotë (opsional)

Numri i mjeteve të tokëzimit numërohet.

tipi enum (string) (opsionale)

Lloji i mjetit të tokëzimit i lidhur me numërimin.

Vlerat e mundshme:

  • google_search

    Bazë me Kërkimin në Ueb të Google dhe Kërkimin e Imazheve, dhe Bazë në Ueb për Ndërmarrjet.

  • google_maps

    Tokëzimi me Google Maps.

vargu input_tokens_by_modality (ModalityTokens) (opsionale)

Një ndarje e përdorimit të tokenit të hyrjes sipas modalitetit.

Numërimi i tokenëve për një modalitet të vetëm përgjigjeje.

Fushat

modaliteti ResponseModality (opsionale)

Modaliteti i lidhur me numërimin e tokenëve.

Vlerat e mundshme

  • text

    Tregon se modeli duhet të kthejë tekst.

  • image

    Tregon se modeli duhet të kthejë imazhe.

  • audio

    Tregon se modeli duhet të kthejë audio.

  • video

    Tregon se modeli duhet të kthejë videon.

  • document

    Tregon se modeli duhet të kthejë dokumente.

numër i plotë i tokenëve (opsionale)

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.

Numërimi i tokenëve për një modalitet të vetëm përgjigjeje.

Fushat

modaliteti ResponseModality (opsionale)

Modaliteti i lidhur me numërimin e tokenëve.

Vlerat e mundshme

  • text

    Tregon se modeli duhet të kthejë tekst.

  • image

    Tregon se modeli duhet të kthejë imazhe.

  • audio

    Tregon se modeli duhet të kthejë audio.

  • video

    Tregon se modeli duhet të kthejë videon.

  • document

    Tregon se modeli duhet të kthejë dokumente.

numër i plotë i tokenëve (opsionale)

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.

Numërimi i tokenëve për një modalitet të vetëm përgjigjeje.

Fushat

modaliteti ResponseModality (opsionale)

Modaliteti i lidhur me numërimin e tokenëve.

Vlerat e mundshme

  • text

    Tregon se modeli duhet të kthejë tekst.

  • image

    Tregon se modeli duhet të kthejë imazhe.

  • audio

    Tregon se modeli duhet të kthejë audio.

  • video

    Tregon se modeli duhet të kthejë videon.

  • document

    Tregon se modeli duhet të kthejë dokumente.

numër i plotë i tokenëve (opsionale)

Numri i tokenëve për modalitetin.

total_cached_tokens numër i plotë (opsional)

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).

total_input_tokens numër i plotë (opsional)

Numri i tokenëve në kërkesë (konteksti).

total_output_tokens numër i plotë (opsional)

Numri total i tokenëve në të gjitha përgjigjet e gjeneruara.

total_thought_tokens numër i plotë (opsional)

Numri i tokenëve të mendimeve për modelet e të menduarit.

total_tokens numër i plotë (opsional)

Numri total i tokenëve për kërkesën e ndërveprimit (kërkesa + përgjigjet + tokenët e tjerë të brendshëm).

total_tool_use_tokens numër i plotë (opsional)

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.

numër i plotë i kanaleve (opsionale)

Numri i kanaleve audio.

varg të dhënash (opsionale)

Përmbajtja audio.

mime_type enum (string) (opsionale)

Lloji i mimikës i audios.

Vlerat e mundshme:

  • audio/wav

    Formati audio WAV

  • audio/mp3

    Formati audio MP3

  • audio/aiff

    Formati audio AIFF

  • audio/aac

    Formati audio AAC

  • audio/ogg

    Formati audio OGG

  • audio/flac

    Formati audio FLAC

  • audio/mpeg

    Formati audio MPEG

  • audio/m4a

    Formati audio M4A

  • audio/l16

    Formati audio L16

  • audio/opus

    Formati audio OPUS

  • audio/alaw

    Formati audio ALAW

  • audio/mulaw

    Formati audio MULAW

numër i plotë i shkallës së_sample-it (opsional)

Shpejtësia e mostrës së audios.

lloji i objektit (i detyrueshëm)

Nuk është dhënë përshkrim.

Gjithmonë i vendosur në "audio" .

vargu uri (opsional)

URI-ja e audios.

Përmbajtja e Dokumentit

Një bllok përmbajtjeje dokumenti.

varg të dhënash (opsionale)

Përmbajtja e dokumentit.

mime_type enum (string) (opsionale)

Lloji mime i dokumentit.

Vlerat e mundshme:

  • application/pdf

    Formati i dokumentit PDF

  • text/csv

    Formati i dokumentit CSV

lloji i objektit (i detyrueshëm)

Nuk është dhënë përshkrim.

Gjithmonë i vendosur në "document" .

vargu uri (opsional)

URI-ja e dokumentit.

Përmbajtje Imazhesh

Një bllok përmbajtjeje imazhi.

varg të dhënash (opsionale)

Përmbajtja e imazhit.

mime_type enum (string) (opsionale)

Lloji i mimikës së imazhit.

Vlerat e mundshme:

  • image/png

    Formati i imazhit PNG

  • image/jpeg

    Formati i imazhit JPEG

  • image/webp

    Formati i imazhit WebP

  • image/heic

    Formati i imazhit HEIC

  • image/heif

    Formati i imazhit HEIF

  • image/gif

    Formati i imazhit GIF

  • image/bmp

    Formati i imazhit BMP

  • image/tiff

    Formati i imazhit TIFF

rezolucioni i MediaResolution (opsional)

Zgjidhja e mediave.

Vlerat e mundshme

  • low

    Rezolucion i ulët.

  • medium

    Rezolucion i mesëm.

  • high

    Rezolucion i lartë.

  • ultra_high

    Rezolucion ultra i lartë.

lloji i objektit (i detyrueshëm)

Nuk është dhënë përshkrim.

Gjithmonë i vendosur në "image" .

vargu uri (opsional)

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.

Informacion mbi citimin për përmbajtjen e gjeneruar nga modeli.

Llojet e mundshme

FileCitation

Një shënim citimi i skedarit.

objekti custom_metadata (opsional)

Përdoruesi dha meta të dhëna rreth kontekstit të marrë.

vargu document_uri (opsional)

URI-ja e skedarit.

numër i plotë end_index (opsional)

Fundi i segmentit të atribuuar, ekskluziv.

vargu i emrit të skedarit (opsional)

Emri i skedarit.

vargu media_id (opsional)

ID e medias në rast të citimeve të imazheve, nëse ka.

numër i plotë i faqes (opsional)

Numri i faqes së dokumentit të cituar, nëse ka.

vargu burimor (opsional)

Burimi i atribuuar për një pjesë të tekstit.

numër i plotë i indeksit_fillues (opsional)

Fillimi i segmentit të përgjigjes që i atribuohet këtij burimi. Indeksi tregon fillimin e segmentit, i matur në bajt.

lloji i objektit (i detyrueshëm)

Nuk është dhënë përshkrim.

Gjithmonë i vendosur në "file_citation" .

Citimi i Vendit

Një shënim citimi vendi.

numër i plotë end_index (opsional)

Fundi i segmentit të atribuuar, ekskluziv.

varg emri (opsional)

Titulli i vendit.

vargu place_id (opsional)

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.

Përmban një fragment të një vlerësimi përdoruesi që përgjigjet një pyetjeje në lidhje me veçoritë e një vendi specifik në Google Maps.

Fushat

vargu review_id (opsional)

ID-ja e fragmentit të rishikimit.

vargu i titullit (opsional)

Titulli i rishikimit.

vargu i url-(opsional)

Një lidhje që korrespondon me vlerësimin e përdoruesit në Google Maps.

numër i plotë i indeksit_fillues (opsional)

Fillimi i segmentit të përgjigjes që i atribuohet këtij burimi. Indeksi tregon fillimin e segmentit, i matur në bajt.

lloji i objektit (i detyrueshëm)

Nuk është dhënë përshkrim.

Gjithmonë i vendosur në "place_citation" .

vargu i url-(opsional)

Referenca URI e vendit.

Citimi i Url-it

Një shënim citimi URL-je.

numër i plotë end_index (opsional)

Fundi i segmentit të atribuuar, ekskluziv.

numër i plotë i indeksit_fillues (opsional)

Fillimi i segmentit të përgjigjes që i atribuohet këtij burimi. Indeksi tregon fillimin e segmentit, i matur në bajt.

vargu i titullit (opsional)

Titulli i URL-së.

lloji i objektit (i detyrueshëm)

Nuk është dhënë përshkrim.

Gjithmonë i vendosur në "url_citation" .

vargu i url-(opsional)

URL-ja.

varg teksti (i detyrueshëm)

E detyrueshme. Përmbajtja e tekstit.

lloji i objektit (i detyrueshëm)

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.

lloji i objektit (i detyrueshëm)

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ë.

vargu file_search_store_names (string) (opsional)

Kërkimi i skedarëve ruan emrat që duhen kërkuar.

vargu i filtrit_të_metadata- ve (opsional)

Filtri i meta të dhënave për t'u aplikuar në dokumentet dhe pjesët e rikthimit semantik.

numër i plotë top_k (opsional)

Numri i pjesëve të rikthimit semantik që duhen rikuperuar.

lloji i objektit (i detyrueshëm)

Nuk është dhënë përshkrim.

Gjithmonë i vendosur në "file_search" .

Funksioni

Një mjet që mund të përdoret nga modeli.

varg përshkrimi (opsional)

Një përshkrim i funksionit.

varg emri (opsional)

Emri i funksionit.

objekt parametrash (opsional)

Skema JSON për parametrat e funksionit.

lloji i objektit (i detyrueshëm)

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.

enable_widget boolean (opsionale)

Nëse duhet të kthehet një shenjë konteksti e widget-it në rezultatin e thirrjes së mjetit të përgjigjes.

numri i gjerësisë gjeografike (opsional)

Gjerësia gjeografike e vendndodhjes së përdoruesit.

numri i gjatësisë gjeografike (opsional)

Gjatësia gjeografike e vendndodhjes së përdoruesit.

lloji i objektit (i detyrueshëm)

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.

vargu search_types (enum (string)) (opsional)

Llojet e tokëzimit të kërkimit që duhen aktivizuar.

Vlerat e mundshme:

  • web_search

    Vendosja e kësaj fushe aktivizon kërkimin në internet. Kthehen vetëm rezultatet me tekst.

  • image_search

    Vendosja e kësaj fushe aktivizon kërkimin e imazheve. Kthehen bajtet e imazheve.

lloji i objektit (i detyrueshëm)

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ë.

lloji i objektit (i detyrueshëm)

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.

Mesazh gabimi nga një bashkëveprim.

Fushat

varg kodi (opsional)

Një URI që identifikon llojin e gabimit.

varg mesazhi (opsional)

Një mesazh gabimi i lexueshëm nga njeriu.

vargu i identifikimit_të_eventit (opsional)

Shenja event_id që do të përdoret për të rifilluar rrjedhën e ndërveprimit, nga kjo ngjarje.

objekti i tipit_event_type (i detyrueshëm)

Nuk është dhënë përshkrim.

Gjithmonë i vendosur në "error" .

Ngjarje e Përfunduar Ndërveprimi

vargu i identifikimit_të_eventit (opsional)

Shenja event_id që do të përdoret për të rifilluar rrjedhën e ndërveprimit, nga kjo ngjarje.

objekti i tipit_event_type (i detyrueshëm)

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.

Burim i pjesshëm ndërveprimi i emetuar nga ngjarjet SSE të ciklit jetësor të ndërveprimit. Ngarkesat e ciklit jetësor të transmetimit mund të lënë jashtë fushat që janë të disponueshme vetëm në përgjigjet e plota të Ndërveprimit jo-transmetuese.

Fushat

varg agjenti (opsional)

Agjenti me të cilin duhet të ndërveprohet.

varg i krijuar (opsional)

Vetëm rezultati. Koha në të cilën u krijua përgjigja në formatin ISO 8601.

vargu i identifikimit (opsional)

E detyrueshme. Vetëm rezultat. Një identifikues unik për përfundimin e ndërveprimit.

varg modeli (opsional)

Modeli që do të plotësojë kërkesën tuaj.

varg objekti (opsional)

Vetëm rezultati. Lloji i burimit.

numërimi i statusit (varg) (opsional)

E detyrueshme. Vetëm rezultat. Statusi i ndërveprimit.

Vlerat e mundshme:

  • in_progress

    Ndërveprimi është në zhvillim e sipër.

  • requires_action

    Ndërveprimi kërkon veprim/input nga përdoruesi.

  • completed

    Ndërveprimi është përfunduar.

  • failed

    Ndërveprimi dështoi.

  • cancelled

    Ndërveprimi u anulua.

  • incomplete

    Ndërveprimi është përfunduar, por përmban rezultate të paplota (p.sh., duke shtypur max_tokens).

vargu i hapave ( Hapi ) (opsional)

Vetëm rezultati. Hapat që përbëjnë ndërveprimin, nëse përfshihen në këtë ngjarje.

varg i përditësuar (opsional)

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.

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.

Numërimi i tokenëve për një modalitet të vetëm përgjigjeje.

Fushat

modaliteti ResponseModality (opsionale)

Modaliteti i lidhur me numërimin e tokenëve.

Vlerat e mundshme

  • text

    Tregon se modeli duhet të kthejë tekst.

  • image

    Tregon se modeli duhet të kthejë imazhe.

  • audio

    Tregon se modeli duhet të kthejë audio.

  • video

    Tregon se modeli duhet të kthejë videon.

  • document

    Tregon se modeli duhet të kthejë dokumente.

numër i plotë i tokenëve (opsionale)

Numri i tokenëve për modalitetin.

vargu grounding_tool_count (GroundingToolCount) (opsionale)

Numri i mjeteve të tokëzimit.

Numri i mjeteve të tokëzimit numërohet.

Fushat

numër i plotë (opsional)

Numri i mjeteve të tokëzimit numërohet.

tipi enum (string) (opsionale)

Lloji i mjetit të tokëzimit i lidhur me numërimin.

Vlerat e mundshme:

  • google_search

    Bazë me Kërkimin në Ueb të Google dhe Kërkimin e Imazheve, dhe Bazë në Ueb për Ndërmarrjet.

  • google_maps

    Tokëzimi me Google Maps.

vargu input_tokens_by_modality (ModalityTokens) (opsionale)

Një ndarje e përdorimit të tokenit të hyrjes sipas modalitetit.

Numërimi i tokenëve për një modalitet të vetëm përgjigjeje.

Fushat

modaliteti ResponseModality (opsionale)

Modaliteti i lidhur me numërimin e tokenëve.

Vlerat e mundshme

  • text

    Tregon se modeli duhet të kthejë tekst.

  • image

    Tregon se modeli duhet të kthejë imazhe.

  • audio

    Tregon se modeli duhet të kthejë audio.

  • video

    Tregon se modeli duhet të kthejë videon.

  • document

    Tregon se modeli duhet të kthejë dokumente.

numër i plotë i tokenëve (opsionale)

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.

Numërimi i tokenëve për një modalitet të vetëm përgjigjeje.

Fushat

modaliteti ResponseModality (opsionale)

Modaliteti i lidhur me numërimin e tokenëve.

Vlerat e mundshme

  • text

    Tregon se modeli duhet të kthejë tekst.

  • image

    Tregon se modeli duhet të kthejë imazhe.

  • audio

    Tregon se modeli duhet të kthejë audio.

  • video

    Tregon se modeli duhet të kthejë videon.

  • document

    Tregon se modeli duhet të kthejë dokumente.

numër i plotë i tokenëve (opsionale)

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.

Numërimi i tokenëve për një modalitet të vetëm përgjigjeje.

Fushat

modaliteti ResponseModality (opsionale)

Modaliteti i lidhur me numërimin e tokenëve.

Vlerat e mundshme

  • text

    Tregon se modeli duhet të kthejë tekst.

  • image

    Tregon se modeli duhet të kthejë imazhe.

  • audio

    Tregon se modeli duhet të kthejë audio.

  • video

    Tregon se modeli duhet të kthejë videon.

  • document

    Tregon se modeli duhet të kthejë dokumente.

numër i plotë i tokenëve (opsionale)

Numri i tokenëve për modalitetin.

total_cached_tokens numër i plotë (opsional)

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).

total_input_tokens numër i plotë (opsional)

Numri i tokenëve në kërkesë (konteksti).

total_output_tokens numër i plotë (opsional)

Numri total i tokenëve në të gjitha përgjigjet e gjeneruara.

total_thought_tokens numër i plotë (opsional)

Numri i tokenëve të mendimeve për modelet e të menduarit.

total_tokens numër i plotë (opsional)

Numri total i tokenëve për kërkesën e ndërveprimit (kërkesa + përgjigjet + tokenët e tjerë të brendshëm).

total_tool_use_tokens numër i plotë (opsional)

Numri i tokenëve të pranishëm në kërkesën/kërkesat e përdorimit të mjetit.

Ngjarje e Krijuar nga Ndërveprimi

vargu i identifikimit_të_eventit (opsional)

Shenja event_id që do të përdoret për të rifilluar rrjedhën e ndërveprimit, nga kjo ngjarje.

objekti i tipit_event_type (i detyrueshëm)

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.

Burim i pjesshëm ndërveprimi i emetuar nga ngjarjet SSE të ciklit jetësor të ndërveprimit. Ngarkesat e ciklit jetësor të transmetimit mund të lënë jashtë fushat që janë të disponueshme vetëm në përgjigjet e plota të Ndërveprimit jo-transmetuese.

Fushat

varg agjenti (opsional)

Agjenti me të cilin duhet të ndërveprohet.

varg i krijuar (opsional)

Vetëm rezultati. Koha në të cilën u krijua përgjigja në formatin ISO 8601.

vargu i identifikimit (opsional)

E detyrueshme. Vetëm rezultat. Një identifikues unik për përfundimin e ndërveprimit.

varg modeli (opsional)

Modeli që do të plotësojë kërkesën tuaj.

varg objekti (opsional)

Vetëm rezultati. Lloji i burimit.

numërimi i statusit (varg) (opsional)

E detyrueshme. Vetëm rezultat. Statusi i ndërveprimit.

Vlerat e mundshme:

  • in_progress

    Ndërveprimi është në zhvillim e sipër.

  • requires_action

    Ndërveprimi kërkon veprim/input nga përdoruesi.

  • completed

    Ndërveprimi është përfunduar.

  • failed

    Ndërveprimi dështoi.

  • cancelled

    Ndërveprimi u anulua.

  • incomplete

    Ndërveprimi është përfunduar, por përmban rezultate të paplota (p.sh., duke shtypur max_tokens).

vargu i hapave ( Hapi ) (opsional)

Vetëm rezultati. Hapat që përbëjnë ndërveprimin, nëse përfshihen në këtë ngjarje.

varg i përditësuar (opsional)

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.

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.

Numërimi i tokenëve për një modalitet të vetëm përgjigjeje.

Fushat

modaliteti ResponseModality (opsionale)

Modaliteti i lidhur me numërimin e tokenëve.

Vlerat e mundshme

  • text

    Tregon se modeli duhet të kthejë tekst.

  • image

    Tregon se modeli duhet të kthejë imazhe.

  • audio

    Tregon se modeli duhet të kthejë audio.

  • video

    Tregon se modeli duhet të kthejë videon.

  • document

    Tregon se modeli duhet të kthejë dokumente.

numër i plotë i tokenëve (opsionale)

Numri i tokenëve për modalitetin.

vargu grounding_tool_count (GroundingToolCount) (opsionale)

Numri i mjeteve të tokëzimit.

Numri i mjeteve të tokëzimit numërohet.

Fushat

numër i plotë (opsional)

Numri i mjeteve të tokëzimit numërohet.

tipi enum (string) (opsionale)

Lloji i mjetit të tokëzimit i lidhur me numërimin.

Vlerat e mundshme:

  • google_search

    Bazë me Kërkimin në Ueb të Google dhe Kërkimin e Imazheve, dhe Bazë në Ueb për Ndërmarrjet.

  • google_maps

    Tokëzimi me Google Maps.

vargu input_tokens_by_modality (ModalityTokens) (opsionale)

Një ndarje e përdorimit të tokenit të hyrjes sipas modalitetit.

Numërimi i tokenëve për një modalitet të vetëm përgjigjeje.

Fushat

modaliteti ResponseModality (opsionale)

Modaliteti i lidhur me numërimin e tokenëve.

Vlerat e mundshme

  • text

    Tregon se modeli duhet të kthejë tekst.

  • image

    Tregon se modeli duhet të kthejë imazhe.

  • audio

    Tregon se modeli duhet të kthejë audio.

  • video

    Tregon se modeli duhet të kthejë videon.

  • document

    Tregon se modeli duhet të kthejë dokumente.

numër i plotë i tokenëve (opsionale)

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.

Numërimi i tokenëve për një modalitet të vetëm përgjigjeje.

Fushat

modaliteti ResponseModality (opsionale)

Modaliteti i lidhur me numërimin e tokenëve.

Vlerat e mundshme

  • text

    Tregon se modeli duhet të kthejë tekst.

  • image

    Tregon se modeli duhet të kthejë imazhe.

  • audio

    Tregon se modeli duhet të kthejë audio.

  • video

    Tregon se modeli duhet të kthejë videon.

  • document

    Tregon se modeli duhet të kthejë dokumente.

numër i plotë i tokenëve (opsionale)

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.

Numërimi i tokenëve për një modalitet të vetëm përgjigjeje.

Fushat

modaliteti ResponseModality (opsionale)

Modaliteti i lidhur me numërimin e tokenëve.

Vlerat e mundshme

  • text

    Tregon se modeli duhet të kthejë tekst.

  • image

    Tregon se modeli duhet të kthejë imazhe.

  • audio

    Tregon se modeli duhet të kthejë audio.

  • video

    Tregon se modeli duhet të kthejë videon.

  • document

    Tregon se modeli duhet të kthejë dokumente.

numër i plotë i tokenëve (opsionale)

Numri i tokenëve për modalitetin.

total_cached_tokens numër i plotë (opsional)

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).

total_input_tokens numër i plotë (opsional)

Numri i tokenëve në kërkesë (konteksti).

total_output_tokens numër i plotë (opsional)

Numri total i tokenëve në të gjitha përgjigjet e gjeneruara.

total_thought_tokens numër i plotë (opsional)

Numri i tokenëve të mendimeve për modelet e të menduarit.

total_tokens numër i plotë (opsional)

Numri total i tokenëve për kërkesën e ndërveprimit (kërkesa + përgjigjet + tokenët e tjerë të brendshëm).

total_tool_use_tokens numër i plotë (opsional)

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

vargu i identifikimit_të_eventit (opsional)

Shenja event_id që do të përdoret për të rifilluar rrjedhën e ndërveprimit, nga kjo ngjarje.

objekti i tipit_event_type (i detyrueshëm)

Nuk është dhënë përshkrim.

Gjithmonë i vendosur në "interaction.status_update" .

vargu interaction_id (i detyrueshëm)

Nuk është dhënë përshkrim.

numërimi i statusit (varg) (i detyrueshëm)

Nuk është dhënë përshkrim.

Vlerat e mundshme:

  • in_progress

    Ndërveprimi është në zhvillim e sipër.

  • requires_action

    Ndërveprimi kërkon veprim/input nga përdoruesi.

  • completed

    Ndërveprimi është përfunduar.

  • failed

    Ndërveprimi dështoi.

  • cancelled

    Ndërveprimi u anulua.

  • incomplete

    Ndë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

varg argumentesh (opsional)

Nuk është dhënë përshkrim.

lloji i objektit (i detyrueshëm)

Nuk është dhënë përshkrim.

Gjithmonë i vendosur në "arguments_delta" .

AudioDelta

numër i plotë i kanaleve (opsionale)

Numri i kanaleve audio.

varg të dhënash (opsionale)

Nuk është dhënë përshkrim.

mime_type enum (string) (opsionale)

Nuk është dhënë përshkrim.

Vlerat e mundshme:

  • audio/wav

    Formati audio WAV

  • audio/mp3

    Formati audio MP3

  • audio/aiff

    Formati audio AIFF

  • audio/aac

    Formati audio AAC

  • audio/ogg

    Formati audio OGG

  • audio/flac

    Formati audio FLAC

  • audio/mpeg

    Formati audio MPEG

  • audio/m4a

    Formati audio M4A

  • audio/l16

    Formati audio L16

  • audio/opus

    Formati audio OPUS

  • audio/alaw

    Formati audio ALAW

  • audio/mulaw

    Formati audio MULAW

numër i plotë i shkallës së_sample-it (opsional)

Shpejtësia e mostrës së audios.

lloji i objektit (i detyrueshëm)

Nuk është dhënë përshkrim.

Gjithmonë i vendosur në "audio" .

vargu uri (opsional)

Nuk është dhënë përshkrim.

CodeExecutionCallDelta

argumentet CodeExecutionCallArguments (e detyrueshme)

Nuk është dhënë përshkrim.

Argumentet për t'i kaluar ekzekutimit të kodit.

Fushat

varg kodi (opsional)

Kodi që do të ekzekutohet.

enumimi i gjuhës (string) (opsional)

Gjuha e programimit të `kodit`.

Vlerat e mundshme:

  • python

    Python >= 3.10, me numpy dhe simpy të disponueshëm.

varg nënshkrimi (opsional)

Një hash nënshkrimi për validimin e backend-it.

lloji i objektit (i detyrueshëm)

Nuk është dhënë përshkrim.

Gjithmonë i vendosur në "code_execution_call" .

CodeExecutionResultDelta

is_error boolean (opsionale)

Nuk është dhënë përshkrim.

varg rezultati (i detyrueshëm)

Nuk është dhënë përshkrim.

varg nënshkrimi (opsional)

Një hash nënshkrimi për validimin e backend-it.

lloji i objektit (i detyrueshëm)

Nuk është dhënë përshkrim.

Gjithmonë i vendosur në "code_execution_result" .

DocumentDelta

varg të dhënash (opsionale)

Nuk është dhënë përshkrim.

mime_type enum (string) (opsionale)

Nuk është dhënë përshkrim.

Vlerat e mundshme:

  • application/pdf

    Formati i dokumentit PDF

  • text/csv

    Formati i dokumentit CSV

lloji i objektit (i detyrueshëm)

Nuk është dhënë përshkrim.

Always set to "document" .

uri string (optional)

No description provided.

FileSearchCallDelta

signature string (optional)

A signature hash for backend validation.

type object (required)

No description provided.

Always set to "file_search_call" .

FileSearchResultDelta

result array (FileSearchResult) (required)

No description provided.

The result of the File Search.

signature string (optional)

A signature hash for backend validation.

type object (required)

No description provided.

Always set to "file_search_result" .

FunctionResultDelta

call_id string (required)

Required. ID to match the ID from the function call block.

is_error boolean (optional)

No description provided.

name string (optional)

No description provided.

result array ( ImageContent or TextContent ) or object or string (required)

No description provided.

type object (required)

No description provided.

Always set to "function_result" .

GoogleMapsCallDelta

arguments GoogleMapsCallArguments (optional)

The arguments to pass to the Google Maps tool.

The arguments to pass to the Google Maps tool.

Fushat

queries array (string) (optional)

The queries to be executed.

signature string (optional)

A signature hash for backend validation.

type object (required)

No description provided.

Always set to "google_maps_call" .

GoogleMapsResultDelta

result array (GoogleMapsResult) (optional)

The results of the Google Maps.

The result of the Google Maps.

Fushat

places array (Places) (optional)

The places that were found.

Fushat

name string (optional)

Title of the place.

place_id string (optional)

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.

Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps.

Fushat

review_id string (optional)

The ID of the review snippet.

title string (optional)

Title of the review.

url string (optional)

A link that corresponds to the user review on Google Maps.

url string (optional)

URI reference of the place.

widget_context_token string (optional)

Resource name of the Google Maps widget context token.

signature string (optional)

A signature hash for backend validation.

type object (required)

No description provided.

Always set to "google_maps_result" .

GoogleSearchCallDelta

arguments GoogleSearchCallArguments (required)

No description provided.

The arguments to pass to Google Search.

Fushat

queries array (string) (optional)

Web search queries for the following-up web search.

signature string (optional)

A signature hash for backend validation.

type object (required)

No description provided.

Always set to "google_search_call" .

GoogleSearchResultDelta

is_error boolean (optional)

No description provided.

result array (GoogleSearchResult) (required)

No description provided.

The result of the Google Search.

Fushat

search_suggestions string (optional)

Web content snippet that can be embedded in a web page or an app webview.

signature string (optional)

A signature hash for backend validation.

type object (required)

No description provided.

Always set to "google_search_result" .

ImageDelta

data string (optional)

No description provided.

mime_type enum (string) (optional)

No description provided.

Possible values:

  • image/png

    PNG image format

  • image/jpeg

    JPEG image format

  • image/webp

    WebP image format

  • image/heic

    HEIC image format

  • image/heif

    HEIF image format

  • image/gif

    GIF image format

  • image/bmp

    BMP image format

  • image/tiff

    TIFF image format

resolution MediaResolution (optional)

The resolution of the media.

Vlerat e mundshme

  • low

    Low resolution.

  • medium

    Medium resolution.

  • high

    High resolution.

  • ultra_high

    Ultra high resolution.

type object (required)

No description provided.

Always set to "image" .

uri string (optional)

No description provided.

TextAnnotationDelta

annotations array (Annotation) (optional)

Citation information for model-generated content.

Citation information for model-generated content.

Possible Types

FileCitation

A file citation annotation.

custom_metadata object (optional)

User provided metadata about the retrieved context.

document_uri string (optional)

The URI of the file.

end_index integer (optional)

End of the attributed segment, exclusive.

file_name string (optional)

The name of the file.

media_id string (optional)

Media ID in-case of image citations, if applicable.

page_number integer (optional)

Page number of the cited document, if applicable.

source string (optional)

Source attributed for a portion of the text.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

type object (required)

No description provided.

Always set to "file_citation" .

PlaceCitation

A place citation annotation.

end_index integer (optional)

End of the attributed segment, exclusive.

name string (optional)

Title of the place.

place_id string (optional)

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.

Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps.

Fushat

review_id string (optional)

The ID of the review snippet.

title string (optional)

Title of the review.

url string (optional)

A link that corresponds to the user review on Google Maps.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

type object (required)

No description provided.

Always set to "place_citation" .

url string (optional)

URI reference of the place.

UrlCitation

A URL citation annotation.

end_index integer (optional)

End of the attributed segment, exclusive.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

title string (optional)

The title of the URL.

type object (required)

No description provided.

Always set to "url_citation" .

url string (optional)

The URL.

type object (required)

No description provided.

Always set to "text_annotation_delta" .

TextDelta

text string (required)

No description provided.

type object (required)

No description provided.

Always set to "text" .

ThoughtSignatureDelta

signature string (optional)

Signature to match the backend source to be part of the generation.

type object (required)

No description provided.

Always set to "thought_signature" .

ThoughtSummaryDelta

content Content (optional)

A new summary item to be added to the thought.

type object (required)

No description provided.

Always set to "thought_summary" .

UrlContextCallDelta

arguments UrlContextCallArguments (required)

No description provided.

The arguments to pass to the URL context.

Fushat

urls array (string) (optional)

The URLs to fetch.

signature string (optional)

A signature hash for backend validation.

type object (required)

No description provided.

Always set to "url_context_call" .

UrlContextResultDelta

is_error boolean (optional)

No description provided.

result array (UrlContextResult) (required)

No description provided.

The result of the URL context.

Fushat

status enum (string) (optional)

The status of the URL retrieval.

Possible values:

  • success

    Url retrieval is successful.

  • error

    Url retrieval is failed due to error.

  • paywall

    Url retrieval is failed because the content is behind paywall.

  • unsafe

    Url retrieval is failed because the content is unsafe.

url string (optional)

The URL that was fetched.

signature string (optional)

A signature hash for backend validation.

type object (required)

No description provided.

Always set to "url_context_result" .

event_id string (optional)

The event_id token to be used to resume the interaction stream, from this event.

event_type object (required)

No description provided.

Always set to "step.delta" .

index integer (required)

No description provided.

metadata StepDeltaMetadata (optional)

No description provided.

Optional metadata accompanying ANY streamed event.

Fushat

total_usage Usage (optional)

Statistics on the interaction request's token usage.

Statistics on the interaction request's token usage.

Fushat

cached_tokens_by_modality array (ModalityTokens) (optional)

A breakdown of cached token usage by modality.

The token count for a single response modality.

Fushat

modality ResponseModality (optional)

The modality associated with the token count.

Vlerat e mundshme

  • text

    Indicates the model should return text.

  • image

    Indicates the model should return images.

  • audio

    Indicates the model should return audio.

  • video

    Indicates the model should return video.

  • document

    Indicates the model should return documents.

tokens integer (optional)

Number of tokens for the modality.

grounding_tool_count array (GroundingToolCount) (optional)

Grounding tool count.

The number of grounding tool counts.

Fushat

count integer (optional)

The number of grounding tool counts.

type enum (string) (optional)

The grounding tool type associated with the count.

Possible values:

  • google_search

    Grounding with Google Web Search and Image Search, & Web Grounding for Enterprise.

  • google_maps

    Grounding with Google Maps.

input_tokens_by_modality array (ModalityTokens) (optional)

A breakdown of input token usage by modality.

The token count for a single response modality.

Fushat

modality ResponseModality (optional)

The modality associated with the token count.

Vlerat e mundshme

  • text

    Indicates the model should return text.

  • image

    Indicates the model should return images.

  • audio

    Indicates the model should return audio.

  • video

    Indicates the model should return video.

  • document

    Indicates the model should return documents.

tokens integer (optional)

Number of tokens for the modality.

output_tokens_by_modality array (ModalityTokens) (optional)

A breakdown of output token usage by modality.

The token count for a single response modality.

Fushat

modality ResponseModality (optional)

The modality associated with the token count.

Vlerat e mundshme

  • text

    Indicates the model should return text.

  • image

    Indicates the model should return images.

  • audio

    Indicates the model should return audio.

  • video

    Indicates the model should return video.

  • document

    Indicates the model should return documents.

tokens integer (optional)

Number of tokens for the modality.

tool_use_tokens_by_modality array (ModalityTokens) (optional)

A breakdown of tool-use token usage by modality.

The token count for a single response modality.

Fushat

modality ResponseModality (optional)

The modality associated with the token count.

Vlerat e mundshme

  • text

    Indicates the model should return text.

  • image

    Indicates the model should return images.

  • audio

    Indicates the model should return audio.

  • video

    Indicates the model should return video.

  • document

    Indicates the model should return documents.

tokens integer (optional)

Number of tokens for the modality.

total_cached_tokens integer (optional)

Number of tokens in the cached part of the prompt (the cached content).

total_input_tokens integer (optional)

Number of tokens in the prompt (context).

total_output_tokens integer (optional)

Total number of tokens across all the generated responses.

total_thought_tokens integer (optional)

Number of tokens of thoughts for thinking models.

total_tokens integer (optional)

Total token count for the interaction request (prompt + responses + other internal tokens).

total_tool_use_tokens integer (optional)

Number of tokens present in tool-use prompt(s).

StepStart

event_id string (optional)

The event_id token to be used to resume the interaction stream, from this event.

event_type object (required)

No description provided.

Always set to "step.start" .

index integer (required)

No description provided.

step Step (required)

No description provided.

StepStop

event_id string (optional)

The event_id token to be used to resume the interaction stream, from this event.

event_type object (required)

No description provided.

Always set to "step.stop" .

index integer (required)

No description provided.

step_usage Usage (optional)

Model usage stats for this specific step.

Statistics on the interaction request's token usage.

Fushat

cached_tokens_by_modality array (ModalityTokens) (optional)

A breakdown of cached token usage by modality.

The token count for a single response modality.

Fushat

modality ResponseModality (optional)

The modality associated with the token count.

Vlerat e mundshme

  • text

    Indicates the model should return text.

  • image

    Indicates the model should return images.

  • audio

    Indicates the model should return audio.

  • video

    Indicates the model should return video.

  • document

    Indicates the model should return documents.

tokens integer (optional)

Number of tokens for the modality.

grounding_tool_count array (GroundingToolCount) (optional)

Grounding tool count.

The number of grounding tool counts.

Fushat

count integer (optional)

The number of grounding tool counts.

type enum (string) (optional)

The grounding tool type associated with the count.

Possible values:

  • google_search

    Grounding with Google Web Search and Image Search, & Web Grounding for Enterprise.

  • google_maps

    Grounding with Google Maps.

input_tokens_by_modality array (ModalityTokens) (optional)

A breakdown of input token usage by modality.

The token count for a single response modality.

Fushat

modality ResponseModality (optional)

The modality associated with the token count.

Vlerat e mundshme

  • text

    Indicates the model should return text.

  • image

    Indicates the model should return images.

  • audio

    Indicates the model should return audio.

  • video

    Indicates the model should return video.

  • document

    Indicates the model should return documents.

tokens integer (optional)

Number of tokens for the modality.

output_tokens_by_modality array (ModalityTokens) (optional)

A breakdown of output token usage by modality.

The token count for a single response modality.

Fushat

modality ResponseModality (optional)

The modality associated with the token count.

Vlerat e mundshme

  • text

    Indicates the model should return text.

  • image

    Indicates the model should return images.

  • audio

    Indicates the model should return audio.

  • video

    Indicates the model should return video.

  • document

    Indicates the model should return documents.

tokens integer (optional)

Number of tokens for the modality.

tool_use_tokens_by_modality array (ModalityTokens) (optional)

A breakdown of tool-use token usage by modality.

The token count for a single response modality.

Fushat

modality ResponseModality (optional)

The modality associated with the token count.

Vlerat e mundshme

  • text

    Indicates the model should return text.

  • image

    Indicates the model should return images.

  • audio

    Indicates the model should return audio.

  • video

    Indicates the model should return video.

  • document

    Indicates the model should return documents.

tokens integer (optional)

Number of tokens for the modality.

total_cached_tokens integer (optional)

Number of tokens in the cached part of the prompt (the cached content).

total_input_tokens integer (optional)

Number of tokens in the prompt (context).

total_output_tokens integer (optional)

Total number of tokens across all the generated responses.

total_thought_tokens integer (optional)

Number of tokens of thoughts for thinking models.

total_tokens integer (optional)

Total token count for the interaction request (prompt + responses + other internal tokens).

total_tool_use_tokens integer (optional)

Number of tokens present in tool-use prompt(s).

usage Usage (optional)

Cumulative model usage stats from the start of the session.

Statistics on the interaction request's token usage.

Fushat

cached_tokens_by_modality array (ModalityTokens) (optional)

A breakdown of cached token usage by modality.

The token count for a single response modality.

Fushat

modality ResponseModality (optional)

The modality associated with the token count.

Vlerat e mundshme

  • text

    Indicates the model should return text.

  • image

    Indicates the model should return images.

  • audio

    Indicates the model should return audio.

  • video

    Indicates the model should return video.

  • document

    Indicates the model should return documents.

tokens integer (optional)

Number of tokens for the modality.

grounding_tool_count array (GroundingToolCount) (optional)

Grounding tool count.

The number of grounding tool counts.

Fushat

count integer (optional)

The number of grounding tool counts.

type enum (string) (optional)

The grounding tool type associated with the count.

Possible values:

  • google_search

    Grounding with Google Web Search and Image Search, & Web Grounding for Enterprise.

  • google_maps

    Grounding with Google Maps.

input_tokens_by_modality array (ModalityTokens) (optional)

A breakdown of input token usage by modality.

The token count for a single response modality.

Fushat

modality ResponseModality (optional)

The modality associated with the token count.

Vlerat e mundshme

  • text

    Indicates the model should return text.

  • image

    Indicates the model should return images.

  • audio

    Indicates the model should return audio.

  • video

    Indicates the model should return video.

  • document

    Indicates the model should return documents.

tokens integer (optional)

Number of tokens for the modality.

output_tokens_by_modality array (ModalityTokens) (optional)

A breakdown of output token usage by modality.

The token count for a single response modality.

Fushat

modality ResponseModality (optional)

The modality associated with the token count.

Vlerat e mundshme

  • text

    Indicates the model should return text.

  • image

    Indicates the model should return images.

  • audio

    Indicates the model should return audio.

  • video

    Indicates the model should return video.

  • document

    Indicates the model should return documents.

tokens integer (optional)

Number of tokens for the modality.

tool_use_tokens_by_modality array (ModalityTokens) (optional)

A breakdown of tool-use token usage by modality.

The token count for a single response modality.

Fushat

modality ResponseModality (optional)

The modality associated with the token count.

Vlerat e mundshme

  • text

    Indicates the model should return text.

  • image

    Indicates the model should return images.

  • audio

    Indicates the model should return audio.

  • video

    Indicates the model should return video.

  • document

    Indicates the model should return documents.

tokens integer (optional)

Number of tokens for the modality.

total_cached_tokens integer (optional)

Number of tokens in the cached part of the prompt (the cached content).

total_input_tokens integer (optional)

Number of tokens in the prompt (context).

total_output_tokens integer (optional)

Total number of tokens across all the generated responses.

total_thought_tokens integer (optional)

Number of tokens of thoughts for thinking models.

total_tokens integer (optional)

Total token count for the interaction request (prompt + responses + other internal tokens).

total_tool_use_tokens integer (optional)

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 integer (optional)

Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).

delivery enum (string) (optional)

The delivery mode for the audio output.

Possible values:

  • inline

    Audio data is returned inline in the response.

  • uri

    Audio data is returned as a URI.

mime_type enum (string) (optional)

The MIME type of the audio output.

Possible values:

  • audio/mp3

    MP3 audio format.

  • audio/ogg_opus

    OGG Opus audio format.

  • audio/l16

    Raw PCM (L16) audio format.

  • audio/wav

    WAV audio format.

  • audio/alaw

    A-law audio format.

  • audio/mulaw

    Mu-law audio format.

sample_rate integer (optional)

Sample rate in Hz.

type object (required)

No description provided.

Always set to "audio" .

ImageResponseFormat

Configuration for image output format.

aspect_ratio enum (string) (optional)

The aspect ratio for the image output.

Possible values:

  • 1:1

    1:1 aspect ratio.

  • 2:3

    2:3 aspect ratio.

  • 3:2

    3:2 aspect ratio.

  • 3:4

    3:4 aspect ratio.

  • 4:3

    4:3 aspect ratio.

  • 4:5

    4:5 aspect ratio.

  • 5:4

    5:4 aspect ratio.

  • 9:16

    9:16 aspect ratio.

  • 16:9

    16:9 aspect ratio.

  • 21:9

    21:9 aspect ratio.

  • 1:8

    1:8 aspect ratio.

  • 8:1

    8:1 aspect ratio.

  • 1:4

    1:4 aspect ratio.

  • 4:1

    4:1 aspect ratio.

delivery enum (string) (optional)

The delivery mode for the image output.

Possible values:

  • inline

    Image data is returned inline in the response.

  • uri

    Image data is returned as a URI.

image_size enum (string) (optional)

The size of the image output.

Possible values:

  • 512

    512px image size.

  • 1K

    1K image size.

  • 2K

    2K image size.

  • 4K

    4K image size.

mime_type enum (string) (optional)

The MIME type of the image output.

Possible values:

  • image/jpeg

    JPEG image format.

type object (required)

No description provided.

Always set to "image" .

TextResponseFormat

Configuration for text output format.

mime_type enum (string) (optional)

The MIME type of the text output.

Possible values:

  • application/json

    JSON output format.

  • text/plain

    Plain text output format.

schema object (optional)

The JSON schema that the output should conform to. Only applicable when mime_type is application/json.

type object (required)

No description provided.

Always set to "text" .

VideoResponseFormat

Configuration for video output format.

aspect_ratio enum (string) (optional)

The aspect ratio for the video output.

Possible values:

  • 16:9

    16:9 aspect ratio.

  • 9:16

    9:16 aspect ratio.

delivery enum (string) (optional)

The delivery mode for the video output.

Possible values:

  • inline

    Video data is returned inline in the response.

  • uri

    Video data is returned as a URI.

duration string (optional)

The duration for the video output.

resolution enum (string) (optional)

The video output resolution. Defaults to 720p.

Possible values:

  • 360p

    360p resolution.

  • 720p

    Rezolucion 720p.

  • 1080p

    1080p resolution.

  • 4k

    4K resolution.

type object (required)

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.

The arguments to pass to the code execution.

Fushat

code string (optional)

The code to be executed.

language enum (string) (optional)

Programming language of the `code`.

Possible values:

  • python

    Python >= 3.10, with numpy and simpy available.

id string (required)

Required. A unique ID for this specific tool call.

signature string (optional)

A signature hash for backend validation.

type object (required)

No description provided.

Always set to "code_execution_call" .

CodeExecutionResultStep

Code execution result step.

call_id string (required)

Required. ID to match the ID from the function call block.

is_error boolean (optional)

Whether the code execution resulted in an error.

result string (optional)

The output of the code execution.

signature string (optional)

A signature hash for backend validation.

type object (required)

No description provided.

Always set to "code_execution_result" .

FileSearchCallStep

File Search call step.

id string (required)

Required. A unique ID for this specific tool call.

signature string (optional)

A signature hash for backend validation.

type object (required)

No description provided.

Always set to "file_search_call" .

FileSearchResultStep

File Search result step.

call_id string (required)

Required. ID to match the ID from the function call block.

signature string (optional)

A signature hash for backend validation.

type object (required)

No description provided.

Always set to "file_search_result" .

FunctionCallStep

A function tool call step.

arguments object (required)

Required. The arguments to pass to the function.

id string (required)

Required. A unique ID for this specific tool call.

name string (required)

Required. The name of the tool to call.

type object (required)

No description provided.

Always set to "function_call" .

FunctionResultStep

Result of a function tool call.

call_id string (required)

Required. ID to match the ID from the function call block.

is_error boolean (optional)

Whether the tool call resulted in an error.

name string (optional)

The name of the tool that was called.

result array ( ImageContent or TextContent ) or object or string (required)

Required. The result of the tool call.

type object (required)

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.

The arguments to pass to the Google Maps tool.

Fushat

queries array (string) (optional)

The queries to be executed.

id string (required)

Required. A unique ID for this specific tool call.

signature string (optional)

A signature hash for backend validation.

type object (required)

No description provided.

Always set to "google_maps_call" .

GoogleMapsResultStep

Google Maps result step.

call_id string (required)

Required. ID to match the ID from the function call block.

result array (GoogleMapsResultItem) (optional)

No description provided.

The result of the Google Maps.

Fushat

places array (GoogleMapsResultPlaces) (optional)

No description provided.

Fushat

name string (optional)

No description provided.

place_id string (optional)

No description provided.

review_snippets array (ReviewSnippet) (optional)

No description provided.

Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps.

Fushat

review_id string (optional)

The ID of the review snippet.

title string (optional)

Title of the review.

url string (optional)

A link that corresponds to the user review on Google Maps.

url string (optional)

No description provided.

widget_context_token string (optional)

No description provided.

signature string (optional)

A signature hash for backend validation.

type object (required)

No description provided.

Always set to "google_maps_result" .

GoogleSearchCallStep

Google Search call step.

arguments GoogleSearchCallStepArguments (optional)

The arguments to pass to Google Search.

The arguments to pass to Google Search.

Fushat

queries array (string) (optional)

Web search queries for the following-up web search.

id string (required)

Required. A unique ID for this specific tool call.

search_type enum (string) (optional)

The type of search grounding enabled.

Possible values:

  • web_search

    Setting this field enables web search. Only text results are returned.

  • image_search

    Setting this field enables image search. Image bytes are returned.

signature string (optional)

A signature hash for backend validation.

type object (required)

No description provided.

Always set to "google_search_call" .

GoogleSearchResultStep

Google Search result step.

call_id string (required)

Required. ID to match the ID from the function call block.

is_error boolean (optional)

Whether the Google Search resulted in an error.

result array (GoogleSearchResultItem) (optional)

The results of the Google Search.

The result of the Google Search.

Fushat

search_suggestions string (optional)

Web content snippet that can be embedded in a web page or an app webview.

signature string (optional)

A signature hash for backend validation.

type object (required)

No description provided.

Always set to "google_search_result" .

ModelOutputStep

Output generated by the model.

content array ( Content ) (optional)

No description provided.

type object (required)

No description provided.

Always set to "model_output" .

ThoughtStep

A thought step.

signature string (optional)

A signature hash for backend validation.

summary array ( Content ) (optional)

A summary of the thought.

type object (required)

No description provided.

Always set to "thought" .

UrlContextCallStep

URL context call step.

arguments UrlContextCallArguments (optional)

The arguments to pass to the URL context.

The arguments to pass to the URL context.

Fushat

urls array (string) (optional)

The URLs to fetch.

id string (required)

Required. A unique ID for this specific tool call.

signature string (optional)

A signature hash for backend validation.

type object (required)

No description provided.

Always set to "url_context_call" .

UrlContextResultStep

URL context result step.

call_id string (required)

Required. ID to match the ID from the function call block.

is_error boolean (optional)

Whether the URL context resulted in an error.

result array (UrlContextResult) (optional)

The results of the URL context.

The result of the URL context.

Fushat

status enum (string) (optional)

The status of the URL retrieval.

Possible values:

  • success

    Url retrieval is successful.

  • error

    Url retrieval is failed due to error.

  • paywall

    Url retrieval is failed because the content is behind paywall.

  • unsafe

    Url retrieval is failed because the content is unsafe.

url string (optional)

The URL that was fetched.

signature string (optional)

A signature hash for backend validation.

type object (required)

No description provided.

Always set to "url_context_result" .

UserInputStep

Input provided by the user.

content array ( Content ) (optional)

No description provided.

type object (required)

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.

The configuration for allowed tools.

Fushat

mode enum (string) (optional)

The mode of the tool choice.

Possible values:

  • auto

    Auto tool choice.

  • any

    Any tool choice.

  • none

    No tool choice.

  • validated

    Validated tool choice.

tools array (string) (optional)

The names of the allowed tools.

Shembuj

Shembull

{
  "allowed_tools": {
    "mode": "any",
    "tools": [
      "my_tool"
    ]
  }
}

ImageContent

An image content block.

Fushat

data string (optional)

The image content.

mime_type enum (string) (optional)

The mime type of the image.

Possible values:

  • image/png

    PNG image format

  • image/jpeg

    JPEG image format

  • image/webp

    WebP image format

  • image/heic

    HEIC image format

  • image/heif

    HEIF image format

  • image/gif

    GIF image format

  • image/bmp

    BMP image format

  • image/tiff

    TIFF image format

resolution MediaResolution (optional)

The resolution of the media.

Vlerat e mundshme

  • low

    Low resolution.

  • medium

    Medium resolution.

  • high

    High resolution.

  • ultra_high

    Ultra high resolution.

type object (optional)

No description provided.

Always set to "image" .

uri string (optional)

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.

Citation information for model-generated content.

Possible Types

FileCitation

A file citation annotation.

custom_metadata object (optional)

User provided metadata about the retrieved context.

document_uri string (optional)

The URI of the file.

end_index integer (optional)

End of the attributed segment, exclusive.

file_name string (optional)

The name of the file.

media_id string (optional)

Media ID in-case of image citations, if applicable.

page_number integer (optional)

Page number of the cited document, if applicable.

source string (optional)

Source attributed for a portion of the text.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

type object (required)

No description provided.

Always set to "file_citation" .

PlaceCitation

A place citation annotation.

end_index integer (optional)

End of the attributed segment, exclusive.

name string (optional)

Title of the place.

place_id string (optional)

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.

Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps.

Fushat

review_id string (optional)

The ID of the review snippet.

title string (optional)

Title of the review.

url string (optional)

A link that corresponds to the user review on Google Maps.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

type object (required)

No description provided.

Always set to "place_citation" .

url string (optional)

URI reference of the place.

UrlCitation

A URL citation annotation.

end_index integer (optional)

End of the attributed segment, exclusive.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

title string (optional)

The title of the URL.

type object (required)

No description provided.

Always set to "url_citation" .

url string (optional)

The URL.

text string (optional)

Required. The text content.

type object (optional)

No description provided.

Always set to "text" .

Shembuj

Tekst

{
  "type": "text",
  "text": "Hello, how are you?"
}