Table of Contents

Class GeminiModelListRequest

Requests metadata for all existing models. Return type is GeminiModelListResponse.

public class GeminiModelListRequest : IGeminiGetRequest, IGeminiRequest
Inheritance
GeminiModelListRequest
Implements
Extension Methods

Constructors

GeminiModelListRequest(bool)

Creates a new GeminiModelListRequest.

public GeminiModelListRequest(bool useBetaApi = false)

Parameters

useBetaApi bool

Should the request use the Beta API?

Remarks

Some newer models do not work with this request unless through the Beta API.

Fields

ApiVersion

The API version to use.

public string ApiVersion

Field Value

string

MaxResponseModels

The maximum number of GeminiModels to return (per page).

public int MaxResponseModels

Field Value

int

Remarks

This method returns at most 1000 models per page, even if you pass a larger MaxResponseModels.

PageToken

A page token from a previous GeminiModelListRequest call.

public string PageToken

Field Value

string

Properties

AuthMethod

The preferred authentication method.

public GeminiAuthMethod AuthMethod { get; set; }

Property Value

GeminiAuthMethod

OAuthAccessToken

The OAuth access token to authenticate the request, if using OAuthAccessToken as AuthMethod.

public string OAuthAccessToken { get; set; }

Property Value

string

Methods

GetEndpointUri(GeminiRequestMetadata)

Gets the URI to the API endpoint.

public string GetEndpointUri(GeminiRequestMetadata metadata)

Parameters

metadata GeminiRequestMetadata

The metadata of the request to be carried out on the URI.

Returns

string

The URI.