Documentation Index
Fetch the complete documentation index at: https://docs.flex.ai/llms.txt
Use this file to discover all available pages before exploring further.
Free credit
Every new account is granted $10 of free credit on signup. No card required — you can evaluate all text, image, video, and audio models before paying anything. When the free credit runs out, your next API call returns402 Payment Required. Add a card from the dashboard to continue; any credit you add is spent down at the same per-model rates.
How we bill
Dollar-denominated, per-request. We don’t sell token bundles, we don’t subscribe you — we meter what you use:| Model type | Unit |
|---|---|
| Text / chat / completions / reasoning | Per million input tokens, per million output tokens. |
| Image generation | Per image. |
| Video generation | Per second of output video. |
| Text-to-speech | Per character of input text. |
| Speech-to-text | Per minute of input audio. |
Streaming a chat completion and stopping early still bills for the tokens that were generated before you closed the connection — the model did the work. Set
max_tokens to cap worst-case spend.Rate limits
Per-API-key, per-minute. Limits are set by tier:These numbers are generated from
backend/api_rate_limiter.py and backend/lago_client.py in the token-service repo. They update automatically when those files change.| Tier | Requests per minute |
|---|---|
| Free (default on signup) | 10 |
| Elevated (approved users) | 60 |
| Paid | 300 |
| Header | Meaning |
|---|---|
x-ratelimit-limit-requests | RPM ceiling for this key. |
x-ratelimit-remaining-requests | Requests left in the current window. |
x-ratelimit-reset-requests | Unix timestamp when the window resets. |
429 Too Many Requests with a Retry-After header (seconds to wait). Don’t retry in a tight loop — back off until the header’s deadline.
When credit runs out
Our API returns402 Payment Required with this body:
Adding a card
From dashboard/billing:- Click Add payment method.
- Enter card details (processed by Stripe; we never see the number).
- Top up by any amount ≥ $5. The balance is added to your account immediately.