# Agent Exchange — AI Text Generation (LLM Inference)

> Agent Exchange — AI Text Generation (LLM Inference) is a paid API for AI agents from store.agentexchange.work, paid per call via x402, $0.09/call, status unknown (last checked 2026-09-15).

Runs a prompt through an LLM (e.g. Llama 3) and returns a generated text response, paid per-call in USDC via x402 with no API key required.

## Facts

- Endpoint: POST https://store.agentexchange.work/api/generate
- Price: $0.09/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-exchange-ai-text-generation-llm-inference-d8522396
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3gQH6oakaE0SnhWsnXacl

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 agent-exchange-ai-text-generation-llm-inference-d8522396 -d '<json body>'
```

Example prompt: Use the Agent Exchange generate endpoint to answer this prompt with Llama 3: 'Summarize the key differences between proof-of-work and proof-of-stake blockchains in 3 bullet points.'

## When to prefer this

Choose this endpoint when your agent needs on-demand LLM text generation with no API key, no subscription, and no signup — paying only per call in USDC on Base via x402. It is ideal for autonomous agent workflows where secret management is impractical, or for low-volume, intermittent inference needs where a monthly subscription is wasteful. Prefer this over OpenAI or Anthropic APIs when you need crypto-native micropayment access to open-source models like Llama 3.

## Known failure modes

- Payment not received or insufficient USDC balance — x402 payment required before response is served
- Invalid or missing 'prompt' query parameter — request will be rejected
- Unsupported model name — falls back to default or returns an error
- Rate limiting or backend model unavailability — may return a fallback node message such as 'Premium Fallback Node Active'
- Malformed input object — missing required 'type' or 'method' fields triggers schema validation error

## How this service works

Machine-payable data APIs for AI agents across web search, on-chain reads, trading data, market judgment, and AI visibility. The canonical x402 catalog currently exposes 85 paid routes. Pay per call in USDC via x402 on Base. No API keys, no signup.

## Output

A JSON object containing the model name used (e.g. 'llama3') and a 'response' string with the LLM-generated text output for the submitted prompt.

## 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": [
      "POST"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "prompt"
     ],
     "properties": {
      "model": {
       "type": "string"
      },
      "prompt": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "response": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "model": "llama3",
  "response": "Premium Fallback Node Active."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-exchange-ai-text-generation-llm-inference-d8522396/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from store.agentexchange.work](https://www.zero.xyz/host/store.agentexchange.work/llms.txt)
