Skip to main content

Setup

Create an API key

Go to your Viggle Dashboard and create a key.

Add the header to every request

Authorization: Bearer YOUR_API_KEY

Example request

curl -X POST "https://apis.viggle.ai/api/render" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d "character_id=char_xxx&scene_id=scene_xxx"

Security

Keep your API key secure. Never expose it in client-side code or public repositories. Use server-side applications only.
export VIGGLE_API_KEY="your-api-key-here"
import os
api_key = os.environ.get("VIGGLE_API_KEY")
Periodically rotate your API keys, especially if you suspect compromise.
Different keys for development, staging, and production.

Auth errors

If authentication fails, the API returns 401 Unauthorized:
{
  "detail": "API key required. Use Authorization: Bearer sk-xxx"
}

See all error codes

Full list of HTTP status codes, causes, and solutions