google

Google: Gemini 3.1 Flash Image Preview

models/Gemini 3.1 Flash Image Preview

High efficiency image generation model (Nano Banana 2). Optimized for speed and high volume use cases with conversational editing and character consistency.
Currency$USD
Input$0.10
Output$0.40
Context window1M

Generate API Key Generate your API Key to securely access IndoxHub's AI models. Integrate with OpenAI-compatible tools, run queries, and build powerful AI applications — all with a single secure key.
Endpoint
POSThttps://api.indoxhub.com/api/v1/chat/completions
Configgoogle/gemini-3.1-flash-image-preview
from indoxhub import Client
 
# Initialize the client
with Client(api_key="[LOGIN TO GET API KEY]") as client:
    # Generate a chat completion
    response = client.chat(
        messages=[{"role":"system","content":"You are a helpful assistant."},{"role":"user","content":"What is machine learning and why is it important?"}],
        model="google/gemini-3.1-flash-image-preview",
        temperature:"0.7"
    )
 
    # Print the response
    print(response["data"])