Claude Code, Codex CLI & Coding Agents Setup Guide
Configure Claude Code, Codex CLI, Antigravity, and standard OpenAI or Anthropic SDKs with a single API key covering Claude, GPT, and Gemini text models — pay-as-you-go from $5 via Stripe with transparent per-token pricing and no monthly lock-in. You can also hand /SKILL.md directly to your coding agent for automated setup.
01Configure Claude Code
Base URL rule: ANTHROPIC_BASE_URL must be https://tryaiapi.com with no /v1 suffix.
Or merge into the env object of ~/.claude/settings.json without overwriting unrelated settings:
Active Anthropic model IDs: claude-fable-5-2, claude-opus-5-5, claude-sonnet-5-5, and claude-haiku-5-5 (1,000,000 context window, 128,000 max output tokens; verify live availability via GET /v1/models).
02Configure Codex CLI
Base URL rule: OPENAI_BASE_URL must include /v1: https://tryaiapi.com/v1.
Or add a custom provider entry to ~/.codex/config.toml (this reads TRYAIAPI_KEY from your shell, so set export TRYAIAPI_KEY="YOUR_TRYAIAPI_KEY" first):
Active OpenAI text model IDs: gpt-6.2-astra, gpt-6.2-sol, gpt-6-astra, gpt-6-sol, and gpt-6-luna (1,050,000 context window, 128,000 max output tokens). Active Google text models (gemini-4-neon, gemini-4-carbon, gemini-4-argon, gemini-4-hydrogen) also use https://tryaiapi.com/v1/chat/completions.
03Verify Connectivity Before Sending Paid Requests
Run a free, read-only balance check first to confirm authentication:
- HTTP
200with JSON balance: authentication is valid and your client is ready. - HTTP
401: API key is missing, revoked, or malformed — check your key in the console. - HTTP
402: insufficient balance — top up in the console. - HTTP
404: most commonly caused by adding/v1toANTHROPIC_BASE_URL, omitting/v1fromOPENAI_BASE_URL, or using a model ID not listed inGET /v1/models. - Live prices are published at the model market and
GET /api/pricing. For multimodal endpoints, see Image Model Docs and Video Model Docs.
Last updated: 2026-11-25