ModelClientListModelsAsync Method
Lists the
Models available through the Gemini API.
Namespace: GenerativeAI.ClientsAssembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
public Task<ListModelsResponse> ListModelsAsync(
int? pageSize = null,
string? pageToken = null,
CancellationToken cancellationToken = default
)
- pageSize NullableInt32 (Optional)
- The maximum number of Models to return per page.
- pageToken String (Optional)
- A page token, received from a previous ListModelsAsync(NullableInt32, String, CancellationToken) call, to retrieve the next page of results.
- cancellationToken CancellationToken (Optional)
- The cancellation token to observe while waiting for the task to complete.
TaskListModelsResponseA
ListModelsResponse containing a list of
Models and associated metadata.