# x402engine Qwen Coder LLM

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

Runs Qwen3 Coder model inference via pay-per-call HTTP 402 micropayment, returning OpenAI-compatible chat completions optimized for code generation and reasoning.

## Facts

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

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-qwen-coder-llm-35a91686 -d '<json body>'
```

Example prompt: Using the Qwen Coder model on x402engine, write me a Python function that parses a JSON file and returns a filtered list of records where the 'status' field equals 'active' — stream the response as it comes in.

## When to prefer this

Choose this endpoint when you need a coding-specialized LLM (Qwen3-Coder) with no subscription or rate-limit overhead, paying only $0.002253 per call in USDC. Prefer it over general-purpose LLMs for programming tasks, code generation, and technical reasoning. Ideal for agents that need OpenAI-compatible chat completions with optional streaming and function-calling support, settled via x402 micropayment on Base, MegaETH, or Solana.

## Known failure modes

- Payment not settled — 402 response if USDC/USDm payment is missing or insufficient
- Invalid messages array — 422 if required 'messages' field or 'role' is missing
- Malformed tool definition — error if function schema is invalid
- Context length exceeded — error if message history exceeds model's token limit
- Model unavailable — 503 if upstream Qwen model is temporarily down
- Streaming timeout — connection may drop on very long generations

## 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

An OpenAI-compatible JSON response containing the model name ('qwen/qwen3-coder-next'), a choices array with the assistant's message (role, content, finish_reason), and optionally tool_calls if the model invoked a client-defined function. A top-level 'content' shortcut field is also returned. Streaming mode returns SSE chunks in the same format.

## 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."
      },
      "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"
          ]
         }
        ],
        "required": [
         "role"
        ],
        "properties": {
         "name": {
          "type": "
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "model": "qwen/qwen3-coder-next",
  "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-qwen-coder-llm-35a91686/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)
