Codex Machine Payment Protocol (MPP)
Use this skill when the Codex Supergraph returns a 402 Payment Required response. The MPP challenge flow lets you pay per query without needing an API key.
| |
|---|
| HTTP endpoint | https://graph.codex.io/graphql |
| Credential header | Authorization: Payment <base64url-credential> |
How it works
- Send a GraphQL query (no credential).
- Server returns
402 Payment Required with WWW-Authenticate: Payment ... challenges.
- Client solves one challenge and retries with
Authorization: Payment <credential>.
- Server returns GraphQL data +
Payment-Receipt header.
Constraints
- Query only. Mutations and subscriptions return
403 in MPP mode.
- If a valid API key or bearer token is also present, API auth takes precedence.
Rules
- Never print raw credentials.
- Only use MPP for
query operations.
- Before constructing any query, read
references/query-templates.md below for the correct GraphQL schema. Do not guess query or field names.
References