Skip to content
NewRouters/Documentation
LLM API

gemini-3.7-flash · API guide

Integrate gemini-3.7-flash through gemini. Request examples, parameters, authentication and result handling.

POST/v1beta/models/{model}:generateContentMODELgemini-3.7-flash
Official reference gemini-3.7-flashChecked 2026-09-27Official docs
Code examples & responses
Request & responseExamples
POST/v1beta/models/gemini-3.7-flash:generateContent
Server-side request
curl "https://newrouters.com/v1beta/models/gemini-3.7-flash:generateContent" \
  -H "Content-Type: application/json" \
  -H "x-goog-api-key: $API_KEY" \
  --data '{
  "contents": [
    {
      "role": "user",
      "parts": [
        {
          "text": "Explain how an HTTP request works in three concise steps."
        }
      ]
    }
  ],
  "generationConfig": {
    "maxOutputTokens": 1024
  }
}'

The API origin is filled in. Set API_KEY before running. Examples never submit automatically.

ResponseSelected fields · illustrative values
200Successful result
JSON
{
  "candidates": [
    {
      "content": {
        "role": "model",
        "parts": [
          {
            "text": "..."
          }
        ]
      },
      "finishReason": "STOP"
    }
  ]
}
Integration flowGemini · Native protocol
  1. Prepare a request01
    API key + model ID

    Use the model’s native protocol and authentication.

    SDK / HTTP
  2. Call the native API02
    POST /v1beta/models/{model}:generateContent

    Submit the request structure documented on this page.

    Gemini
  3. Read the response03
    candidates[].content

    Read model output from the native response.

    JSON

Use the exact API model ID gemini-3.7-flash. This guide describes the platform contract; check the live catalog before calling the model.

The platform origin is filled in at build time. Set API_KEY to your server-side key before running.

Terminal window
curl "https://newrouters.com/v1beta/models/gemini-3.7-flash:generateContent" \
-H "Content-Type: application/json" \
-H "x-goog-api-key: $API_KEY" \
--data '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Explain how an HTTP request works in three concise steps."
}
]
}
],
"generationConfig": {
"maxOutputTokens": 1024
}
}'

This model uses the gemini protocol. Read its native response and usage fields; do not wrap the request in the media task input envelope.

Supported endpoint templates:

  • POST /v1beta/models/{model}:generateContent
  • POST /v1beta/models/{model}:streamGenerateContent
  • POST /v1/interactions
  • POST /v1beta/interactions
LimitCatalog value
Context tokens128000
Maximum output tokens16384

For streaming, use the native protocol streaming option and parse its events; check supported capabilities in the live catalog.

Checked: 2026-09-27 · Platform model: gemini-3.7-flash · Official reference: gemini-3.7-flash

Check current availability, contract and account pricing before integration. Keep request IDs and usage receipts when diagnosing errors. Complete API reference