Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Azure OpenAI (Microsoft Foundry) error

Azure OpenAI 431 (too many custom headers): what it means and how to fix it

Error message
431 (too many custom headers)

Retry? Not statedLast verified 1 documented fix1 source

What it means

Current APIs allow up to 10 custom headers, which are passed through the pipeline and returned. Requests that exceed this header count result in HTTP 431 errors.

Causes

  • More than 10 custom headers in an API request

How to fix it

  1. Fix 1.

    Reduce header volume; Microsoft states there is no other solution and recommends not depending on custom headers.

More Azure OpenAI errors

All 15 Azure OpenAI errors

FAQ

What does the Azure OpenAI error "431 (too many custom headers)" mean?

Current APIs allow up to 10 custom headers, which are passed through the pipeline and returned. Requests that exceed this header count result in HTTP 431 errors.

How do I fix Azure OpenAI "431 (too many custom headers)"?

Reduce header volume; Microsoft states there is no other solution and recommends not depending on custom headers.

Should I retry Azure OpenAI "431 (too many custom headers)"?

Not stated. The official docs do not say whether this error is retryable.

Sources

Last verified against 1 source: Azure OpenAI's official docs and official SDK repositories.

Newsletter

Know when the APIs change

One email per week. New model releases, API changes, what broke, and how developers are working around it.