One base URL. Every Anthropic client.
SmoFeng API is a drop-in endpoint for Claude Code, OpenCode, and any Anthropic-compatible tool. Authenticate with an issued key, and every request is billed against a USD balance you control.
Drop-in compatible
Standard Anthropic Messages requests work unchanged — point your client at this base URL and go.
Streaming support
Server-sent events mirror Anthropic's message_start / content_block_delta / message_stop lifecycle.
Pay by balance
Each key carries a USD balance metered by real token usage. Requests stop when the balance runs out.
Managed keys
Issue, top up, disable, or revoke per-user keys from the admin panel. Bulk-import your token pool from a .txt file.
Quickstart
Choose your client below. Set the base URL to this deployment and use your issued API key (starts with sk-ant-).
# Point Claude Code at this endpoint
export ANTHROPIC_BASE_URL="https://your-deployment.vercel.app"
export ANTHROPIC_API_KEY="sk-ant-your-issued-key"
# Then run Claude Code as usual
claudeModels & pricing
Usage is metered per token and deducted from each key's balance. Rates are shown in USD per 1M tokens.
Haiku
Fast, lightweight
claude-haiku-4$1.00$5.00Sonnet
Balanced default
claude-sonnet-4$3.00$15.00Opus 4.8
Most capable
claude-opus-4-8$5.00$25.00Any Anthropic-style model ID containing haiku, sonnet, or opus resolves to the matching tier.
Endpoints
/v1/messagesCreate a message. Supports streaming (SSE) and non-streaming responses.
/v1/messages/count_tokensEstimate the token count for a request without generating a reply.
/v1/modelsList the available models.
Authentication
Every request must include an API key issued from the admin panel. Send it via the x-api-key header or as a Bearer token. Each key carries a USD balance; once it is exhausted, requests are rejected with a 402 until the balance is topped up.