401 missing_api_key; an invalid, expired or revoked key returns 401 invalid_api_key.
Key types
The two kinds are not interchangeable: an API key cannot call
/v1/organization/**, and an admin key cannot make model calls. Only the organization owner can create admin keys.
Projects
Every API key belongs to a project. Files, generations and webhooks are scoped to projects, and an API key can only see the generations it created itself. Archiving a project immediately disables all of its API keys.Spending limits and expiry
When you create an API key you can set:credit_limit_usd: the most this key may spend in total. Once reached, calls return402 api_key_limit_reached. Calls running at the same time may take spending slightly past the limit.expires_at: after this time the key stops working.
redacted_value), so a lost key cannot be recovered. Delete it and create a new one.
