I think the error is related to the subscription key or the API endpoint provided which is incorrect.
Verify the subscription key you are using is valid and active. You can usually find this information in your Azure portal or the platform where you obtained the API.
Check that you are using the correct API endpoint for your resource because the endpoint usually depends on the region where your resource is located.
If you are accessing the API through code, make sure that the subscription key and API endpoint are correctly implemented in your code. https://learn.microsoft.com/en-us/answers/questions/1377910/how-to-fix-access-denied-due-to-invalid-subscripti
https://stackoverflow.com/questions/42123633/access-denied-due-to-invalid-subscription-key-face-api