AIG.SetApiVersion

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIG. - Google AI > 2. Configuration (Connection & Endpoint) >

AIG.SetApiVersion

Command Description

Top Next


MiniRobotLanguage (MRL)

 

AIG.SetApiVersion

Switch between Stable (v1) and Preview (v1beta) API endpoints.

 

Intention

To configure which version of the Google Gemini API to use. This is critical because newer features (like Gemini 3.0, Thinking Mode, and System Instructions) are often only available on the `v1beta` endpoint, while production apps may prefer the stability of `v1`.

 

What is the SetApiVersion Command?

This command automatically updates the Base URL used by the library. It acts as a shortcut so you don't have to type the full URL using `AIG.SetBaseUrl`.

 

Why Do You Need It?

To enable Gemini 3.0 capabilities.

To use System Instructions (Persona), which requires `v1beta` on some models.

To revert to `v1` for maximum stability in production scripts.

 

How to Use

Simply specify `v1` or `v1beta` as the parameter.

 

Example Usage

// Switch to Beta for new features

AIG.SetApiVersion|v1beta

 

// Set a preview model

AIG.SetModel|gemini-3.0-pro-preview

 

// Verify the endpoint

AIG.GetEndpoint|$$URL

DBP. Current URL: $$URL

 

Syntax

AIG.SetApiVersion|P1

AIG.sav|P1

 

Parameter Explanation

P1 - The version string. Valid values:

v1 : Uses `https://generativelanguage.googleapis.com/v1/models` (Default).

v1beta : Uses `https://generativelanguage.googleapis.com/v1beta/models`.

 

Remarks

The default setting is `v1`.

If you specify an unknown version (e.g. `v2`), the command will attempt to construct the URL dynamically: `...googleapis.com/v2/models`.

 

See also:

AIG.SetBaseUrl

AIG.GetEndpoint

AIG. Commands Overview