when:
  path: /v1beta/models/gemini-3-flash-preview:streamGenerateContent
  method: POST
  query_param:
  - name: alt
    value: sse
  - name: key
    value: '[REDACTED]'
  header:
  - name: accept
    value: text/event-stream
  - name: content-type
    value: application/json
  body: '{"contents":[{"parts":[{"text":"Use the tool once, then answer with the dominant color in the returned image.","thought":false}],"role":"user"}],"generationConfig":{"maxOutputTokens":4096,"temperature":1.0},"safetySettings":null,"systemInstruction":{"parts":[{"text":"You are a precise assistant. Call `render_reference_image` exactly once before answering. After the tool result arrives, do not call any more tools. Answer in one short sentence.","thought":false}],"role":"model"},"toolConfig":null,"tools":[{"codeExecution":null,"functionDeclarations":[{"description":"Return a reference image the assistant must inspect before answering.","name":"render_reference_image","parameters":{"properties":{},"required":[],"type":"object"}}]}]}'
then:
  status: 200
  header:
  - name: content-type
    value: text/event-stream
  body: "data: {\"candidates\":[{\"content\":{\"parts\":[{\"functionCall\":{\"args\":{},\"id\":\"eydqag09\",\"name\":\"render_reference_image\"},\"thoughtSignature\":\"signature_REDACTED_1\"}],\"role\":\"model\"},\"index\":0}],\"modelVersion\":\"gemini-3-flash-preview\",\"responseId\":\"id_REDACTED_1\",\"usageMetadata\":{\"candidatesTokenCount\":12,\"promptTokenCount\":90,\"promptTokensDetails\":[{\"modality\":\"TEXT\",\"tokenCount\":90}],\"serviceTier\":\"standard\",\"thoughtsTokenCount\":56,\"totalTokenCount\":158}}\r\n\r\ndata: {\"candidates\":[{\"content\":{\"parts\":[{\"text\":\"\"}],\"role\":\"model\"},\"finishReason\":\"STOP\",\"index\":0}],\"modelVersion\":\"gemini-3-flash-preview\",\"responseId\":\"id_REDACTED_1\",\"usageMetadata\":{\"candidatesTokenCount\":12,\"promptTokenCount\":90,\"promptTokensDetails\":[{\"modality\":\"TEXT\",\"tokenCount\":90}],\"serviceTier\":\"standard\",\"thoughtsTokenCount\":56,\"totalTokenCount\":158}}\r\n\r\n"
---
when:
  path: /v1beta/models/gemini-3-flash-preview:streamGenerateContent
  method: POST
  query_param:
  - name: alt
    value: sse
  - name: key
    value: '[REDACTED]'
  header:
  - name: accept
    value: text/event-stream
  - name: content-type
    value: application/json
  body: '{"contents":[{"parts":[{"text":"Use the tool once, then answer with the dominant color in the returned image.","thought":false}],"role":"user"},{"parts":[{"functionCall":{"args":{},"name":"render_reference_image"},"thought":false,"thoughtSignature":"signature_REDACTED_1"}],"role":"model"},{"parts":[{"functionResponse":{"name":"render_reference_image","parts":[{"inlineData":{"data":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==","mimeType":"image/png"}}],"response":{"result":{"instruction":"Use the image part to answer the user''s question."}}},"thought":false}],"role":"user"}],"generationConfig":{"maxOutputTokens":4096,"temperature":1.0},"safetySettings":null,"systemInstruction":{"parts":[{"text":"You are a precise assistant. Call `render_reference_image` exactly once before answering. After the tool result arrives, do not call any more tools. Answer in one short sentence.","thought":false}],"role":"model"},"toolConfig":null,"tools":[{"codeExecution":null,"functionDeclarations":[{"description":"Return a reference image the assistant must inspect before answering.","name":"render_reference_image","parameters":{"properties":{},"required":[],"type":"object"}}]}]}'
then:
  status: 200
  header:
  - name: content-type
    value: text/event-stream
  body: "data: {\"candidates\":[{\"content\":{\"parts\":[{\"text\":\"The dominant color in the image is red.\"}],\"role\":\"model\"},\"index\":0}],\"modelVersion\":\"gemini-3-flash-preview\",\"responseId\":\"id_REDACTED_2\",\"usageMetadata\":{\"candidatesTokenCount\":9,\"promptTokenCount\":131,\"promptTokensDetails\":[{\"modality\":\"TEXT\",\"tokenCount\":131}],\"serviceTier\":\"standard\",\"thoughtsTokenCount\":14,\"totalTokenCount\":154}}\r\n\r\ndata: {\"candidates\":[{\"content\":{\"parts\":[{\"text\":\"\",\"thoughtSignature\":\"signature_REDACTED_2\"}],\"role\":\"model\"},\"finishReason\":\"STOP\",\"index\":0}],\"modelVersion\":\"gemini-3-flash-preview\",\"responseId\":\"id_REDACTED_2\",\"usageMetadata\":{\"candidatesTokenCount\":9,\"promptTokenCount\":1276,\"promptTokensDetails\":[{\"modality\":\"TEXT\",\"tokenCount\":187},{\"modality\":\"IMAGE\",\"tokenCount\":1089}],\"serviceTier\":\"standard\",\"thoughtsTokenCount\":14,\"totalTokenCount\":1299}}\r\n\r\n"
