# x402engine Llama LLM Inference (Pay-per-call)

> x402engine Llama LLM Inference (Pay-per-call) is a paid API for AI agents from x402engine.app, paid per call via x402, $0.002115/call, status unknown (last checked 2026-10-12).

Runs inference on Meta's Llama 3.3 70B Instruct model via a pay-per-call HTTP 402 micropayment API, returning OpenAI-compatible chat completions

## Facts

- Endpoint: POST https://x402engine.app/api/llm/llama?utm_source=zero.xyz
- Price: $0.002115/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402engine-llama-llm-inference-pay-per-call-26150ba9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_v3pt1UUOO-S8USUWScgC8

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 x402engine-llama-llm-inference-pay-per-call-26150ba9 -d '<json body>'
```

Example prompt: Send these messages to Llama 3.3 70B: system prompt 'You are a helpful assistant', user message 'Explain the difference between supervised and unsupervised learning in 3 sentences', and stream back the response.

## When to prefer this

Choose this endpoint when you need a capable open-source LLM (Llama 3.3 70B) without committing to a subscription or managing API keys — ideal for agents that pay per inference in USDC. Prefer it over proprietary LLM APIs when cost transparency per call matters, when you want OpenAI-compatible request/response format with a Llama backbone, or when your agent operates on-chain and needs micropayment-native LLM access. Use over other x402engine LLMs when Llama 3.3 70B's instruction-following and tool-calling capabilities are sufficient for the task.

## Known failure modes

- Payment not settled — HTTP 402 returned if USDC/USDm payment is not provided or insufficient
- Invalid messages array — missing required 'role' or 'content'/'tool_calls' fields returns a validation error
- Unsupported parameter for Llama model — parameters like seed or logprobs may be silently ignored or rejected depending on model capability
- Streaming timeout — SSE stream may drop if network latency exceeds settlement window
- Tool call schema mismatch — malformed function definitions cause inference errors or ignored tool calls

## How this service works

125 production APIs behind HTTP 402 micropayments. 87 LLMs, Kling V3 and Hailuo video generation, image generation, code execution, travel search, web scraping, TTS, and transaction simulation. Pay with USDC on Base, USDm on MegaETH, or USDC on Solana.

## Output

Returns an OpenAI-compatible JSON object containing the model name, an array of choices each with a message (role=assistant, content string or null), tool_calls if applicable, and a finish_reason (e.g. 'stop'). When streaming is enabled, returns SSE events with delta tokens in real time after payment settlement.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "bodyType",
    "body",
    "method"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "messages"
     ],
     "properties": {
      "seed": {
       "type": "integer",
       "description": "Model-supported seed; see /docs/llm-capabilities.md."
      },
      "stop": {
       "oneOf": [
        {
         "type": "string"
        },
        {
         "type": "array",
         "items": {
          "type": "string"
         },
         "maxItems": 4
        }
       ],
       "description": "Model-supported stop; see /docs/llm-capabilities.md."
      },
      "min_p": {
       "type": "number",
       "description": "Model-supported min_p; see /docs/llm-capabilities.md."
      },
      "tools": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "function"
        ],
        "properties": {
         "type": {
          "enum": [
           "function"
          ],
          "type": "string"
         },
         "function": {
          "type": "object",
          "properties": {
           "name": {
            "type": "string"
           },
           "strict": {
            "type": "boolean"
           },
           "parameters": {
            "type": "object"
           },
           "description": {
            "type": "string"
           }
          }
         }
        }
       },
       "description": "Client-executed function definitions; return results using role=tool and tool_call_id."
      },
      "top_k": {
       "type": "integer",
       "description": "Model-supported top_k; see /docs/llm-capabilities.md."
      },
      "top_p": {
       "type": "number",
       "description": "Model-supported top_p; see /docs/llm-capabilities.md."
      },
      "stream": {
       "type": "boolean",
       "description": "Return live OpenAI-compatible SSE after payment settlement."
      },
      "logprobs": {
       "type": "boolean",
       "description": "Model-supported logprobs; see /docs/llm-capabilities.md."
      },
      "messages": {
       "type": "array",
       "items": {
        "type": "object",
        "anyOf": [
         {
          "required": [
           "content"
          ]
         },
         {
          "required": [
           "tool_calls"
          ]
    
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "model": "meta-llama/llama-3.3-70b-instruct",
  "choices": [
   {
    "index": 0,
    "message": {
     "role": "assistant",
     "content": "Hello!"
    },
    "finish_reason": "stop"
   }
  ],
  "content": "Hello!"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402engine-llama-llm-inference-pay-per-call-26150ba9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402engine.app](https://www.zero.xyz/host/x402engine.app/llms.txt)
