"OpenAI rejected the request"

Resolved 💬 41 comments Opened Apr 16, 2025 by avaer Closed Apr 16, 2025
💡 Likely answer: A maintainer (maheshrijal, contributor) responded on this thread — see the highlighted reply below.

I set export OPENAI_API_KEY= and ran the codex cli with a simple prompt "read the README.md" and ran into this error:

    ⚠️  OpenAI rejected the request (request ID: req_13e38c243f89126dd24093d2e4892535). Please verify your settings and
    try again.

Is there any way to debug this?

View original on GitHub ↗

40 Comments

LuciferMornens · 1 year ago

Running into this too, and have access to all models.

shobhitic · 1 year ago

Ran into this exact issue

ndisalvio3 · 1 year ago

Can confirm

maheshrijal contributor · 1 year ago

++ Same issue

adamjgrant · 1 year ago

Surely there must be a step somewhere where I can provide my API key? The README.md just says to run the npm command and there's "zero configuration" from there. How could that be? Is OpenAI providing this service for free?

In the OP's description they mention OPENAI_API_KEY because it's only in the Non‑interactive / CI mode section. Should we have that in our environment anyway?

I have that but still get this result.

justinechang39 · 1 year ago

same

rasdani · 1 year ago

same

MadcowD · 1 year ago

as well

johanbaath · 1 year ago

Happening here as well, maybe still rolling out? I'm on tier 5 and have access via the API and playground.

DhrubaPatra · 1 year ago

same pinch.

bradennapier · 1 year ago

samesies! <3 super pumepd though!

EverStarck · 1 year ago
it prob cant find the key because workdir is defaulted to "~" anyone see how to specify workdir? │ localhost session: * │ ↳ workdir: ~ │ ↳ model: o4-mini │ ↳ approval: suggest

wrong issue, but just run codex on the workdir you want, ex:
cd code/react/foo; codex

MadcowD · 1 year ago

This is the issue actually:

    system
    ⚠️  OpenAI rejected the request (request ID: req_a057493e36bb3dda8a2fe4646b7d4cb0): 400 Your organization must be verified to generate reasoning summaries. Please go to: 
https://platform.openai.com/settings/organization/general and click on Verify Organization.. Please verify your settings and try again.

https://platform.openai.com/settings/organization/general

I made a PR to fix this. https://github.com/openai/codex/pull/23

leandroz · 1 year ago

Same problem here!

cruffinoni · 1 year ago

Hey! 👋

So just a thought — the default model used by the CLI is _o4-mini_, which I think might not be fully rolled out to everyone yet. If your API key doesn’t have access to that model, that could explain the rejection error you’re seeing.

You might want to try running the /model command in the CLI and picking something like _gpt-4.5_ instead — basically any model you know you have access to — and see if that helps.

Not totally sure that’s the issue, but worth trying! Let me know if that works for you.

goldensunliu · 1 year ago
Hey! 👋 So just a thought — the default model used by the CLI is _o4-mini_, which I think might not be fully rolled out to everyone yet. If your API key doesn’t have access to that model, that could explain the rejection error you’re seeing. You might want to try running the /model command in the CLI and picking something like _gpt-4.5_ instead — basically any model you know you have access to — and see if that helps. Not totally sure that’s the issue, but worth trying! Let me know if that works for you.

I tried with o3-mini and it has the same issue.

shobhitic · 1 year ago

Switched to 4o and it fixed!

SupreethRao99 · 1 year ago

Anyone else facing the same issue with a different OPENAI_BASE_URL ? I've got a LiteLLM server with O3-mini connected to it, but face the same issue

bradennapier · 1 year ago
Hey! 👋 So just a thought — the default model used by the CLI is _o4-mini_, which I think might not be fully rolled out to everyone yet. If your API key doesn’t have access to that model, that could explain the rejection error you’re seeing. You might want to try running the /model command in the CLI and picking something like _gpt-4.5_ instead — basically any model you know you have access to — and see if that helps. Not totally sure that’s the issue, but worth trying! Let me know if that works for you.

this is indeed the problem

o4-mini-2025-04-16 works! and it works ... amazing this is awesome !

HeroBrian389 · 1 year ago

It seems to be a rollout issue.

o3 nor o3-2025-04-16 work though.

gpt-4.1 and o4-mini-2025-04-16 seem to work.

EDIT:
After verifying my organization, o3 works

jstoppa · 1 year ago
> Hey! 👋 > So just a thought — the default model used by the CLI is _o4-mini_, which I think might not be fully rolled out to everyone yet. If your API key doesn’t have access to that model, that could explain the rejection error you’re seeing. > You might want to try running the /model command in the CLI and picking something like _gpt-4.5_ instead — basically any model you know you have access to — and see if that helps. > Not totally sure that’s the issue, but worth trying! Let me know if that works for you. this is indeed the problem o4-mini-2025-04-16 works! and it works ... amazing this is awesome !

how do you change the model?

bradennapier · 1 year ago
> > Hey! 👋 > > So just a thought — the default model used by the CLI is _o4-mini_, which I think might not be fully rolled out to everyone yet. If your API key doesn’t have access to that model, that could explain the rejection error you’re seeing. > > You might want to try running the /model command in the CLI and picking something like _gpt-4.5_ instead — basically any model you know you have access to — and see if that helps. > > Not totally sure that’s the issue, but worth trying! Let me know if that works for you. > > > this is indeed the problem > o4-mini-2025-04-16 works! and it works ... amazing this is awesome ! how do you change the model?

/model

rodrigossal · 1 year ago

Happens here same issue

bradennapier · 1 year ago
Happens here same issue

seea above for solution

nathanmargaglio · 1 year ago

@MadcowD is right: the issue is that this is trying to generate reasoning summaries, and you need to verify your org before you can do that.

Right now, non-reasoning models work, but reasoning models will not. If you verify your org (https://platform.openai.com/settings/organization/general), the reasoning models will work.

jstoppa · 1 year ago

I can confirm it works, just start codex with

codex -m gpt-4o
bradennapier · 1 year ago
I can confirm it works, just start codex with `` codex -m gpt-4o ``

better to use codex -m o4-mini-2025-04-16 to use new 04 mini

rasdani · 1 year ago
guitaripod · 1 year ago

Can confirm o4-mini-2025-04-16 works.

RicardoRobledo · 1 year ago

It does not work, I don't know if it is because I am not in USA.

!Image

ReyNeill · 1 year ago

Verify your organization people, that is the fix.

sher-badshah4672 · 1 year ago

Below worked for me.

codex -m o4-mini-2025-04-16

adamjgrant · 1 year ago

To expand on @ReyNeil's suggestion to "verify your organization," go to https://platform.openai.com/settings/organization/general

There you will see a "Verify Organization" button if you have not verified already.

You may also need to generate and use a new API key (you shouldn't have to but empirically...)

tibo-openai collaborator · 1 year ago

o4-mini should work and for o3 you currently need to verify as explained just above

aud · 1 year ago

FWIW I needed to verify, then had the same issue until I generated a new API key post-verification.

AnthonyRonning · 1 year ago

Yeah no thanks. Not providing my biometrics, going back to claude code.

!Image

2jfs904judsw20600jikn613d0dookl23jsig · 1 year ago

same for me, only o4-mini works and o3 is rejected.

adityamcodes · 1 year ago

anyone figure out how to get reasoning level to work?

tibo-openai collaborator · 1 year ago

Fix was fixed earlier today, please open new issues for other things and thanks for being patient!

kohl00 · 1 year ago

same only the o4-mini-[date-slug] works for me!

Showing cached comments. Read the full discussion on GitHub ↗