Getting started

What is 4AICode?

LLMs Text

What Is 4AICode

4AICode is an AI API access and usage management platform designed for developers and growing teams. By providing unified API endpoints and a centralized management console, it lets you integrate coding assistants like Claude Code, Codex CLI, Cursor, and custom applications with leading AI models—all while managing API keys, team quotas, and usage costs in one place.

Access Routes

  • 4aicode.com / relay.4aicode.com: Default international route, providing unified account, token, and API services.
  • 4aicode.net / relay.4aicode.net: Optional endpoint for deployments in mainland China.

Key Capabilities

  • Unified Integration: Compatible with Anthropic Messages and OpenAI API specifications, supporting major CLIs, IDE plugins, and official SDKs.
  • Transparent Token Billing: Pay strictly based on actual token usage, with granular cost records and status visibility for every request.
  • Team Quota Controls: Multi-tenant workspace isolation, team member allocation, and per-key spend caps and quotas.
  • Comprehensive Analytics: Monitor spending trends, model consumption, and request histories with downloadable usage records.

Who Is It For

  • Developers using Claude Code CLI / Codex CLI for everyday software engineering
  • Engineers coding with IDE extensions such as Cursor, VS Code, Cline, or Continue
  • Teams building proprietary tools or backend services using /v1/messages or /v1/chat/completions

Billing & Quota Details

4AICode operates on transparent token consumption metrics:

  • Pay-as-you-go Wallet: Top up your balance anytime. Charges follow published model rates and actual token usage. Check the billing page for your balance and applicable terms.
  • Subscription Plans: Plans provide periodic credits. Check the current plan details for allowances, reset periods, and usage limits.
  • Upstream Availability: Actual response latencies, model availability, and concurrency limits depend on upstream provider status and policies.

Input, output, and cache rates are quoted in USD / 1M tokens. Models billed per request, such as image models, are listed separately. See the homepage model rate table for unit prices and Billing & pricing for plans and top-ups. Request processing and retention are described in the Privacy Policy.

Get Started in Three Steps

1. Register an Account

Visit 4aicode.com (or 4aicode.net in mainland China) and complete registration. You will automatically receive a personal account and organization workspace.

2. Create an API Key (Token)

Navigate to Dashboard → Manage Tokens → New Token, give it a name, and click Create.

⚠️ The token string is displayed only once. Copy it immediately to a password manager. Once you close the dialog, the plain text cannot be viewed again and can only be revoked and recreated.

Example format: sk-4ai-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

3. Configure Your Tool

Taking Claude Code CLI as an example, set the environment variables in your terminal:

export ANTHROPIC_BASE_URL=https://relay.4aicode.com
export ANTHROPIC_AUTH_TOKEN=sk-4ai-xxxx...

Follow the Claude setup guide to complete tool-specific settings, then run claude to send a test request. Check the console for its usage record. For OpenAI-compatible tools or Codex CLI, see ChatGPT Configuration.

Next Steps