Clean up resources
If you want to clean up and remove an Azure OpenAI resource, you can delete the resource. Before deleting the resource, you must first delete any deployed models.Troubleshooting
When using
gpt-4o-audio-preview for chat completions with the audio modality and stream is set to true the only supported audio format is pcm16.Authentication errors
If you receive a 401 or 403 error:- Keyless auth: Verify you’ve run
az loginand have theCognitive Services Userrole assigned to your account. - API key: Check that
AZURE_OPENAI_API_KEYis set correctly and the key hasn’t been regenerated.
Model not found
If thegpt-4o-mini-audio-preview model isn’t available:
- Verify the model is deployed in your Azure OpenAI resource.
- Check that you’re using a supported region.
Audio file issues
If the generated audio file doesn’t play:- Ensure the file was written completely (check file size is greater than 0 bytes).
- Verify the format matches what your player supports (wav is widely compatible).
- For streaming responses, remember that only pcm16 format is supported.
Rate limiting
If you receive a 429 error, you’ve exceeded the rate limit. Wait and retry, or request a quota increase. For more information about rate limits, see Azure OpenAI quotas and limits.Related content
- Learn more about Azure OpenAI deployment types.
- Learn more about Azure OpenAI quotas and limits.