# wave Inference

One OpenAI-compatible endpoint fronting 13 providers — measured routing, automatic failover, per-token metering. The routing decision is measured (each model carries a floor→ceiling transition profile), not a hardcoded table.

## When to use
- A task needs LLM completion and you want the cheapest model that clears the measured bar.
- You want automatic failover: if a provider is down, the next serves.
- You want per-token spend attribution on a budgeted key.

## Endpoint
`POST https://inference.wave.online/v1/chat/completions`

```json
{"model": "gpt-5.6-luna", "messages": [{"role": "user", "content": "..."}], "max_tokens": 256}
```

Auth: `Authorization: Bearer <key>` (virtual keys carry budgets + model allowlists).

## Models (measured primaries)
| alias | best at | $/M in | $/M out |
|---|---|---|---|
| gpt-5.6-luna | reason, code | 2.50 | 1.20 |
| claude-sonnet-5 | reason (fallback) | 3.33 | 10.00 |
| deepseek-v4 | summarize, classify | 1.19 | 3.56 |
| gemini-3.7-flash | cheap summarize | 0.63 | 1.88 |
| qwen3.8-local | internal only ($0) | 0 | 0 |

Full list: `GET /v1/models`.

## Fallback chains (automatic)
`gpt-5.6-luna → deepseek-v4 → claude-sonnet-5` · `groq-fast → cerebras-fast → mistral`

## Errors
OpenAI-compatible JSON: `{"error":{"message","type","code"}}`. Guardrailed requests return `400` with `guardrail_blocked`.

## Health
`GET /health/liveliness` → `"I'm alive!"`

## For agents (MCP)
The plane is agent-operable via the `inference-funnel` MCP server (10 tools):
`funnel_status` · `funnel_models` · `funnel_complete` · `model_profile` · `usage_leaderboard` · `truth_loop` · `vk_attribute` · `meter_bridge` · `key_mint` · `key_list`.

a WAVE product · https://inference.wave.online