Authorization header. Keys start with sk-.
Create and store a key
Create and revoke keys in the Viggle Dashboard. Keys can belong to you or to an organization:- A personal key spends your personal credits, including the 100 free credits new accounts get.
- An organization key spends the organization’s credits, plus the balance of an active contract if the key is assigned to one.
What a key can see
Jobs and 3D outputs belong to the key that created them. 2D assets and scenes belong to the account.
If you rotate keys, finish or download the jobs started with the old key first, and export your 3D characters and motions before you revoke it. 2D characters and motions and scenes carry over to the new key.
Per-key credit limits
A key can carry two optional spending caps:- A credit limit: the most the key can spend over its lifetime.
- A monthly credit limit: the most it can spend per calendar month (UTC). It resets at the start of each month.
INSUFFICIENT_CREDITS. GET /v1/credits reports the balance capped by what remains of the key’s lifetime limit. See Pricing for which capabilities answer 402 and which fail asynchronously.
Trace requests with X-Request-Id
Every response carries anX-Request-Id header. Send your own value to correlate the request with your logs; otherwise Viggle generates one. The same ID appears as request_id in error bodies.
Authentication errors
A missing, malformed, revoked or expired key answers401 with UNAUTHENTICATED. The message is Authentication required when the header is missing and Invalid or expired API key otherwise:
Authorization: Bearer sk-... with no extra quotes or whitespace, and that the key is still active in the Dashboard. If the authentication service itself is briefly unavailable, you get 503 SERVICE_BUSY with retryable: true; retry with backoff. See Errors for every code.
Next steps
Quickstart
Make your first request with your new key.
Pricing
What each operation costs and how credits are reserved.