Referencing a GPT when using Completions API


If I create a GPT is it possible to reference this GPT e.g. as a parameter, when I am making requests to the completions endpoint so that it knows to use this GPT to answer the prompt I provide to the endpoint?

Or is there another way to interact with a GPT via API?

By creating a GPT, I assume you mean on the ChatGPT editor here:

I believe what you’re asking isn’t possible in that way.

Instead, you would have to create an Assistant using the API (same as a custom GPT) and then use the Assistants endpoint

You can create an Assistant here:

Here is the documentation for the Assistants:

And here is the API reference for the Assistants endpoint:

Note that you can create an Assistant in the Playground or directly in the API endpoint:

1 Like

More info on the difference between GPT’s and Assistants

As this topic has a selected solution, closing topic.