from openai import OpenAIclient = OpenAI( api_key="sk-xxx", base_url="https://crazyrouter.com/v1")# Get model list via OpenAI SDKmodels = client.models.list()for model in models.data: print(model.id)
You can also use the OpenAI-compatible GET /v1/models endpoint to get the model list, which works the same way.