How do I find out my fine-tunes models using Python?

Hi can anyone help me with Python code to list my fine-tunes models?
Is there an equivalent of equivalent to the openai.file.list() ?

I have tried
openai.models.list()
openai.fine-tunes.list()

models = openai.Model.list() should do it!

1 Like

Thank you Rohan, also discovered another method
https://stackoverflow.com/questions/74359480/how-do-i-find-out-my-fine-tunes-models-using-python/74364055#74364055

openai.FineTune.list()

Both methods work equally well.

This should give you a nice list :grinning:

import openai
openai.api_key = “Your API Key”
mydict = openai.FineTune.list()
mydict = dict(list_of_fine_tuned)
#print(type(mydict))
#print(mydict)
data = mydict[‘data’]
fine_tuned_models = [d[‘fine_tuned_model’] for d in data]
print(fine_tuned_models)