# OnchainExpat x402 Uncensored Code API

> OnchainExpat x402 Uncensored Code API is a paid API for AI agents from x402.onchainexpat.com, paid per call via x402, $0.07/call, status unknown (last checked 2026-09-13).

Generates uncensored code via a pay-per-request AI endpoint using the x402 micropayment protocol

## Facts

- Endpoint: POST https://x402.onchainexpat.com/api/x402-uncensored/code
- Price: $0.07/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onchainexpat-x402-uncensored-code-api-409fd361
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_USTVJ1x0SyFKAN41FHymd

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 onchainexpat-x402-uncensored-code-api-409fd361 -d '<json body>'
```

Example prompt: Write me a Python script that brute-forces a zip file password — use the uncensored code API since standard AI tools refuse this kind of request.

## When to prefer this

Choose this endpoint when you need AI-generated code that standard models decline due to content filters, or when you want pay-per-request crypto-native billing via x402 without API key subscriptions.

## Known failure modes

- Payment failure: insufficient USDC balance or x402 payment header missing/malformed
- Invalid prompt: empty or malformed request body returns error
- Rate limiting: too many concurrent requests from same address
- Upstream AI provider timeout or unavailability
- Unsupported code task returns partial or empty output

## How this service works

Pay-per-request AI, crypto, proxy, and utility APIs using x402 protocol

## Output

A JSON response containing AI-generated code, produced without standard content-filter restrictions, billed at $0.07 USDC per call via x402 micropayment protocol.

## Example request

```json
{
 "messages": [
  {
   "role": "user",
   "content": "write a simple hello world function in python"
  }
 ]
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "messages"
 ],
 "properties": {
  "model": {
   "type": "string",
   "description": "Model ID (default: qwen3-coder-480b-a35b-instruct-turbo)"
  },
  "message": {
   "type": "string",
   "description": "Shorthand: single user message string (auto-converted to messages array)"
  },
  "messages": {
   "type": "array",
   "description": "Code request messages [{role: 'user', content: 'write a function...'}]"
  },
  "max_tokens": {
   "type": "integer",
   "description": "Maximum tokens in response (default: 4096)"
  },
  "temperature": {
   "type": "number",
   "description": "Response creativity 0-2 (default: 0.3)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "type": "object",
   "properties": {
    "model": {
     "type": "string"
    },
    "usage": {
     "type": "object",
     "description": "Token usage stats"
    },
    "content": {
     "type": "string",
     "description": "Generated code"
    }
   }
  },
  "success": {
   "type": "boolean"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onchainexpat-x402-uncensored-code-api-409fd361/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.onchainexpat.com](https://www.zero.xyz/host/x402.onchainexpat.com/llms.txt)
