# GPT-4.1 via x402 Gateway (Balanced Tier)

> GPT-4.1 via x402 Gateway (Balanced Tier) is a paid API for AI agents from x402-gateway-production.up.railway.app, paid per call via x402, $0.035/call, status unknown (last checked 2026-09-15, last successful call 2026-05-08).

Calls OpenAI's GPT-4.1 model for general-purpose text generation and reasoning via a pay-per-call x402-enabled gateway

## Facts

- Endpoint: POST https://x402-gateway-production.up.railway.app/api/llm/gpt-5.1
- Price: $0.035/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Last successful call: 2026-05-08
- Success rate: 100% of calls made through Zero
- Activations on Zero: 4
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-gateway-production-up-railway-app-611a143e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_G_HyS3zPlDQPis5ItOQDR

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

Example prompt: Use GPT-4.1 to write me a one-paragraph explanation of how transformer neural networks work — I want it clear enough for a non-technical audience.

## When to prefer this

Choose this endpoint when you need strong all-around language model performance (reasoning, summarization, drafting, Q&A) at a moderate cost point — better than the cheapest GPT-5 nano tier but less expensive than GPT-5.2. Ideal for medium-complexity tasks where quality matters but cost per call should stay low. Use when you want pay-per-call x402 billing without managing OpenAI API keys.

## Known failure modes

- Invalid or missing messages array returns 400 bad request
- Insufficient USDC payment returns 402 Payment Required
- Rate limiting or upstream OpenAI outage returns 503
- Malformed role values in messages cause validation errors
- Very long prompts may exceed model context window and return an error

## How this service works

OpenAI's efficient flagship model — strong all-around performance at lower cost than GPT-5.2

## Output

Returns the model's generated text content along with token usage breakdown (prompt tokens, completion tokens, total), upstream inference cost in USD, and the model identifier (e.g. openai/gpt-4.1-20251113).

## Example request

```json
{
 "messages": [
  {
   "role": "user",
   "content": "Explain the concept of machine learning in one paragraph."
  }
 ]
}
```

## More

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