Luqman Rumaiz I'm glad that your issue is resolved and thank you for posting your solution so that others experiencing the same thing can easily reference this!
Since the Microsoft Q&A community has a policy that the question author cannot accept their own answer, they can only accept answers by others, I'll repost your solution in case you'd like to Accept the answer.
Error Message:
I am encountering a 404 error in my FastAPI Python backend logs when attempting to access an OpenAI API deployment.
Solution:
The issue was actually caused by a "+" symbol after the deployment name in the request, and an extra space in the environment variable.
If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.