Class ModelsEndpoint
List and describe the various models available in the API.
You can refer to the Models documentation to understand which models are available for certain endpoints: https://platform.openai.com/docs/models/model-endpoint-compatibility.
https://platform.openai.com/docs/api-reference/models
public sealed class ModelsEndpoint : OpenAIBaseEndpoint- Inheritance
- 
      
      
      ModelsEndpoint
- Inherited Members
Constructors
ModelsEndpoint(OpenAIClient)
public ModelsEndpoint(OpenAIClient client)Parameters
- clientOpenAIClient
Properties
Root
The root endpoint address.
protected override string Root { get; }Property Value
Methods
DeleteFineTuneModelAsync(string, CancellationToken)
Delete a fine-tuned model. You must have the Owner role in your organization.
public Task<bool> DeleteFineTuneModelAsync(string modelId, CancellationToken cancellationToken = default)Parameters
- modelIdstring
- The Model to delete. 
- cancellationTokenCancellationToken
- Optional, CancellationToken. 
Returns
GetModelDetailsAsync(string, CancellationToken)
Get the details about a particular Model from the API
public Task<Model> GetModelDetailsAsync(string id, CancellationToken cancellationToken = default)Parameters
- idstring
- The id/name of the model to get more details about 
- cancellationTokenCancellationToken
- Optional, CancellationToken. 
Returns
GetModelsAsync(CancellationToken)
List all models via the API
public Task<IReadOnlyList<Model>> GetModelsAsync(CancellationToken cancellationToken = default)Parameters
- cancellationTokenCancellationToken
- Optional, CancellationToken. 
Returns
- Task<IReadOnlyList<Model>>
- Asynchronously returns the list of all Models