# OpenMayhem API

OpenMayhem is a pay-per-use inference API over a decentralised provider
network. The API is OpenAI-compatible: point an SDK you already use at
`https://api.openmayhem.ai/v1`, pick a model from the live catalog, and pay per request from
prepaid credit.

## How it works

- You hold prepaid credit. Before a request is dispatched its worst-case cost
  is held; after completion the actual cost is charged and the rest released.
  You can never spend below zero.
- Every charge settles against a receipt signed by the provider that did the
  work. The response carries the exact cost in USD in `usage.cost` and the
  receipt identity in `openmayhem.receipt`.
- Prices are public per model, including full price history and current
  provider availability: `GET https://api.openmayhem.ai/v1/models` or https://openmayhem.ai/models

## Base URL

All endpoints live under `https://api.openmayhem.ai/v1` and authenticate with a bearer API key:

```
Authorization: Bearer sk-om-v1-...
```

The surface mirrors OpenAI where an equivalent exists, so most clients work
by changing only the base URL and key.
