Authentication and limits
API keys, request limits and spending limits.
Send your key in the x-api-key header, or as Authorization: Bearer <key>. Keys belong to a workspace: its credits pay for every request. Keep keys on your server; a key in a web page or app can be read by anyone.
curl https://lipivo.com/v1/models -H "x-api-key: $LIPIVO_API_KEY"Request limits
Each key and each workspace may make a number of requests a minute (your plan sets the workspace limit). Over it, the API answers 429 RATE_LIMITED with a retry-after header in seconds. The SDKs wait and retry for you.
Spending limits
A key can have a monthly spending limit, set in API keys. Once a key has spent it, its requests answer 402 KEY_SPENDING_LIMIT until the next month; other keys keep working.
Credits
When the workspace has no credits left, requests answer 402 INSUFFICIENT_CREDITS. Every successful response carries x-credits-remaining.