My fine tune model is not working through API request but working fine on playground

I fine-tuned a DaVinci model for my project, but I cannot access it through an API request. And the strange thing is it’s working completely fine on Openai playground. Can any please help?

Use the fine-tune retrieve API method to get the full details of your fine-tune object and inspect it:

Reference:

Retrieve Fine-Tune

I tried to run the below command to get the list of my fine-tuned model to fetch the fine_tune_id, but it’s responding as empty data list.

So, you have no fine-tuned models at all in your account?

yes, but if you will see my playground it’s working fine over there.

That means you have a problem with your code which calls the API method.

:slight_smile:

If it’s true, then how is my code working completely fine with calling an untrained basic model?

No idea about your code since we cannot see it.

FWIW, I have many fine-tuned models and the models all match perfectly between the API and Playground.

Never had a problem.

:slight_smile:

Issue Solved!! The reason for that was somehow, my personal account got merged with my working account, and I hadn’t mentioned the organization id (openai.organization) before making the request to openai.

How did you distinguish you personal account and the organization account to solved the problem? I have the same problem, can’t find the fine-tuned model anywhere in my account, including the playground.

  • For Playground, click your name in upper right corner and beneath your username will be a list of the Organizations you are a member of
  • For API, you send the Org ID as a header, see docs

Thanks a lot for the reply, but I put this in my Python endpoint, it hasn’t any reactions:

import os

import openai

openai.organization = “org-API_KEY”

openai.api_key = os.getenv(“OPENAI_API_KEY”)

openai.Model.list()

Should I install OpenAI first, just as did when finetuning : pip install --upgrade openai;

And I don’t have a “mode” column in the right side of “playground” interface in my OPenAI account, I don’t why :innocent: