Can't access second API when first was recently used within same APIM service

Oleksandr Yakovliev 25 Reputation points
2025-02-28T12:45:27.7733333+00:00

I have two APIs in my APIM service. Each API endpoint has running Open AI service behind. When I'm using first endpoint (in my AI chat app) with one model deployed - everything is ok, but after that when I try to use another model in my chat app (I can switch between them in runtime) I'm receving an error from APIM service:

 "error": {
        "code": "DeploymentNotFound",
        "message": "The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again."
    }

After some time when I start working with second endpoint and switch to first one - same error. Seems like APIM service is switching between these two APIs but can't handle both at the same time. How can I reconfigure APIM service to work with each API at the same time? APIM service has Basic tier

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,457 questions
0 comments No comments
{count} vote

Accepted answer
  1. Pravallika Kothaveeranna Gari 955 Reputation points Microsoft External Staff Moderator
    2025-03-13T07:50:24.0633333+00:00

    Hi Oleksandr Yakovliev,

    Check if below steps helps to resolve the issue:

    1. Double-check Deployment Names for both models and ensure they are correctly referenced in your APIM service.
    2. Verify if both models are deployed correctly. After deploying a new model, wait for at least 5 minutes before switching to it in your chat app.
    3. Upgrade Open AI version.
    4. Check backend configurations and make sure APIM is correctly routing requests.
    5. Ensure that the API Management service isn't caching or holding onto the previous deployment state when switching between models.
    6. Consider upgrading to a higher tier such as standard or Premium if your requirements exceed the Basic tier's capabilities.
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.