mirror of
https://github.com/openai/codex.git
synced 2026-10-23 18:08:45 +00:00
fix: replace --api-key with --with-api-key in codex login
This commit is contained in:
@@ -5,9 +5,17 @@
|
||||
If you prefer to pay-as-you-go, you can still authenticate with your OpenAI API key:
|
||||
|
||||
```shell
|
||||
codex login --api-key "your-api-key-here"
|
||||
printenv OPENAI_API_KEY | codex login --with-api-key
|
||||
```
|
||||
|
||||
Alternatively, read from a file:
|
||||
|
||||
```shell
|
||||
codex login --with-api-key < my_key.txt
|
||||
```
|
||||
|
||||
The legacy `--api-key` flag now exits with an error instructing you to use `--with-api-key` so that the key never appears in shell history or process listings.
|
||||
|
||||
This key must, at minimum, have write access to the Responses API.
|
||||
|
||||
## Migrating to ChatGPT login from API key
|
||||
|
||||
Reference in New Issue
Block a user