{
  "generated_at": "2026-04-24T15:01:35.625676+00:00",
  "slug": "api-x-router-ai-v1-chat-completions",
  "title": "X-Router AI \u00b7 Chat Completions API",
  "url": "https://api.x-router.ai/v1/chat/completions",
  "category": "ai",
  "summary": "Generate AI chat completions with token usage tracking through an OpenAI-compatible endpoint.",
  "seo": {
    "title": "AI Chat Completions API | X-Router x402 LLM",
    "description": "LLM chat completions for 0.135168 USDC per call. OpenAI-compatible API with token usage tracking. x402 micropayments on Base network."
  },
  "use_cases": [
    "Generate conversational AI responses",
    "Track token consumption for cost management",
    "Integrate LLM inference into agent workflows"
  ],
  "ideal_buyer": "AI agents requiring programmatic LLM access with transparent per-call pricing and usage analytics.",
  "example_prompt": "Generate a completion for the prompt 'Explain quantum computing in simple terms' and return token usage.",
  "risk_notes": [],
  "pricing_sanity": {
    "flag": "expensive_outlier",
    "ratio": 13.517,
    "median_category_atomic": 10000
  },
  "pricing_review_required": false,
  "pricing_decimal_suspect": false,
  "trust_tier": "indexed_external",
  "accepts": [
    {
      "scheme": "exact",
      "network": "base",
      "pay_to": "0xeb4da07be74b26b2966b3cd07842cade70e47d53",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "max_amount_required_atomic": "135168",
      "max_timeout_seconds": 120,
      "mime_type": "application/json",
      "description": "AI Chat Completion",
      "verified": false,
      "hints": {
        "input": {
          "type": "http",
          "method": "POST",
          "bodyType": "json",
          "bodyFields": {
            "model": {
              "type": "string",
              "description": "The AI model to use"
            },
            "stream": {
              "type": "boolean",
              "description": "Enable streaming response"
            },
            "messages": {
              "type": "array",
              "required": true,
              "description": "Array of message objects with role and content"
            },
            "max_tokens": {
              "type": "number",
              "description": "Maximum tokens in response, 1-128000"
            },
            "temperature": {
              "type": "number",
              "description": "Temperature for response randomness, 0-2"
            }
          },
          "discoverable": true
        },
        "output": {
          "model": {
            "type": "string",
            "description": "Model used for generation"
          },
          "usage": {
            "type": "object",
            "properties": {
              "total_tokens": {
                "type": "number",
                "description": "Total tokens used"
              },
              "prompt_tokens": {
                "type": "number",
                "description": "Number of tokens in the prompt"
              },
              "completion_tokens": {
                "type": "number",
                "description": "Number of tokens in the completion"
              }
            }
          },
          "content": {
            "type": "string",
            "description": "AI generated response content"
          }
        }
      }
    }
  ],
  "origin": {
    "slug": "api-x-router-ai",
    "host": "api.x-router.ai",
    "title": "xRouter API \u2014 AI Gateway with x402 Micropayments",
    "description": "Payment-enabled AI API gateway offering text chat completions and image generation via x402 protocol on Base. Agents pay per-request in USDC with upfront cost estimation and model discovery endpoints.",
    "url": "https://api.x-router.ai",
    "favicon": "https://x-router.ai/favicon.ico"
  },
  "json_ld": {
    "@id": "https://x402all.com/resource/api-x-router-ai-v1-chat-completions",
    "url": "https://x402all.com/resource/api-x-router-ai-v1-chat-completions",
    "name": "X-Router AI \u00b7 Chat Completions API",
    "@type": "WebAPI",
    "offers": {
      "url": "https://x402all.com/resource/api-x-router-ai-v1-chat-completions",
      "@type": "Offer",
      "price": "0.135168",
      "availability": "https://schema.org/InStock",
      "priceCurrency": "USDC",
      "priceSpecification": {
        "@type": "UnitPriceSpecification",
        "price": "0.135168",
        "unitText": "call",
        "priceCurrency": "USDC"
      },
      "eligibleCustomerType": "Agent",
      "additionalProperty": [
        {
          "@type": "PropertyValue",
          "name": "paymentNetwork",
          "value": "base"
        },
        {
          "@type": "PropertyValue",
          "name": "paymentAsset",
          "value": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
        }
      ]
    },
    "sameAs": "https://api.x-router.ai/v1/chat/completions",
    "@context": "https://schema.org",
    "provider": {
      "@id": "https://x402all.com/server/api-x-router-ai",
      "url": "https://api.x-router.ai",
      "name": "xRouter API \u2014 AI Gateway with x402 Micropayments",
      "@type": "Organization"
    },
    "identifier": "api-x-router-ai-v1-chat-completions",
    "description": "LLM chat completions for 0.135168 USDC per call. OpenAI-compatible API with token usage tracking. x402 micropayments on Base network.",
    "potentialAction": {
      "@type": "BuyAction",
      "target": "https://axon402.com/test-buy?resource=api-x-router-ai-v1-chat-completions",
      "description": "Test-buy this endpoint on AXON"
    },
    "applicationCategory": "ai"
  },
  "axon_deep_link": "https://axon402.com/test-buy?resource=api-x-router-ai-v1-chat-completions"
}
