OpenClaw → AI24X
OpenClaw is a local-first agent framework. Point it at AI24X for flash/pro (and VIP named models): chat, streaming, and tool calling so local commands can run—one key, PayPal USD billing.
1) Prerequisites
Sign up → Console → create an API key → keep a small credit balance. OpenClaw 2026.7.1+ recommended. Paste the key in full—never truncate with “…”.
2) Provider config (openclaw.json)
Add an ai24x provider under models.providers. Must use baseUrl=https://api.ai24x.com/v1 (most builds append /chat/completions). Missing /v1 → 405 and long retries that feel “stuck”.
Copy more ids from the VIP list the same way (vip-gpt5, vip-claude-opus…). shared = free daily text only (no tools). VIP ids need membership + prepaid credits. Completions allow up to 16384 max_tokens; OpenClaw maxTokens: 8192 is a safe client default.
3) Smoke test
In a clean OpenClaw session: /model ai24x/flash. Or from a terminal:
Expect HTTP 200 and choices[0].message.content. For agents, also expect tool_calls when the client sends tools.
4) Tools / commands (required for agents)
/v1/chat/completions supports OpenAI tools / tool_calls / role=tool (including streaming). With model flash or pro, OpenClaw can run local exec / read / web_fetch—same loop as other OpenAI-compatible providers. If the model only chats and never runs tools, check baseUrl, key, and that you are on Completions (not a Responses-only path).
Quick check in a clean session: ask OpenClaw to run a shell command that prints the current year. Pass = a real tool call in the trace (e.g. exec), not only text saying “I ran it”.
5) Streaming & long sessions
AI24X streams true SSE for Completions. Prefer a clean session when validating tools or long tasks—huge prior context (tens of thousands of tokens + large tool schemas) makes any model feel slow. Keep credit balance for paid routing when using tools.
6) Switch models: shared · China · GPT/Claude/Gemini
In a clean session: /model ai24x/shared (free text), /model ai24x/vip-kimi, /model ai24x/vip-claude-sonnet, etc. Prefer exact vip-* ids from the provider list. Short names like kimi / gpt / claude also map on Completions after the platform update—still best to pin vip-* in OpenClaw. Agents with tools: use flash/pro (or a VIP pick with balance)—not shared. Full catalog: VIP list.
7) Field notes (what actually broke setups)
- 405 / “stuck retries” — Base URL missing
/v1. Usehttps://api.ai24x.com/v1. If you see/v1/v1, switch to the root host once. - 401 — Invalid key, truncated key (ellipsis), or revoked key. Paste the full key from Console; create a new one if unsure. Revoked keys return a distinct “revoked” style error when the platform is up to date.
- Chat works, tools never run — Not “flash is too weak”. Confirm Completions + tools path, credit balance, and a clean session. Start with flash; use pro for harder tasks.
- Session overrides — A pinned session model can override your global default. Use a new session when testing AI24X vs another provider.
- 402 — Insufficient balance / prepaid needed for the model. Top up in Console.
- VIP names — Need active VIP + prepaid; add exact
vip-*ids to the provider models list. - shared + tools — Free daily pool is text-only; tool calls need a paid model (
flash/pro/vip-*) with balance. - gpt-4o in OpenAI clients — Drop-in names like
gpt-4omap to brandflash, not real GPT-4o. For the named model usevip-gpt4o.
8) CLI one-shot (optional)
Without changing your default primary provider:
Create account All integrations LobeChat guide VIP model list Console