# About — free-ai gateway

> Why it exists, how it routes, and what the SLOs are.

Canonical: https://ai-gateway.sassmaker.com/about/

[← free-ai](https://ai-gateway.sassmaker.com/)

# About

free-ai is an OpenAI-compatible gateway on top of a fleet of free LLM
providers. Send one request; the gateway scores 30+ candidate models
on per-IP rate-limit headroom, recent success rate, latency, and
capability fit, then routes to the best one with retry on failure.

## Why

Free tiers exist on Groq, Cerebras, SambaNova, OpenRouter, Workers AI,
Gemini, NVIDIA, and a few more. Each has different rate limits, model
coverage, and reliability. Routing across all of them gives you
meaningful free-tier throughput plus automatic fallback when one is
down — without you having to maintain the matrix.

## Capability filtering

- Requests with `tools` route only to tool-capable models.

- `response_format: json_object` routes to JSON-mode models.

- Image content routes to vision-capable models.

- If no candidate matches, the gateway returns `503` with a clear reason.

## Cost guardrails

Committed Cloudflare config is intentionally free-first:
`WORKERS_AI_ENABLED="false"` by default, CPU capped at the
Workers Free limit, Workers Logs sampling off, no paid Rate Limiting
binding. A `pnpm audit:cloudflare-costs` step runs in
`pnpm check` and the deploy pipeline, so a cost regression
fails the build before it ships.

## API shape

Use it like the OpenAI SDK. Set
`baseURL` to `https://ai-gateway.sassmaker.com/v1`
and pass a `project_id` in the body so usage gets logged
against your project for analytics.
