CLI CODING · CLAUDE CODE & CODEX CLI
Claude Code & Codex CLI Setup Guide: One Pay-As-You-Go Key, Up to 85% Off
Configure environment variables and MCP in minutes so Claude Code, Codex CLI, and Aider call GPT 6.2 at 85% off list price, plus Claude 5.5 and Gemini 4 at 75% off, through Wanyra API.
1. Why Route Coding CLIs Through a Pay-As-You-Go Gateway?
Stacking multiple $20–$200 monthly AI subscriptions quickly gets expensive. With one Wanyra API key, you pay strictly per exact token consumed with non-expiring balance:
- GPT 6.x tokens at 85% off list price; Claude 5.5 / 5.2, Gemini 4, and Grok 4.x tokens at 75% off
- Multi-turn prompt caching supported to cut large repository refactor costs
- Native OpenAI /v1/chat/completions and /v1/responses endpoints with hosted web_search and x_search
2. Environment Setup & Streaming Smoke Test
Export the base URL and your API key, then verify streaming output and usage reporting with one request:
export OPENAI_BASE_URL="https://api.star1age.cn/v1"
export OPENAI_API_KEY="sk-your-wanyra-key"
curl https://api.star1age.cn/v1/chat/completions \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"star1age-claude-sonnet-5.5","messages":[{"role":"user","content":"Reply OK"}],"stream":true,"stream_options":{"include_usage":true}}'Frequently asked questions
- How can I verify that models are not silently downgraded?
- Check the public /status page for live 15-minute streaming uptime, TTFT, prompt-cache hit checks, reasoning effort ladders, and tool-calling verification.
- Can I share one wallet across Cursor, Cline, and CLI agents?
- Yes. Create separate API keys with per-key daily point caps in the developer console to track spending cleanly per tool.
Ready to integrate? Inspect live rates, real-time model telemetry, and full API docs:
Live price sheet·Model availability & verification·Developer docs