Directory / Commerce & payments

AI chat completions API

AI chat completions API - pay per request with USDC on Base

not checked yetBasePOSTx402 v2

Price per call
$0.002
Endpoint
https://blockrun.ai/api/v1/chat/completions
Provider
blockrun.ai
Paid calls (30 days)
74k
Unique payers (30 days)
322
Last paid call
3 h ago
Health check
pending
Pays to
0xe9030014F5DAe217d0A152f02A043567b16c1aBf
Listed here since
2026-11-23 (source: bazaar)

Input

{
  "bodyFields": {
    "max_tokens": {
      "description": "Maximum tokens to generate",
      "type": "integer"
    },
    "messages": {
      "description": "Array of chat messages with role and content",
      "type": "array"
    },
    "model": {
      "description": "AI model ID (e.g., gpt-4o-mini, claude-haiku-4.5)",
      "type": "string"
    },
    "stream": {
      "description": "Enable streaming responses",
      "type": "boolean"
    },
    "temperature": {
      "description": "Sampling temperature (0-2)",
      "type": "number"
    }
  },
  "discoverable": true,
  "method": "POST",
  "type": "http"
}

Example output

{
  "example": {
    "choices": [],
    "usage": {}
  },
  "type": "json"
}

Call it from an agent

import { wrapFetchWithPayment } from "x402-fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.AGENT_PRIVATE_KEY);
const paidFetch = wrapFetchWithPayment(fetch, account);

const res = await paidFetch("https://blockrun.ai/api/v1/chat/completions", { method: "POST" });
console.log(await res.json()); // costs $0.002 in USDC on Base

Machine-readable: /api/tools/0bf4f1904793. Listings are informational; check a provider before sending large amounts.

Similar tools

ToolPrice / callPayers (30d)Status
Base network and USDC payment metadata Base network and USDC payment metadata Commerce & paymentswww.api-xpay.comBase $0.005117not checked yet
Payment receipt with transaction details Payment receipt with transaction details Commerce & paymentswww.api-xpay.comBase $0.005106not checked yet
Service status and payment configuration Service status and payment configuration Commerce & paymentswww.api-xpay.comBase $0.005102not checked yet
API recommendation and x402 discovery for your task API recommendation and x402 discovery for your task. Required query: need. Which API should I call? Recommends which x402 API to use for any task, with evidence. Describe a task in… Commerce & paymentsapi.agents-trust.comBase $0.0154not checked yet
Cheapest end-to-end x402 purchase test Cheapest end-to-end x402 purchase test. Always returns a 402 challenge without payment and the current full NegPrice decision after a valid USDC payment. Commerce & paymentsenergy.halowerk.comBase $0.00123not checked yet