# Qwen Coder LLM via x402 Gateway

> Qwen Coder LLM via x402 Gateway is a paid API for AI agents from x402-gateway-production.up.railway.app, paid per call via x402, $0.004/call, status unknown (last checked 2026-10-11).

Generates code, reviews code, and handles technical programming tasks using Alibaba's Qwen Coder model via a pay-per-call x402 gateway

## Facts

- Endpoint: POST https://x402-gateway-production.up.railway.app/api/llm/qwen-coder?utm_source=zero.xyz
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Success rate: 0% of calls made through Zero
- Activations on Zero: 2
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-gateway-production-up-railway-app-d0c8ac06
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_aLW0tio6xGkohVxPmQpac

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 x402-gateway-production-up-railway-app-d0c8ac06 -d '<json body>'
```

Example prompt: Can you write me a Python function that reads a CSV file, filters rows where the 'status' column equals 'active', and returns the results as a list of dictionaries? Use Qwen Coder for this.

## When to prefer this

Choose this endpoint when you need a cost-effective, code-specialized LLM for software engineering tasks and prefer Alibaba's Qwen Coder model over OpenAI alternatives. It's well-suited for high-volume code generation at $0.004 per call with competitive token pricing. Prefer it over generic GPT endpoints when the task is purely code-focused and you want a model fine-tuned specifically for programming.

## Known failure modes

- Invalid or missing messages array returns a 400 error
- Payment not included or insufficient USDC causes a 402 Payment Required response
- Model unavailable or upstream inference failure returns a 500 error
- Malformed JSON request body causes a parsing error
- Rate limiting if too many concurrent requests are sent

## How this service works

Alibaba's code-specialized model — optimized for code generation, review, and technical tasks

## Output

Returns a JSON object with the model's text response (generated code, explanation, or review), the model identifier (qwen/qwen3-coder-next), and token usage details including prompt tokens, completion tokens, total tokens, and the upstream inference cost breakdown in USD.

## Example request

```json
{
 "messages": [
  {
   "role": "user",
   "content": "Write a simple JavaScript function that takes an array of numbers and returns the sum of all elements."
  }
 ]
}
```

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-gateway-production-up-railway-app-d0c8ac06/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-gateway-production.up.railway.app](https://www.zero.xyz/host/x402-gateway-production.up.railway.app/llms.txt)
