Connect your AI workflow.
Track every token.
An AI API platform for developers and small teams. Connect your tools and applications, manage API keys and team quotas, and track usage costs in one dashboard.
from openai import OpenAI
client = OpenAI(
base_url="https://relay.4aicode.com/v1",
api_key="sk-4ai-...",
)
response = client.responses.create(
model="gpt-6-astra",
input="Hello",
)Tokens today
384,120
Cost today
$0.428
Keys / members
4 / 6
Unified API integration for your entire team's AI usage
Keep the developer tools and SDKs you know, with centralized billing and controls through 4AICode.
Codex CLI
Connect Codex CLI to the 4AICode unified endpoint to use supported models in terminal and IDE workflows.
# ~/.codex/config.toml model_provider = "OpenAI" openai_base_url = "https://relay.4aicode.com/v1" model = "gpt-6-astra" model_reasoning_effort = "xhigh" [model_providers.OpenAI] name = "4aicode" base_url = "https://relay.4aicode.com/v1" wire_api = "responses" experimental_bearer_token = "sk-4ai-..." requires_openai_auth = true
OpenAI-Compatible API
Point base_url to 4AICode so services, scripts, and automations share one team balance and key management.
base_url=https://relay.4aicode.com/v1 api_key=sk-4ai-... POST /v1/responses
Team Console
Track usage by member, API Key, and model, with centralized management of quotas, billing, and permissions.
Create organization → Invite members → Assign API keys Review token details and balance usage
Why teams choose 4AICode
Turn fragmented AI access into a measurable, assignable, and auditable API service.
Precise token-based billing
Pay only for what you use, with transparent billing for teams, members, and API Keys.
Regional endpoints
Choose international or mainland China endpoints to suit your deployment region.
Enterprise multi-tenancy
Organization-level isolation and quotas, with separate API Keys for sub-accounts and team members.
Stream passthrough
SSE is forwarded unchanged; upstream resources are released within 1 second after the client disconnects.
Full Usage Statistics
30-day usage chart; token details for each request are downloadable.
OpenAI-Compatible
Continue using the OpenAI protocol and toolchain; applications only need to standardize the base_url and API Key.
Start in three steps
Usually takes under 60 seconds.
Create account
Log in with email or Google. New users receive $5 in trial credits.
# Visit 4aicode.com/register
Generate API Key
Console → Tokens, click “Create”. The plaintext is shown only once, so be sure to save it.
sk-4ai-1a2b3c4d5e6f...
Replace Endpoint
Configure the OpenAI provider in Codex CLI; change base_url and API Key in the OpenAI SDK.
base_url=https://relay.4aicode.com/v1 experimental_bearer_token=sk-4ai-...
Billing & Pricing
Transparent token unit rates across all models. Choose monthly plans for bundled credits or pay-as-you-go wallet top-ups for flexible scaling.
Model Rates
All tokens and unit calls are billed strictly by actual usage. Token pricing is displayed in USD per 1M tokens.
Rates are in USD. A dash means no separate rate is published for that field. Cache and long-context billing rules may affect the final charge. Billing details
Subscription Plans & Passes
Monthly subscriptions issue fixed quotas and soft-caps; pay-as-you-go balance never expires.