Hi,
I'm not sure if that's the correct repo, but let's try.
Example visible in AI Foundry when a gpt-4o-mini-tts model is deployed, shows a curl request. Unfortunately, it the example shows "Authorization: Bearer xxxxx" header, but that doesn't work. After changing it to "api-key" heaeder the sample works.
Not working example:
curl -X POST "https://myname.cognitiveservices.azure.com/openai/deployments/gpt-4o-mini-tts/audio/speech?api-version=2025-03-01-preview" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AZURE_API_KEY" \ -d '{ "model": "gpt-4o-mini-tts", "input": "The quick brown fox jumped over the lazy dog", "voice": "alloy" }'
Working example:
curl -X POST "https://myname.cognitiveservices.azure.com/openai/deployments/gpt-4o-mini-tts/audio/speech?api-version=2025-03-01-preview" \ -H "Content-Type: application/json" \ -H "api-key: $AZURE_API_KEY" \ -d '{ "model": "gpt-4o-mini-tts", "input": "The quick brown fox jumped over the lazy dog", "voice": "alloy" }'