Skip to content

Instantly share code, notes, and snippets.

@tomshaw
Created February 9, 2025 02:37
Show Gist options
  • Save tomshaw/6a88f76d42e6ad8cfe3c8ee371f5e718 to your computer and use it in GitHub Desktop.
Save tomshaw/6a88f76d42e6ad8cfe3c8ee371f5e718 to your computer and use it in GitHub Desktop.
List OpenAI available models.
from openai import OpenAI
client = OpenAI()
models = client.models.list()
print([m.id for m in models.data])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment