# Devstral Code LLM via x402 Gateway

> Devstral Code LLM via x402 Gateway is a paid API for AI agents from x402-gateway-production.up.railway.app, paid per call via x402, $0.020000/call, status unknown (last checked 2026-09-15).

Runs Mistral's Devstral code-focused language model, optimized for software development and technical tasks, accessible via x402 micropayment protocol

## Facts

- Endpoint: POST https://x402-gateway-production.up.railway.app/api/llm/devstral
- Price: $0.020000/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 1
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-gateway-production-up-railway-app-c928ddff
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JobDqlWd-62Cy-zw8ni1x

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-c928ddff -d '<json body>'
```

Example prompt: Write me a Python function that parses a CSV file and returns a list of dicts, with error handling for malformed rows — use Devstral since this is a coding task.

## When to prefer this

Choose this endpoint when the task is primarily code-related — writing, debugging, explaining, or refactoring code — and you want a model specifically optimized for software development rather than a general-purpose LLM. Prefer over GPT-4o or Claude if cost-sensitivity matters and the task is purely technical coding work. The x402 micropayment at $0.02 USDC per call makes it suitable for high-volume programmatic code generation workflows.

## Known failure modes

- Invalid or missing prompt body returns 400 error
- Payment not provided or insufficient USDC returns 402 payment required
- Model overload or upstream Mistral API unavailability returns 503
- Malformed JSON request body returns 400
- Prompt too long exceeding model context window returns 413 or error message

## How this service works

Mistral's code-focused model — optimized for software development and technical tasks

## Output

A text response containing generated code, code explanations, debugging suggestions, or technical answers produced by Mistral's Devstral model, which is specifically fine-tuned for software development tasks.

## Example request

```json
{
 "messages": [
  {
   "role": "user",
   "content": "Write a Python function that validates email addresses using regex and returns True if valid, False otherwise. Include error handling for edge cases."
  }
 ]
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-gateway-production-up-railway-app-c928ddff/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)
