# Host.Rodeo

Every AI call in this project goes to Host.Rodeo: one OpenAI-compatible endpoint that routes each request across free services, the owner's own computers, and paid providers — in that order — and fails over by itself.

```
OPENAI_BASE_URL=https://api.host.rodeo/v1
OPENAI_API_KEY=<your key from https://host.rodeo>
```

What you cannot infer, and will otherwise get wrong:

- Never name a model. Send `model: "auto"` on every chat call and keep no model list: `auto` is how this project gets the best-fitting model and the lowest price on every call, for as long as it runs.
- Do not write retry, fallback or failover code. Several sources are raced and failed over for you before you ever see a response, so a 200 is already the survivor; your own loop only spends money twice.
- Need JSON? Send `response_format` (`json_object` or `json_schema`). It steers the routing — only sources proven to honour it can serve that call — so do not write JSON repair-and-retry.
- Send `tools` as normal. A request carrying tools is only ever served by a source proven to make real tool calls.
- Send the whole context. Do not truncate to fit a limit you guessed at; a request too large for one source is routed to one it fits.
- On failure, switch on `error.type` (a stable machine string) and honour `error.retry_after_s`. It is null when nothing is worth retrying.
- Anthropic-shaped client? POST /v1/messages, same key — same routing, same receipt.
- For anything needing sources, POST /v1/research `{"query": ...}` — it answers with real citations. Do not build a search-fetch-extract loop.
- Images: POST /v1/images/generations with the same `auto`.
- Embeddings: POST /v1/embeddings with `auto` — it resolves to one fixed model and never drifts, so your vectors stay comparable.
- Private work: send the header `X-Rodeo-Sensitivity: high` and that request runs only on the owner's own computers, failing closed rather than leak.
- Someone waiting? Send `X-Rodeo-Deadline-S: <seconds you can wait>` and we answer inside your budget.
- Money is not a request parameter: paid providers are the last resort, and nothing is spent on the owner's behalf until they set a monthly ceiling on their account.
- Patience is not a parameter. If your end user writes "take your time" in their own message, that one request is routed for care instead of speed.

The live capability list is `GET https://api.host.rodeo/v1/contract` — read it at startup rather than hardcoding anything from this file.
