XAI Router Codex Monthly Service: OpenClaw Integration Guide

Posted February 14, 2026 by XAI Technical Teamย โ€ย 2ย min read

If you only care about what you can call today and the simplest way to test it, this post is for you.


What We Provide

XAI Router provides a monthly Codex service behind a unified gateway endpoint. Different clients and calling styles can use the same base URL.


Supported Call Types (Monthly Codex Service)

  1. Native passthrough forwarding for Codex clients (CLI / App) Supports both Codex App and Codex CLI. After following the gpt-5.3-codex setup guide for Codex CLI, you can launch Codex App directly.
  2. OpenAI Responses API: POST /v1/responses Supports the newer Responses format (input) for everyday generation and common extension use cases.
  3. OpenAI Completions API: POST /v1/chat/completions Supports the classic Completions format (messages) for easy migration from existing integrations.
  4. Claude API (Anthropic-compatible): POST /v1/messages Supports Claude API-compatible requests (messages + anthropic-version) for direct integration with Anthropic-style clients.

If you only want one line: Codex clients (CLI / App), Responses, Completions, and Claude API are all supported.


Quick call examples

Replace ${XAI_API_KEY} with your own key.

Example 1: Codex client setup (CLI / App)

Set your Codex CLI gateway to https://api.xairouter.com and use ${XAI_API_KEY} as your API key. Once CLI is configured, you can also launch Codex App directly.


Example 2: Responses API

curl https://api.xairouter.com/v1/responses \
  -H "Authorization: Bearer ${XAI_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "model":"gpt-5.2-codex",
    "stream": false,
    "input":[
      {"type":"message","role":"user","content":[{"type":"input_text","text":"Summarize the top priority in one sentence"}]}
    ]
  }'

Example 3: Completions API

curl https://api.xairouter.com/v1/chat/completions \
  -H "Authorization: Bearer ${XAI_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "model":"gpt-5.3-codex",
    "stream": false,
    "messages":[{"role":"user","content":"Give me one sentence weather advice for Shanghai today"}]
  }'

Example 4: Claude API (Anthropic-compatible)

curl https://api.xairouter.com/v1/messages \
  -H "x-api-key: ${XAI_API_KEY}" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model":"gpt-5.3-codex",
    "max_tokens": 256,
    "messages":[{"role":"user","content":"Summarize the top task for today in one sentence"}]
  }'

OpenClaw Support (Important)

XAI Router monthly Codex service supports OpenClaw integration. If you are using OpenClaw, you can point it to XAI Router gateway and use Completions / Responses / Claude API (Anthropic-compatible) calls without complex rewrites.

One-line takeaway: to use the monthly Codex service quickly, connect your client to XAI Router and start calling; for a quick trial, sign up or log in at m.xairouter.com.