Skip to main content
POST
Gemini Streaming Chat

Authorizations

x-goog-api-key
string
header
required

Pass an API Key obtained from AiToEarn. For Gemini SDK compatibility, this endpoint uses the x-goog-api-key request header; a Google Gemini API Key is not required.

Path Parameters

model
string
default:gemini-3.5-flash
required

Model ID. First call the "Conversation Model List" interface (GET /api/ai/models/chat) and pass in the data[n].name returned by it.

Example:

"gemini-3.5-flash"

Body

application/json
model
string
required

Model ID, consistent with the path parameter model. The value comes from data[n].name returned by the "Conversation Model List" interface.

Example:

"gemini-3.5-flash"

contents
object[]
required

Contents list

config
object

Generate configuration

Response

200 - text/event-stream

Native third-party protocol response or SSE data, not wrapped in the AiToEarn common response envelope.

SSE streaming response.

Last modified on July 31, 2026