mMengbi Router

API / GEMINI

Gemini native

Call available Google models through the native Gemini endpoints.

!

This page is the preview integration contract for individual Mengbi Router users. Examples will remain compatible when the production gateway opens.

01 /

Gemini native

Gemini CLI and native Gemini SDKs can use the Gemini-style path and request body.

Generate content

POST /v1beta/models/{model}:generateContent
bash
curl https://router-api.mengbi-ai.net/v1beta/models/gemini-3.6-flash:generateContent \
  -H "Authorization: Bearer sk-mengbi-xxxxxx" \
  -H "content-type: application/json" \
  -d '{
    "contents": [{
      "role": "user",
      "parts": [{"text": "Introduce yourself in one sentence"}]
    }]
  }'

Streaming and environment variables

Use streamGenerateContent with alt=sse for streaming. Different Gemini clients may use different field names for a custom Base URL.

bash
curl "https://router-api.mengbi-ai.net/v1beta/models/gemini-3.6-flash:streamGenerateContent?alt=sse" \
  -H "Authorization: Bearer sk-mengbi-xxxxxx" \
  -H "content-type: application/json" \
  -d '{"contents": [{"role": "user", "parts": [{"text": "Hello"}]}]}'