Open AI Responses API + BYOK

Hi,

We are experiencing a consistent 401
invalid_api_key
error when using OpenAI via AI Gateway (BYOK),
when calling the
/v1/responses
endpoint.

Context:
- AI Gateway with BYOK enabled
- OpenAI API key regenerated and verified
- Same key works correctly when calling OpenAI directly (without Gateway)
- Same Gateway setup works fine with Anthropic
- Error only happens with OpenAI +
/v1/responses


Logs show:
401 invalid_api_key returned by OpenAI, which suggests the Authorization header is not being forwarded correctly or is altered by the Gateway for this endpoint.

It looks like AI Gateway may not yet fully support OpenAI
/v1/responses
, or is still handling it as a legacy endpoint (chat/completions).
Was this page helpful?