Lists the currently available models, and provides basic information about each one such as the owner and availability.
Returns
List models
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("OPENAI_API_KEY"), # This is the default and can be omitted
)
page = client.models.list()
page = page.data[0]
print(page.id){
"data": [
{
"id": "id",
"created": 0,
"object": "model",
"owned_by": "owned_by"
}
],
"object": "list"
}Returns Examples
{
"data": [
{
"id": "id",
"created": 0,
"object": "model",
"owned_by": "owned_by"
}
],
"object": "list"
}