skills/codex-data/skills/agent-payments

agent-payments

SKILL.md

Codex Machine Payment Protocol (MPP)

Use this skill to access the Codex Supergraph without an API key via the MPP challenge flow.

HTTP endpoint https://graph.codex.io/graphql
Opt-in header X-Codex-Payment: mpp
Credential header Authorization: Payment <base64url-credential>

How it works

  1. Send a GraphQL query with X-Codex-Payment: mpp (no credential).
  2. Server returns 402 Payment Required with WWW-Authenticate: Payment ... challenges.
  3. Client solves one challenge and retries with Authorization: Payment <credential>.
  4. 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.
  • Do not reference legacy dashboard onboarding/top-up/balance payment endpoints.

Challenge flow

  1. First request (no credential yet):
curl -i -sS https://graph.codex.io/graphql \
  -H "Content-Type: application/json" \
  -H "X-Codex-Payment: mpp" \
  --data-binary '{"query":"query GetNetworks { getNetworks { id name } }"}'

Expected: 402 Payment Required with multiple WWW-Authenticate: Payment ... challenges.

  1. Retry with solved credential:
curl -i -sS https://graph.codex.io/graphql \
  -H "Content-Type: application/json" \
  -H "X-Codex-Payment: mpp" \
  -H "Authorization: Payment <base64url-credential>" \
  --data-binary '{"query":"query GetNetworks { getNetworks { id name } }"}'

Expected: GraphQL data + Payment-Receipt header.

Rules

  • Never print raw credentials.
  • Only use MPP for query operations.
  • For available GraphQL operations and endpoint selection heuristics, see the codex-supergraph skill.

References

File Purpose
references/mpp-flow.md Auth matrix, challenge details, error codes
references/mpp-templates.md MPP curl templates
references/wallets.md Wallet setup: presto (Tempo) and awal (Base)
Weekly Installs
6
First Seen
3 days ago
Installed on
opencode6
gemini-cli6
claude-code6
github-copilot6
codex6
amp6