Status: [LIVE] Endpoints found: https://public-api.wordpress.com/wpcom/v2/ai-api-proxy https://public-api.wordpress.com/wpcom/v2/ai-api-proxy/v1/messages Source: https://github.com/Nosvemos/wpcom-ai # wpcom-ai A lightweight, high-performance HTTP reverse proxy for the WordPress.com AI API. Enables local AI coding tools (Claude Code, Cline, Cursor, Aider) to route through WordPress.com's AI infrastructure with credential rotation, session isolation, and SSE streaming support. > ⚠️ **Note:** Requires active WordPress.com account(s) with AI feature access. Monthly token quotas apply per account. --- ## What it does `wpcom-ai` acts as a local gateway between AI coding clients and the WordPress.com AI proxy endpoint. It: - **Normalizes payloads** — flattens array system prompts, strips unsupported fields (`thinking`, `metadata`, `context_management`, `output_config`) that cause upstream 400/403 errors - **Routes to correct models** — maps any request to `claude-sonnet-5` or `claude-opus-5` automatically - **Rotates credentials** — round-robin account pool with cooldown and auto-recovery on rate limits - **Streams responses** — zero-allocation SSE passthrough for real-time token streaming - **Supports agentic coding** — `tools` and `tool_choice` are preserved and forwarded for full Claude Code CLI compatibility --- ## Supported Models | Model | ID | |-------|----| | Claude Sonnet 5 | `claude-sonnet-5` | | Claude Opus 5 | `claude-opus-5` | --- ## Quick Start ### 1. Configure accounts Edit `config.yaml`: ```yaml accounts: tokens: - "Bearer YOUR_WPCOM_TOKEN_HERE" server: port: 8085 upstream_url: "https://public-api.wordpress.com/wpcom/v2/ai-api-proxy/v1/messages" ``` ### 2. Run the gateway ```bash go run cmd/gateway/main.go ``` Gateway starts on `http://127.0.0.1:8085`. ### 3. Point your AI tool at the gateway **Claude Code CLI:** ```bash claude config set apiBaseUrl http://127.0.0.1:8085 claude config set apiKey "Bearer YOUR_GATEWAY_TOKEN" ``` --- ## Architecture ``` Claude Code CLI / Cline / Cursor │ ▼ wpcom-ai Gateway (127.0.0.1:8085) │ • Payload normalization │ • Accoun