I'm using Perplexity AI with the

I'm using Perplexity AI with the universal endpoint on AI Gateway. I have already set up groq and workers AI with the universal endpoint. However, when sending a request to perplexity through the universal endpoint, I am getting this error:

At body: Input should be a dictionary or an instance of ApiChatCompletionsRequest


The body I'm passing is the exact same as what's provided in the perplexity example. I have also verified that it works in Postman, but isn't working in AI Gateway. Am I missing something?
Was this page helpful?