Documentación
Authentication with API keys
FlowAPI uses 2 kinds of API key, both sent as Authorization: Bearer <key>: live keys start with flow_sk_live_ and are charged, test keys start with flow_sk_test_ and cost $0.
Send the key
bash
curl https://useflowapi.com/v1/balance -H "Authorization: Bearer $FLOWAPI_KEY"
A missing or unknown key answers 401 with FLOW_UNAUTHORIZED. FlowAPI never reads keys from query strings, so a key can't leak into logs or browser history through a URL.
Live and test keys
| Prefix | Charged | Calls a model | Result |
|---|---|---|---|
flow_sk_live_ |
Yes, the quoted price | Yes | The real generation |
flow_sk_test_ |
No, $0 | No | A fixed sample file |
Use test keys in CI and local development. Both kinds share the same endpoints, request format and validation, so a request that passes with a test key has the same shape a live key needs.
Monthly limit per key
Each key can carry a monthly spending limit set in the console. A job that would pass it is refused with 403 FLOW_SPEND_LIMIT_EXCEEDED before anything is charged.
Keep keys secret
- Call FlowAPI from your server, never from a browser or mobile app.
- Keep keys in environment variables or a secret manager, not in source control.
- Revoke a leaked key in the console; it stops working at once.
Preguntas frecuentes
- Can I put the API key in the URL?
- No. FlowAPI only reads the key from the Authorization: Bearer header, and the MCP endpoint rejects requests that carry a key in the query string.
- How do I tell live and test keys apart?
- By prefix: live keys start with flow_sk_live_ and test keys start with flow_sk_test_.
- Can I limit how much one key spends?
- Yes. Set a monthly limit on the key in the console; jobs that would exceed it are refused with HTTP 403 before any charge.