Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.anyfast.ai/llms.txt

Use this file to discover all available pages before exploring further.

Gemini 2.5 Pro (Stream) provides streaming text generation using Google’s Gemini 2.5 Pro model via Anyfast. Responses are delivered in real-time using Server-Sent Events (SSE).

Key capabilities

  • SSE Streaming — Real-time token-by-token response delivery
  • Thinking mode — Supports thinking configuration for enhanced reasoning
  • Multi-turn conversations — Handles complex dialogue with system instructions
  • Safety settings — Configurable content safety filters

Quick example

curl "https://www.anyfast.ai/v1beta/models/gemini-2.5-pro:streamGenerateContent?key=YOUR_API_KEY&alt=sse" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {
        "role": "user",
        "parts": [{ "text": "Write a short poem about the ocean." }]
      }
    ],
    "generationConfig": {
      "temperature": 1,
      "topP": 1,
      "thinkingConfig": {
        "includeThoughts": true,
        "thinkingBudget": 26240
      }
    }
  }'

Parameters

ParameterTypeRequiredDescription
keystringYesAPI key (query parameter)
altstringNoSet to sse for SSE streaming
contentsarrayYesArray of { role, parts } objects
systemInstructionobjectNoSystem instruction with parts array
generationConfig.temperaturefloatNo02. Controls randomness. Default: 1
generationConfig.topPfloatNoNucleus sampling threshold. Default: 1
generationConfig.thinkingConfigobjectNoThinking mode configuration
safetySettingsarrayNoContent safety filter settings

API Reference

View the interactive API playground for Gemini 2.5 Pro (Stream).