#How can I see what models are available to me?
1 messages · Page 1 of 1 (latest)
Hi @tiny flicker. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
You can view the available models and files through the OpenAI API.
To see the available models, you can use the listModels method in the "Models" group of the API. This method is a GET request to /models and it lists the currently available models, providing basic information about each one such as the owner and availability. Here is the API endpoint for this:
GET /models
This operation does not require authentication. You can find more details about this in the OpenAI API documentation (https://platform.openai.com/docs/api-reference).
To see the files that belong to your organization, you can use the listFiles method in the "Files" group of the API. This method is a GET request to /files. Here is the API endpoint for this:
GET /files
You can also filter the files by their purpose by adding a query parameter purpose to the request. More details about this can be found in the OpenAI API documentation (https://platform.openai.com/docs/api-reference).
Please note that you need to replace /models and /files with the actual URL of the OpenAI API.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@tiny flicker kapa.ai is still learning and improving, please let us know how it did by reacting below
@vestal citrus What is an example snippet of code to pull models?
Let me check the knowledge base for you. One moment! :books:
Sure, here is an example snippet of code to list models using the OpenAI Python library. This code was extracted from a GitHub issue (https://github.com/openai/openai-python/issues/470) in the OpenAI Python library:
import openai
openai.api_key = "your-api-key"
# List models
models = openai.Model.list()
# Print the first model's id
print(models.data[0].id)