microsoft-foundry / microsoft-foundry/foundry-samples

AI Foundry sample visible in ai.azure.com for TTS models has a wrong HTTP header

Open
#248 2 comments 0 reactions 1 assignee View on GitHub

@e-straight is already working on this.

Since Jul 17, 2025.

Dominant language
Bicep
Stars
445
Forks
494
Avg merge
11h 35m
Merged PRs (30d)
38

Description

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" }'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.