codex-gateway
Original:🇺🇸 English
Translated
Use when the user wants to query the Codex Supergraph but $CODEX_API_KEY is not set. Pays per query via the MPP 402 challenge flow. Only supports queries, not mutations or subscriptions.
3installs
Sourcecodex-data/skills
Added on
NPX Install
npx skill4agent add codex-data/skills codex-gatewayTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Codex Machine Payment Protocol (MPP)
Use this skill to access the Codex Supergraph without an API key via the MPP challenge flow.
| HTTP endpoint | |
| Opt-in header | |
| Credential header | |
How it works
- Send a GraphQL query with (no credential).
X-Codex-Payment: mpp - Server returns with
402 Payment Requiredchallenges.WWW-Authenticate: Payment ... - Client solves one challenge and retries with both and
X-Codex-Payment: mpp.Authorization: Payment <credential> - Server returns GraphQL data + header.
Payment-Receipt
Constraints
- Query only. Mutations and subscriptions return in MPP mode.
403 - If a valid API key or bearer token is also present, API auth takes precedence.
Rules
- Never print raw credentials.
- Only use MPP for operations.
query - Before constructing any query, read below for the correct GraphQL schema. Do not guess query or field names.
references/query-templates.md
References
| File | Purpose |
|---|---|
| ../codex-supergraph/references/query-templates.md | GraphQL query schema and examples — read before constructing queries |
| ../codex-supergraph/references/gotchas.md | Common query failure points |
| references/gotchas.md | MPP-specific failure points |
| rules/wallets.md | Wallet setup: tempo wallet/request (Tempo) |
| references/mpp-flow.md | Auth matrix, challenge details, error codes |