x402basequality 0.40

x402-enabled AI chat completion gateway paying with USDC on Base

Price
0.1352 USDC / call
Protocol
x402
Verified
no

What it does

xRouter API is a payment-enabled AI API gateway that uses the x402 protocol to accept USDC payments on the Base network. The `/v1/chat/completions` endpoint provides AI chat completion functionality via a standard OpenAI-compatible POST interface. The gateway also exposes free auxiliary endpoints: `/v1/models` to list available text models with pricing, and `/v1/estimate` to estimate the cost of a text completion before committing payment.

Beyond text, xRouter offers image generation endpoints (`/v1/images/generate`, `/v1/images/models`, `/v1/images/estimate`), though this listing covers the chat completions endpoint specifically. The API self-describes as version 1.2.0 and runs on a Fastify-style server (based on the 404 error format). No formal OpenAPI schema or detailed documentation pages were found during crawling; the root endpoint serves a JSON manifest describing available routes.

Note that during probing, the endpoint returned HTTP 400 (Bad Request) on POST rather than the expected 402 Payment Required challenge. This may indicate the endpoint requires a specific request body structure before issuing a payment challenge, or it could signal a configuration issue. Without a captured 402 challenge or detailed docs, the exact payment flow and supported models remain uncertain.

Capabilities

chat-completionx402-paymentusdc-on-baseopenai-compatible-apicost-estimationmodel-listingimage-generation

Use cases

  • Agent-driven LLM inference with per-request USDC micropayments
  • Estimating costs before making paid AI completions
  • Listing available models and their pricing to select the best option
  • Building autonomous AI agents that pay for their own inference

Fit

Best for

  • AI agents needing pay-per-call LLM access without API keys
  • Developers building x402-native applications on Base
  • Scenarios requiring cost estimation before committing to a completion

Not for

  • High-volume production workloads needing guaranteed SLAs (no docs on rate limits or uptime)
  • Users who need detailed API documentation or OpenAPI specs before integrating

Quick start

# Estimate cost first (free)
curl https://api.x-router.ai/v1/estimate \
  -X POST -H 'Content-Type: application/json' \
  -d '{"model": "gpt-4o-mini", "messages": [{"role": "user", "content": "Hello"}]}'

# List available models (free)
curl https://api.x-router.ai/v1/models

# Chat completion (requires x402 payment header)
curl https://api.x-router.ai/v1/chat/completions \
  -X POST -H 'Content-Type: application/json' \
  -H 'X-Payment: <x402_payment_token>' \
  -d '{"model": "gpt-4o-mini", "messages": [{"role": "user", "content": "Hello"}]}'

Example

Request

{
  "model": "gpt-4o-mini",
  "messages": [
    {
      "role": "user",
      "content": "Explain the x402 protocol in one paragraph."
    }
  ]
}

Endpoint

Transporthttp
Protocolx402
Pay to0xEb4DA07Be74b26b2966b3cD07842cADE70E47D53
CurrencyUSD COIN

Quality

0.40/ 1.00

The root JSON manifest confirms the endpoint exists and describes the payment protocol (x402, USDC, Base). However, no 402 challenge was captured (endpoint returned 400), no OpenAPI schema or docs are available, no model list or pricing details were retrieved, and the example response is inferred from OpenAI conventions rather than observed. Significant uncertainty remains about liveness and exact payment flow.

Warnings

  • Endpoint returned HTTP 400 on POST instead of the expected 402 payment challenge — liveness and payment flow unconfirmed
  • No OpenAPI schema, formal docs, or usage examples found
  • Supported models and per-request pricing are unknown — use /v1/models and /v1/estimate to discover at runtime
  • Example request body is inferred from OpenAI-compatible conventions, not confirmed by documentation

Citations

Provenance

Indexed fromx402_bazaar
Enriched2026-04-18 19:16:32Z · anthropic/claude-opus-4.6 · v2
First seen2026-04-18
Last seen2026-04-24

Agent access