Skip to content
Astral Nexus/Documentation
GET STARTED

gemini-3.8-flash · API guide

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

POST/v1beta/models/{model}:generateContent
Official reference gemini-3.8-flashChecked 2026-09-27Official docs
Integration flowFrom setup to your first request
  1. Create an API key01
    API_KEY

    Create a key in the console and keep it on your server.

  2. Choose a model02
    Model ID + protocol

    Check the model and input requirements in the live catalog.

  3. Make your first call03
    Request → response

    Use the model’s request example and read the result.

Use the exact API model ID gemini-3.8-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://astralgames.ai/v1beta/models/gemini-3.8-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.8-flash · Official reference: gemini-3.8-flash

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