The problem
Selling an API means the buyer has to see a call work before anyone writes code. Docs and curl examples were not enough for a live demo, and colleagues outside engineering had no way to try the product themselves.
The console
A client side app for Viggle’s V1 API: React, Vite, no backend. One API key covers five modes: Video Remix, Generate, Animate, Image and 3D Export. Every call the page makes is shown as a snippet you can copy, there is a cost preview before every billable action, and error messages say whether to retry and what to change. It runs in English, Simplified Chinese and Traditional Chinese.
The MCP server
In October I added a stateless MCP endpoint, one Vercel function, that lets Claude submit a shot list, poll it and collect the clips. It reuses the console’s API client and price estimator, so the console and Claude always show the same estimate.
Most of the work went into making sure an agent cannot spend money by accident:
submit_batch 6 shots, 7 s each
estimate: 42 credits · draft held for 1 hour
submit_batch confirm_credits: 42
submitted
submit_batch 12 shots, 15 s each
refused: estimate 180 credits is over the 150 credit cap
nothing submitted, nothing billed
- Submitting takes two steps. The first prices the batch and stores a draft. The second sends it only if the caller repeats the exact credit figure.
- Batches estimated above 150 credits are refused. Each shot gets at most 4 attempts.
- The API has no idempotency key, so a confirmed batch is claimed once in Redis. A repeated or concurrent confirm sends nothing.
- A submit that fails on the network is marked outcome unknown instead of retried, because the video may already have been billed.
- The API key stays on the server, behind a bearer token.
What broke
The video model’s fetcher could not reach the host where uploads were stored. The fix: the server downloads the file and sends it to the API as a file instead of a URL. That path is tested against fakes so far, not yet run live.
Where it stands: the text to video path is verified live end to end. Animate and Remix are built from the API docs and tested against fakes only; I haven’t run them through the endpoint against the live API yet.