# Aile AI Model Exchange - Inference Endpoint

> Aile AI Model Exchange - Inference Endpoint is a paid API for AI agents from api.aile.sh, paid per call via x402, $0.020493/call, status unknown (last checked 2026-10-12).

Sends a prompt to a catalogued AI model (e.g. Claude, GPT, DeepSeek) via Aile's pay-per-token marketplace, settling payment in USDC on Solana.

## Facts

- Endpoint: POST https://api.aile.sh/v1/responses?utm_source=zero.xyz
- Price: $0.020493/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/aile-ai-model-exchange-inference-endpoint-6e1f46f2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Dy33qDUH77vxBbSzWgqny

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 aile-ai-model-exchange-inference-endpoint-6e1f46f2 -d '<json body>'
```

Example prompt: Using Aile's AI exchange, send this prompt to claude/claude-sonnet-5 with a max of 500 output tokens and tell me what it says: 'Summarize the key differences between REST and GraphQL APIs in three bullet points.'

## When to prefer this

Choose this endpoint when you need pay-as-you-go access to premium AI models (Claude, GPT-5, DeepSeek) without committing to vendor subscriptions, want USDC on-chain settlement for crypto-native workflows, or need a single unified API to route prompts across multiple model providers at live market prices.

## Known failure modes

- Insufficient USDC balance or failed x402 payment — call rejected before inference
- Invalid or uncatalogued model ID — 400 error; use GET /v1/models to list available models
- Prompt too long for the requested max_output_tokens budget — token limit exceeded error
- Model temporarily unavailable on the exchange — no idle supply listed
- Rate limiting if too many concurrent calls are submitted

## How this service works

Rent trusted AI models priced per token; lend idle subscriptions and API keys. A live, metered market that settles every call in USDC on Solana.

## Output

Returns a JSON object with a response ID, the model used, the generated output text, and token usage counts (input and output tokens consumed), enabling cost tracking per call.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "input",
  "model"
 ],
 "properties": {
  "input": {
   "type": "string",
   "description": "The prompt text. Arrays of content parts are also accepted."
  },
  "model": {
   "type": "string",
   "description": "A catalogued model id, namespaced by its provider — e.g. `claude/claude-sonnet-5`, `codex/gpt-5.5`, `openrouter/deepseek/deepseek-v4-flash`. GET /v1/models lists what is servable right now."
  },
  "stream": {
   "type": "boolean",
   "description": "SSE token stream when true. Not available on the x402 path."
  },
  "max_output_tokens": {
   "type": "integer",
   "description": "THE PRICE IS QUOTED AGAINST THIS."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "id": "resp_…",
 "model": "codex/gpt-5.5",
 "usage": {
  "input_tokens": 28,
  "output_tokens": 16
 },
 "object": "response",
 "output_text": "…"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/aile-ai-model-exchange-inference-endpoint-6e1f46f2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.aile.sh](https://www.zero.xyz/host/api.aile.sh/llms.txt)
