Troubleshooting Assistant API

Was trying to play around with the Assistants API" but having some prolems - is this not the url to make calls to? ```
https://api.openai.com/v1/assistants

Everytime I try to I get this: "It seems there was an issue with the API request. The URL specified for the operation was invalid.".
https://api.openai.com/v1/assistants

That is the base URL, but it also needs to be accompanied by an authentication header, a beta header, and a body with all valid parameters for creating an assistant. Other methods then use sub-paths as query strings.

Here’s your docs where you can see how to make this initial request.

https://platform.openai.com/docs/api-reference/assistants/createAssistant?lang=curl

API keys or projects not populated with all the rights to endpoints will also result in rejection.

Thanks for the reply - I am not sure why shared that one instead of what you linked. I still get problems with that as well. To make a long story short I am tring to make an API call from a GPT.

If you wanted to make AI powered GPTs, basically, you’ll want to have your own backend API that can be set up for communication through GPT actions, with oauth authentication.

And then since you’ll be basically providing free AI-powered services, keep it secure and private and monitored for abuse. There is no “revoke API key” API or API to see when your bill hits $1000.

https://platform.openai.com/docs/actions/introduction

I might be confusing you - I am not confused on how to create an action inside of a GPT - what I am saying is that the url that is given does not seem to work. I already have a working schema and etc -that is where the previous picture came from.

Have you created an y actions?

Not any that access any endpoint requiring custom headers.

There also may be a gulf in understanding - a ChatGPT plus account doesn’t come with any API considerations. You must purchase credits, establish a project, generate an API key with endpoint access selected, etc.

What does the request look like that’s being posted when you get that response? It’s hard to say what’s wrong without details… but it seems to be a 404 error.

Sorry not sure what you mean - as long as it has API you can get to it. I just got done recreating an API that does not exist for Homebrew - so I am sure a GPT can make the call as well.

Not sure how to answer this - it works in Postman - does not work in the GPT.

I provided a link. You can follow up with a click to " Get started building a GPT with an action". Then search for the word “headers”.

  • Custom headers are not supported
  • With the exception of Google, Microsoft and Adobe OAuth domains, all domains used in an OAuth flow must be the same as the domain used for the primary endpoints

Then contemplate your ability to pass an OpenAI API key by a GPT action (if you could even imagine a case where you wouldn’t simply make an assistant that could do all that the GPT itself would be doing.)

Oh you’re trying to get the GPT to make the API request right? I don’t know about that, the actions have never made any sense to make the few times I’ve tried to create them. I don’t think chatgpt (which is what gpt’s are?) has access directly to the internet like that.

1 Like

Every GPT I make gets turned into an assistant so I am not worried about that part. I was just very curious if it was possible to make an API call from a GPT.

I have a GPT that creates GPTs/Assistants (created over 3k) - I was thinking about just sending an API call with the same information just to be a bit faster. It is not really important if it is not possible.

Yes - a user creates a GPT inside of the GPT and it is autocreated as an assistant.