Skip to main content
Paste this page into your coding agent’s context, or point it here, before it writes code against the Viggle API.

Basics

  • Base URL: https://apis.viggle.ai/v1. REST over HTTPS, JSON responses.
  • Auth: Authorization: Bearer $VIGGLE_API_KEY on every request. Keys start with sk-. Server-side only. Missing or bad key: 401 UNAUTHENTICATED.
  • Billing: credits, 1 credit = $0.01. New personal accounts get 100 free credits. Reads, lists, exports and deletes are free. Failed and cancelled jobs are refunded automatically. Balance: GET /v1/credits returns {"balance": number}.
  • There is no official SDK. Use plain HTTP (fetch, requests, curl).
  • There are no webhooks. Poll.

The job model

  1. POST creates a job and returns {"id": "...", "status": "queued", ...} right away.
  2. Poll the matching GET every 3–5 s until status is ready, failed or cancelled. Treat any other status as in progress.
  3. On ready, download the output URL immediately and store your own copy.
  4. On failed, read error.code, error.retryable and error.remediation.action (retry or none). For a 3D character or motion, the failure is in vsplat.error or glb.error; the top-level error stays null.
Characters (char_) and motions (mot_) are reusable assets. 2D ones are owned by the account; type=vsplat characters, type=glb and text-generated motions, and every /export are owned by the API key that created them (other keys get 404). Every other ID is a job owned by the API key that created it (scenes excepted: account-owned).

Endpoints and prices

Full parameters: https://docs.viggle.ai/v1/api-reference/overview.

Top mistakes

  1. Accidentally switching POST /v1/videos to Remake. Any driving_video* or character_image* field turns the request into Viggle Remake, a different model and price. To animate a still with Viggle H3, send first_frame_image or first_frame_image_url (and optionally last_frame_image*), not character_image. Never send quality on a Remake request: it is rejected. A Remake request without a driving video is rejected with 400 too.
  2. Sending urlencoded or JSON to Viggle H3. POST /v1/videos for H3 requires multipart/form-data. In Python requests, pass fields through files={"prompt": (None, "...")}; data= alone sends urlencoded and fails with 400.
  3. Treating 200 queued as paid. Viggle H3, upscale, 3D characters, 3D motion from video and motion from text are accepted even if the balance is too low, then end failed with INSUFFICIENT_CREDITS. Remake, renders, images, scenes, 2D characters and motion template imports answer 402 at submit instead.
  4. Caching output URLs. H3, Remake, upscale, image and export URLs last 1 hour and are re-signed on every read; scene URLs last 3 hours. Read the job again for a fresh URL.
  5. Downloading too late. All job results are deleted 24 hours after the job finishes (3D exports of characters and motions stay until you delete the asset). The job record stays readable afterwards, with null URLs, so download as soon as a job is ready.
  6. Using snake_case on scenes. /v1/scenes/* bodies and responses are camelCase: sessionId, panoramaUri, referenceBatchIds, queuePosition, createdAt. Unknown fields are rejected. One running task per sessionId (a second answers 409).
  7. Assuming one character per render. Video Remix supports several: map each person (track ID) of a multi-person motion to a character with character_mapping (a JSON object sent as a string). Billing counts one character per mapping entry. Remake takes up to 10 character images.
  8. Reading renders from /v1/renders/{id}. That GET does not exist (405). Read every video job, renders included, with GET /v1/videos/{id}.
  9. Expecting to cancel everything. Only renders can be cancelled: DELETE /v1/renders/{render_id} (refunds). Other jobs run to completion.
  10. Expecting lists to be complete. GET /v1/videos omits upscales. GET /v1/characters and GET /v1/motions cap at 100 and skip 3D-only characters, 3D-only motions and text motions. Store the IDs you create.
  11. Retrying blindly. Retry only when error.retryable is true, with exponential backoff. 429 RATE_LIMITED is a brief credit-system contention on Remake, images and scenes, not a quota; there is no per-account rate limit. Use Idempotency-Key on POST /v1/renders to make submits safe to repeat.
  12. Using one key’s job ID with another key. Jobs are visible only to the key that created them (404 otherwise).

Limits worth knowing

  • Any input video: at most 100 MiB, 0.5–600 s, at least 64×64, even dimensions.
  • H3: duration_s 5–15; up to 6 reference images and 1 reference video; references can’t be combined with frames.
  • Remake: driving video 5–16 s (normal, planner) or 5–60 s (agent); up to 10 images, uploads 20 MiB each; https:// URLs only; output 768p.
  • Images: up to 8 reference images; prompt up to 4,000 characters.
  • Text-to-motion: text up to 400 bytes; duration_seconds 3–60; unknown JSON fields rejected.

Minimal example (Python)