openai-oauth 2.0.0-beta.2 → 2.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -2
- package/dist/{chunk-UZ3AHAWX.js → chunk-INHW7GRB.js} +602 -635
- package/dist/cli.js +1066 -47
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/package.json +10 -7
package/README.md
CHANGED
|
@@ -9,7 +9,18 @@ Turn your ChatGPT account into an OpenAI-compatible local API.
|
|
|
9
9
|
|
|
10
10
|
OpenAI-compatible endpoint ready at http://127.0.0.1:10531/v1
|
|
11
11
|
Use this as your OpenAI base URL. No API key is required.
|
|
12
|
-
Available Models: gpt-5.6-sol, gpt-5.6-terra, ...
|
|
12
|
+
Available Models: gpt-5.6-sol, gpt-5.6-terra, gpt-image-2, ...
|
|
13
|
+
|
|
14
|
+
[d] Run in background [q] Quit
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Press `d` to keep it running in the background or `q` to quit. You can also manage it directly:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx openai-oauth --detach
|
|
21
|
+
npx openai-oauth status
|
|
22
|
+
npx openai-oauth logs --follow
|
|
23
|
+
npx openai-oauth stop
|
|
13
24
|
```
|
|
14
25
|
|
|
15
26
|
## Package Notes
|
|
@@ -20,8 +31,18 @@ Supported endpoints:
|
|
|
20
31
|
|
|
21
32
|
- `/v1/responses`
|
|
22
33
|
- `/v1/chat/completions`
|
|
34
|
+
- `/v1/images/generations`
|
|
35
|
+
- `/v1/images/edits`
|
|
23
36
|
- `/v1/models`
|
|
24
37
|
|
|
38
|
+
Image generation uses JSON requests. Image editing uses the standard OpenAI multipart request with one or more `image` fields. Both return base64 image data and usage metadata.
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
curl http://127.0.0.1:10531/v1/images/generations \
|
|
42
|
+
-H "Content-Type: application/json" \
|
|
43
|
+
-d '{"model":"gpt-image-2","prompt":"A tiny house in a forest","quality":"low"}'
|
|
44
|
+
```
|
|
45
|
+
|
|
25
46
|
Common flags:
|
|
26
47
|
|
|
27
48
|
| Config | Flag | Default |
|
|
@@ -29,10 +50,12 @@ Common flags:
|
|
|
29
50
|
| Host binding | `--host` | `127.0.0.1` |
|
|
30
51
|
| Port | `--port` | `10531` |
|
|
31
52
|
| Model allowlist | `--models` | Account-specific Codex models discovered from ChatGPT |
|
|
32
|
-
| Auth file path | `--oauth-file` | `$
|
|
53
|
+
| Auth file path | `--oauth-file` | `$CODEX_HOME/auth.json` or `~/.codex/auth.json` |
|
|
33
54
|
| Open browser | `--open` / `--no-open` | `--open` |
|
|
34
55
|
| Login timeout | `--login-timeout-ms` | `300000` |
|
|
35
56
|
|
|
57
|
+
Binding `--host` beyond loopback exposes the proxy to your network. Anyone who can reach that port can make requests with your ChatGPT account.
|
|
58
|
+
|
|
36
59
|
Login listens on loopback and uses `http://localhost:1455/auth/callback`, the local callback URL accepted by OpenAI OAuth.
|
|
37
60
|
|
|
38
61
|
The CLI resolves the latest published Codex client version automatically. Advanced flags also exist for overriding it, the upstream Codex base URL, OAuth client id, and OAuth token URL.
|