Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/phpaisdk/google/llms.txt

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

The aisdk/google package ships a resources/models.json catalog that maps model IDs to their capabilities. Rather than listing every specific Gemini release, the catalog uses wildcard patterns — for example, gemini-3* matches any model whose ID begins with gemini-3, such as gemini-3.5-flash or gemini-3.0-pro. This means the SDK automatically supports new Gemini releases in a known family without requiring a catalog update.

Text Models

These entries use wildcard patterns and cover all text-generation Gemini variants in each major family.
Model PatternStatusCapabilities
gemini-3*stabletext_generation, streaming, tool_calling, structured_output, reasoning, text_input, image_input, audio_input, file_input
gemini-2.5*stabletext_generation, streaming, tool_calling, structured_output, reasoning, text_input, image_input, audio_input, file_input
gemini-2.0*stabletext_generation, streaming, tool_calling, structured_output, text_input, image_input, audio_input, file_input
gemini-1.5*stabletext_generation, streaming, tool_calling, structured_output, text_input, image_input, audio_input, file_input
The gemini-3* and gemini-2.5* families include the reasoning capability, which exposes extended thinking / thinking tokens. The gemini-2.0* and gemini-1.5* families do not include reasoning.

Image Models

Image models are listed by their exact IDs rather than wildcard patterns, since each image model is a distinct offering.
Model IDStatusCapabilities
gemini-3.1-flash-lite-imagestableimage_generation, text_generation, text_input, image_input
gemini-3.1-flash-imagestableimage_generation, text_generation, text_input, image_input
gemini-3-pro-imagestableimage_generation, text_generation, text_input, image_input
gemini-2.5-flash-imagelegacyimage_generation, text_generation, text_input, image_input
gemini-2.5-flash-image has a legacy status. It remains supported but you should migrate to a stable image model such as gemini-3.1-flash-image when possible.

Wildcard Matching

The catalog resolves model IDs using glob-style prefix matching. When you call Google::model('gemini-3.5-flash'), the SDK checks the catalog for an entry whose id field matches — in this case, the gemini-3* wildcard matches first and its capabilities are used. If a model ID does not match any catalog entry (for example, an entirely unknown identifier), the SDK falls back to returning basic text generation support rather than throwing an error. This means you can pass an experimental model ID and still get a working TextGeneration capability, though no other capabilities will be reported. See the Capabilities reference for how this fallback is implemented.

Using Models

Instantiate a text model or an image model through the Google facade:
use AiSdk\Google;
use AiSdk\Generate;

// Text generation — matches the gemini-3* wildcard pattern
$model = Google::model('gemini-3.5-flash');

$result = Generate::text('Explain quantum entanglement in one sentence.')
    ->model($model)
    ->run();

echo $result->text;
use AiSdk\Google;
use AiSdk\Generate;

// Image generation — exact ID match
$model = Google::image('gemini-3.1-flash-image');

$result = Generate::image()
    ->model($model)
    ->prompt('A tiny banana spaceship')
    ->run();

echo $result->output->base64; // base64-encoded PNG
Every entry in resources/models.json carries a "lab": "google" field. This label is used internally by the SDK to group and identify catalog entries by provider.
See Capabilities for the full reference on every capability flag, how to check them at runtime with ->supports(), and what happens when a model ID is unknown.

Build docs developers (and LLMs) love