# ScanPay Chat Prompt — Pay-per-call LLM Inference

> ScanPay Chat Prompt — Pay-per-call LLM Inference is a paid API for AI agents from scanpay-edge.alextaghiashvili.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-11-16).

Sends a text prompt to an OpenAI-compatible LLM and returns a reply, billed per-call via x402 USDC micropayment with no signup or API key required.

## Facts

- Endpoint: GET https://scanpay-edge.alextaghiashvili.workers.dev/api/v1/chat-prompt?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/scanpay-chat-prompt-pay-per-call-llm-inference-b347a467
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YlY1DXyrbOnfeFZez-D26

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability scanpay-chat-prompt-pay-per-call-llm-inference-b347a467
```

Example prompt: Ask the ScanPay pay-per-call LLM: 'What are the top three reasons smart contracts get hacked?' — keep the answer under 256 tokens and charge 0.002 USDC via x402.

## When to prefer this

Choose this endpoint when your AI agent needs on-demand LLM inference without managing API keys or subscriptions, especially in x402-enabled micropayment pipelines. Ideal for autonomous agents that need occasional text generation and want to pay per-call in USDC (Base or Solana) rather than committing to a monthly plan. Best for short single-turn prompts up to 4000 characters with replies up to 512 tokens.

## Known failure modes

- Payment not received or x402 header missing — returns 402 Payment Required
- Prompt exceeds 4000 characters — validation error
- max_tokens out of range (below 16 or above 512) — validation error
- LLM provider timeout or upstream error — 502/503 response
- Prompt is empty or missing — 400 Bad Request

## How this service works

Pay-per-call x402 APIs for AI agents: OpenAI-compatible LLM chat, perp funding and arbitrage spreads, crypto prices, gas, FX, Solana SPL mint audit, token price by contract, x402 delivery-receipt verification, web search, clean page extraction, batch tools and deterministic code-security scanning. USDC on Base or Solana, no signup, no API key, from $0.0001 a call.

## Output

A JSON object containing a 'reply' field with the LLM-generated text response and a 'product' field identifying the service ('scanpay.chat_prompt'). The reply is capped at the requested max_tokens (default 256, max 512).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "prompt"
     ],
     "properties": {
      "prompt": {
       "type": "string",
       "maxLength": 4000,
       "minLength": 1
      },
      "max_tokens": {
       "type": "integer",
       "default": 256,
       "maximum": 512,
       "minimum": 16
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "reply": "OK",
  "product": "scanpay.chat_prompt"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/scanpay-chat-prompt-pay-per-call-llm-inference-b347a467/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from scanpay-edge.alextaghiashvili.workers.dev](https://www.zero.xyz/host/scanpay-edge.alextaghiashvili.workers.dev/llms.txt)
