Integrations

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 /v1405 and long retries that feel “stuck”.

{ "models": { "providers": { "ai24x": { "baseUrl": "https://api.ai24x.com/v1", "api": "openai-completions", "apiKey": "YOUR_AI24X_API_KEY", "models": [ { "id": "flash", "name": "AI24X Flash", "reasoning": false, "input": ["text"], "contextWindow": 128000, "maxTokens": 8192, "api": "openai-completions" }, { "id": "pro", "name": "AI24X Pro", "reasoning": false, "input": ["text"], "contextWindow": 128000, "maxTokens": 8192, "api": "openai-completions" }, { "id": "ultra", "name": "AI24X Ultra", "reasoning": false, "input": ["text"], "contextWindow": 128000, "maxTokens": 8192, "api": "openai-completions" }, { "id": "auto", "name": "AI24X Auto", "reasoning": false, "input": ["text"], "contextWindow": 128000, "maxTokens": 8192, "api": "openai-completions" }, { "id": "shared", "name": "AI24X Shared (free daily, no tools)", "reasoning": false, "input": ["text"], "contextWindow": 128000, "maxTokens": 4096, "api": "openai-completions" }, { "id": "vip-kimi", "name": "Kimi (VIP)", "reasoning": false, "input": ["text"], "contextWindow": 128000, "maxTokens": 8192, "api": "openai-completions" }, { "id": "vip-mimo", "name": "MiMo (VIP)", "reasoning": false, "input": ["text"], "contextWindow": 128000, "maxTokens": 8192, "api": "openai-completions" }, { "id": "vip-qwen-max", "name": "Qwen Max (VIP)", "reasoning": false, "input": ["text"], "contextWindow": 128000, "maxTokens": 8192, "api": "openai-completions" }, { "id": "vip-glm", "name": "GLM (VIP)", "reasoning": false, "input": ["text"], "contextWindow": 128000, "maxTokens": 8192, "api": "openai-completions" }, { "id": "vip-minimax", "name": "MiniMax (VIP)", "reasoning": false, "input": ["text"], "contextWindow": 128000, "maxTokens": 8192, "api": "openai-completions" }, { "id": "vip-gpt5-mini", "name": "GPT-5 mini (VIP)", "reasoning": false, "input": ["text"], "contextWindow": 128000, "maxTokens": 8192, "api": "openai-completions" }, { "id": "vip-claude-sonnet", "name": "Claude Sonnet (VIP)", "reasoning": false, "input": ["text"], "contextWindow": 128000, "maxTokens": 8192, "api": "openai-completions" }, { "id": "vip-gemini-flash", "name": "Gemini Flash (VIP)", "reasoning": false, "input": ["text"], "contextWindow": 128000, "maxTokens": 8192, "api": "openai-completions" } ] } } } }

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:

curl -sS -X POST "https://api.ai24x.com/v1/chat/completions" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_AI24X_API_KEY" \ -d "{\"model\":\"flash\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}]}"

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. Use https://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-4o map to brand flash, not real GPT-4o. For the named model use vip-gpt4o.

8) CLI one-shot (optional)

Without changing your default primary provider:

openclaw agent --local --model ai24x/flash --session-key "agent:main:ai24x-smoke" --timeout 150 -m "Use a tool to print the current year"

Create account All integrations LobeChat guide VIP model list Console