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 dashboard
Track usage by member, API key, and model while managing quotas, billing, and permissions centrally.
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 billing
Transparent billing for every team, member, and API key.
Regional endpoints
Choose international or mainland China endpoints to suit your deployment region.
Multi-tenant teams
Organization-level isolation and quotas with separate API keys for every member.
Native streaming
SSE streams pass through directly, and upstream connections close within one second of disconnect.
Complete usage analytics
A 30-day usage chart and downloadable token details for every request.
OpenAI compatible
Keep your OpenAI tools and update only the base URL and API key.
Start in three steps
Usually takes under 60 seconds.
Create an account
Sign up with email or Google and receive $5 in trial credit.
# Visit 4aicode.com/register
Generate an API key
Open Dashboard → Tokens and select New. The secret appears once, so save it securely.
sk-4ai-1a2b3c4d5e6f...
Update your endpoint
Configure an OpenAI provider in Codex CLI, or update the 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.