# x402engine o4-mini LLM API

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

Call OpenAI's o4-mini reasoning model via pay-per-call HTTP 402 micropayment, returning an OpenAI-compatible chat completion response.

## Facts

- Endpoint: POST https://x402engine.app/api/llm/o4-mini?utm_source=zero.xyz
- Price: $0.008978/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402engine-o4-mini-llm-api-a9660d34
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AYhNk0AJY__V3T6r_ppoj

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-o4-mini-llm-api-a9660d34 -d '<json body>'
```

Example prompt: Send these messages to o4-mini and return the response: system says 'You are a helpful assistant', and user asks 'Explain the difference between inductive and deductive reasoning in two sentences.'

## When to prefer this

Choose this endpoint when you need OpenAI's o4-mini reasoning model on a pay-per-call basis using USDC micropayments (Base, Solana, or MegaETH), with no subscription or API key required. Ideal for AI agents that need low-cost, high-reasoning inference billed per request, especially in workflows where you want OpenAI-compatible tool use, streaming SSE, or PDF parsing without committing to a monthly plan.

## Known failure modes

- Payment not settled — 402 response if USDC micropayment fails or wallet balance is insufficient
- Invalid messages array — 400 error if required 'messages' field is missing or malformed
- Context window exceeded — error if total token count surpasses o4-mini's context limit
- Tool schema invalid — error if function definitions are malformed or missing required 'function' key
- Rate limiting — upstream model provider throttling causing timeout or 429 response

## 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 chat completion object with model name ('openai/o4-mini'), a choices array containing the assistant message (role, content, tool_calls if applicable), finish_reason, and a top-level content field with the assistant's reply text.

## 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."
      },
      "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."
      },
      "stream": {
       "type": "boolean",
       "description": "Return live OpenAI-compatible SSE after payment settlement."
      },
      "plugins": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "pdf"
        ],
        "properties": {
         "id": {
          "enum": [
           "file-parser"
          ],
          "type": "string"
         },
         "pdf": {
          "type": "object",
          "properties": {
           "engine": {
            "enum": [
             "native"
            ],
            "type": "string"
           }
          }
         }
        }
       },
       "description": "Optional native PDF parser only; automatically enabled for file inputs."
      },
      "messages": {
       "type": "array",
       "items": {
        "type": "object",
        "anyOf": [
         {
          "required": [
           "content"
          ]
         },
         {
          "required": [
           "tool_calls"
          ]
         }
        ],
        "required": [
         "role"
        ],
        "properties": {
         "name": {
          "type": "string"
         },
         "role": {
          "enum": [
           "system",
   
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "model": "openai/o4-mini",
  "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-o4-mini-llm-api-a9660d34/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)
