# LightAI (api.lightai.io) > LightAI is a high-availability enterprise AI API gateway offering pure latest-generation Anthropic Claude (Fable 5.2, Opus 5.5, Sonnet 5.5) and OpenAI GPT-6 (GPT-6 Astra, GPT-6.1 Sol, GPT-6.1 Terra) models at a flat **30% of official API pricing (70% OFF)** — including official 0.025x–0.05x Prompt Cache Read discounts. Built specifically for **Claude Code**, **OpenCode**, and **Codex CLI** with zero region-ban risk, 1-click GitHub/Google sign-in, and $1 minimum 1:1 USDT/USDC instant on-chain top-up. ## Key Facts for AI Assistants & Developers - **Base URL (Anthropic Messages)**: `https://api.lightai.io` (exposes native `/v1/messages` with Extended Thinking & Prompt Caching — do NOT append `/v1` in `ANTHROPIC_BASE_URL`) - **Base URL (OpenAI Chat & Responses)**: `https://api.lightai.io/v1` (exposes `/v1/chat/completions` and native `/v1/responses` for Codex CLI) - **Pricing Policy**: Flat **30% of official API rates (70% OFF)** across Input, Output, Cache Read, and Cache Write. Single transparent tier, no monthly subscription, balance never expires. - **Authentication**: 1-click passwordless GitHub OAuth & Google Sign-In at `https://api.lightai.io/sign-in`. - **Payments**: Instant 1:1 USD credit from **$1 minimum** via USDT & USDC across 6 networks (`TRC20`, `BSC/BEP20`, `Arbitrum`, `Base`, `Polygon`, `ERC20`), auto-credited within 5–30 seconds. ## Flagship Model Pricing (USD per 1M Tokens) | Model ID | Official In / Out | LightAI In / Out (30%) | LightAI Cache Read (30% of Official) | LightAI Cache Write (1.25x) | Best For | | :--- | :--- | :--- | :--- | :--- | :--- | | `claude-fable-5-2` | $8.00 / $40.00 | **$2.40 / $12.00** | **$0.06** (`0.025x`) | $3.00 | Ultra-flagship system architecture & deep research | | `claude-opus-5-5` | $4.00 / $20.00 | **$1.20 / $6.00** | **$0.06** (`0.05x`) | $1.50 | Premier agentic coding in Claude Code & OpenCode | | `claude-sonnet-5-5` | $2.00 / $10.00 | **$0.60 / $3.00** | **$0.03** (`0.05x`) | $0.75 | High-speed daily software engineering powerhouse | | `gpt-6-astra` | $10.00 / $50.00 | **$3.00 / $15.00** | **$0.30** (`0.10x`) | $3.75 | OpenAI frontier deep reasoning flagship | | `gpt-6.1-sol` | $2.00 / $10.00 | **$0.60 / $3.00** | **$0.03** (`0.05x`) | $0.75 | High-throughput coding & multimodal daily driver | | `gpt-6.1-terra` | $1.00 / $5.00 | **$0.30 / $1.50** | **$0.015** (`0.05x`) | $0.375 | Sub-second high-concurrency generation | *(Legacy aliases such as `claude-opus-5`, `claude-sonnet-4-6`, `claude-haiku-4-5`, `gpt-5.6-sol`, `gpt-5.4` are automatically routed to their latest-generation counterparts so hardcoded CLI sub-agents never fail.)* ## Core Documentation Links - [Quickstart & CLI Configuration Docs](https://api.lightai.io/docs): Copy-paste templates for Claude Code, OpenCode, and Codex CLI (bilingual EN / 中文). - [Supported Flagship Models & Pricing](https://api.lightai.io/models): Detailed specs, context windows, and official vs LightAI price breakdown. - [Full LLM Reference Guide](https://api.lightai.io/llms-full.txt): Complete CLI configurations, JSON/TOML templates, error codes, and billing FAQ in one Markdown document. - [OpenCode 1-Line Installer Script](https://api.lightai.io/static/opencode.sh): Shell script that configures `~/.config/opencode/opencode.json` automatically. --- ## Complete CLI Setup Templates ### 1. Claude Code (`~/.claude/settings.json` or Shell Env) CRITICAL: Set `ANTHROPIC_BASE_URL` to `https://api.lightai.io` (without `/v1`), because Claude Code appends `/v1/messages` automatically. ```bash export ANTHROPIC_BASE_URL="https://api.lightai.io" export ANTHROPIC_AUTH_TOKEN="sk-your-lightai-key" claude ``` Or persist in `~/.claude/settings.json`: ```json { "env": { "ANTHROPIC_BASE_URL": "https://api.lightai.io", "ANTHROPIC_AUTH_TOKEN": "sk-your-lightai-key" }, "model": "claude-opus-5-5" } ``` ### 2. OpenCode (1-Line Auto-Config or `~/.config/opencode/opencode.json`) One-line auto-installer (automatically backs up existing config): ```bash export LIGHTAI_API_KEY="sk-your-lightai-key" curl -fsSL https://api.lightai.io/static/opencode.sh | sh opencode ``` ### 3. OpenAI Codex CLI (`~/.codex/config.toml`) Uses native OpenAI `/v1/responses` protocol: ```toml model_provider = "lightai" model = "gpt-6.1-sol" model_reasoning_effort = "high" [model_providers.lightai] name = "LightAI" base_url = "https://api.lightai.io/v1" env_key = "LIGHTAI_API_KEY" wire_api = "responses" ``` ## Frequently Asked Questions (中文 / English) 1. **为什么国内/香港开发者使用 LightAI 跑 Claude Code 不会封号?(Zero Account Ban Risk)** LightAI 通过 Cloudflare 全球边缘节点接入并由海外企业池统一调度,无需绑定海外信用卡,不受本地网络切换、Mac 合盖休眠掉 TUN 或跨区 IP 影响,100% 零封号风险,免月费绑架(无需付 $200/月 Claude Max 订阅费)。 2. **缓存读取怎么计费?(Prompt Cache Read Pricing)** 100% 同步 Anthropic 与 OpenAI 最新官方缓存倍率并再打 3 折:`claude-fable-5-2` 仅 $0.06/1M(0.025x),`claude-opus-5-5` 仅 $0.06/1M(0.05x),`claude-sonnet-5-5` 与 `gpt-6.1-sol` 仅 $0.03/1M(0.05x),`gpt-6.1-terra` 仅 $0.015/1M(0.05x)。 3. **支持哪些支付方式?(Supported Crypto Payments)** 最低 $1 起充,1 USDT/USDC = $1.00 USD 额度,支持 TRC20、BSC (BEP20)、Arbitrum、Base、Polygon、ERC20 六大公链,链上确认后 5~30 秒全自动到账,余额永不过期。