API keys
Send your API key as a bearer token on every request:x-api-key: <your API key>, as in V1, works too.
- Create and revoke keys in Workspace settings → API keys of the Argil app. A key is yours, for one workspace. Revocation is immediate.
- One workspace per key. A key acts as the member who created it, in their workspace: what it creates belongs to that workspace, uses its credits, and appears in that workspace’s library.
- Keys are secrets for your servers. Never put one in a browser or a mobile app. Use one key per integration, so you can revoke one without breaking the others.
- A key starts with
argil_sk_, so secret scanners can spot one pushed by mistake. Keys created before this prefix keep working.
401 authentication_required, an unknown or revoked one 401 invalid_api_key. After a failed authentication, the answer is delayed to slow down key guessing.
Plans
Any key reads its workspace: models, generations, assets, elements, balance and webhook endpoints. Creating a generation needs an active Argil plan; without one,POST /v2/generations answers 403 plan_required. A workspace admin’s key also gets the link to buy one: see Plans.
