Skip to content
Primary navigation

List models

models.list() -> SyncPage[Model]
GET/models

Lists the currently available models, and provides basic information about each one such as the owner and availability.

ReturnsExpand Collapse
class Model: …

Describes an OpenAI model offering that can be used with the API.

id: str

The model identifier, which can be referenced in the API endpoints.

created: int

The Unix timestamp (in seconds) when the model was created.

object: Literal["model"]

The object type, which is always "model".

owned_by: str

The organization that owns the model.

List models

from openai import OpenAI
client = OpenAI()

client.models.list()
{
  "object": "list",
  "data": [
    {
      "id": "model-id-0",
      "object": "model",
      "created": 1686935002,
      "owned_by": "organization-owner"
    },
    {
      "id": "model-id-1",
      "object": "model",
      "created": 1686935002,
      "owned_by": "organization-owner",
    },
    {
      "id": "model-id-2",
      "object": "model",
      "created": 1686935002,
      "owned_by": "openai"
    },
  ]
}
Returns Examples
{
  "object": "list",
  "data": [
    {
      "id": "model-id-0",
      "object": "model",
      "created": 1686935002,
      "owned_by": "organization-owner"
    },
    {
      "id": "model-id-1",
      "object": "model",
      "created": 1686935002,
      "owned_by": "organization-owner",
    },
    {
      "id": "model-id-2",
      "object": "model",
      "created": 1686935002,
      "owned_by": "openai"
    },
  ]
}