OpenAI Models and Groups
The Codex Relay model list is dynamic. The group assigned to an API key, current upstream account pool, and publication policy together determine which models the key can see and call.
Get the authoritative model list
curl https://codexapi.asia/v1/models \
-H "Authorization: Bearer YOUR_API_KEY"Copy the returned id exactly. A client nickname, old configuration, or built-in third-party list is not authoritative.
What a group controls
| Area | Effect |
|---|---|
| API capabilities | Responses, Chat Completions, Embeddings, or Images |
| Visible models | Model IDs returned by /v1/models |
| Scheduling pool | Upstream accounts eligible for the request |
| Billing | Model multipliers, subscriptions, or balance usage |
| Concurrency and limits | Concurrent requests, RPM, and window limits |
Model IDs and aliases
Copy model IDs without modification. Administrators may map a public model ID to an upstream model, but clients should only use the public ID exposed by their group.
If a model is not found
Refresh /v1/models first. If the model is absent, changing the local spelling will not help. Use another group or ask the administrator to publish the model.
Match models and endpoints
| Type | Common endpoint | Notes |
|---|---|---|
| OpenAI Responses | POST /v1/responses | Preferred by Codex and newer OpenAI clients |
| OpenAI Chat | POST /v1/chat/completions | Broad compatibility with chat clients |
| OpenAI Embeddings | POST /v1/embeddings | Vectorization and retrieval workflows |
| OpenAI Images | POST /v1/images/generations | Requires a group that publishes image models |
Capacity and scheduling
One public model can be backed by several upstream accounts. If every compatible account is busy, rate-limited, or unavailable, the gateway may return 429, 503, or Selected model is at capacity.
Keep streaming connections open, honor Retry-After, and use exponential backoff with jitter for retryable failures. Do not retry indefinitely in a tight loop.
