Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
Parameters
model: str
Returns
Retrieve model
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("OPENAI_API_KEY"), # This is the default and can be omitted
)
model = client.models.retrieve(
"gpt-4o-mini",
)
print(model.id){
"id": "id",
"created": 0,
"object": "model",
"owned_by": "owned_by"
}Returns Examples
{
"id": "id",
"created": 0,
"object": "model",
"owned_by": "owned_by"
}