# Blockle Inference API

> Blockle Inference API is a paid API for AI agents from blockle.org, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-31).

Runs a prompt through a hosted open-source LLM (Qwen or Llama) and returns the model's text completion, paid per-call via x402 micropayment.

## Facts

- Endpoint: POST https://blockle.org/api/inference/infer?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/blockle-inference-api-b8b81705
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0H4IVisPagBE_eNTMV_QO

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 blockle-inference-api-b8b81705 -d '<json body>'
```

Example prompt: Using Blockle's inference API with the qwen2.5:14b-instruct model, answer this question for me: 'What are the key differences between proof-of-work and proof-of-stake consensus mechanisms?'

## When to prefer this

Choose this endpoint when you need pay-as-you-go LLM inference without a subscription, want to use open-source models (Qwen2.5 or Llama3.1 families) at a specific hardware tier, or are operating in a crypto-native / x402 micropayment environment. It's especially suitable when you want to select a specific model size or hardware tier for cost/quality trade-offs, and when custodial account management with API key subscriptions is undesirable.

## Known failure modes

- Payment failure or insufficient USDC balance causes 402 response before inference runs
- Invalid or unsupported model name returns a validation error
- Prompt too long for the selected model's context window causes truncation or error
- Requesting a tier that is currently unavailable due to no active miners returns a service unavailable error
- Malformed JSON body or missing required 'prompt' field returns 400 bad request
- High temperature values may produce low-quality or incoherent completions

## How this service works

A non-custodial multi-chain wallet, a cross-chain exchange, and AI trading bots that trade on your command — your keys, your desk.

## Output

Returns a JSON object containing the text completion in the 'answer' field, the model name that served the request, the hardware tier used (as an integer), and a 'servedBy' object identifying which backend/miner processed the request.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "prompt"
 ],
 "properties": {
  "tier": {
   "enum": [
    "cpu",
    "4gb",
    "8gb",
    "12gb",
    "16gb",
    "24gb",
    "48gb",
    "80gb"
   ],
   "type": "string",
   "description": "Alternative to `model`: the hardware/price tier."
  },
  "model": {
   "enum": [
    "qwen2.5:1.5b-instruct",
    "qwen2.5:3b-instruct",
    "llama3.1:8b-instruct",
    "qwen2.5:14b-instruct",
    "qwen2.5:14b-instruct",
    "qwen2.5:32b-instruct",
    "llama3.1:70b-instruct",
    "qwen2.5:72b-instruct"
   ],
   "type": "string",
   "description": "Model to use (bigger = pricier). See GET /api/inference/models."
  },
  "prompt": {
   "type": "string",
   "description": "The prompt / user message."
  },
  "max_tokens": {
   "type": "integer",
   "description": "Max tokens to generate (optional)."
  },
  "temperature": {
   "type": "number",
   "description": "Sampling temperature (optional)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "tier": {
   "type": "integer",
   "example": 2
  },
  "model": {
   "type": "string",
   "description": "The model that served it."
  },
  "answer": {
   "type": "string",
   "description": "The model's completion."
  },
  "servedBy": {
   "type": "object",
   "description": "Which miner/backend served it."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/blockle-inference-api-b8b81705/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from blockle.org](https://www.zero.xyz/host/blockle.org/llms.txt)
