API call working in dev environment, but not on AWS Amplify?

My API call to gpt4 and gpt-3.5-turbo is working fine on localhost but failing on live site. Using AWS Amplify and have environment setup in the same manner in both local and AWS.

What specific error message are you receiving from the API in AWS? Not just the status code, but the error response will have a detailed error message on what’s wrong.

Without any other information, it’s pretty likely you API key isn’t set correctly.

Thanks for reply, switched to Vercel and all is good again. Think AWS was just too much coming at me all at once.