Happy Pony API
Two kinds of endpoints share one API key: the video agent (below) and single generations (text to image, text to video, image to video, reference to video, image edit, multi-angle, face swap, human portrait, voice design and character swap), which run one job with exactly the parameters you give. The same key also works with the OpenAI-compatible chat completions API for our hosted LLM. What everything costs is on the Pricing page.
Send reference material and instructions; the video agent decides everything
(story, shots, prompt, canvas), renders, optionally reviews the result against
your instructions and tries again, and hands back one or more videos. No
questions are asked back and nothing needs confirming. With
"job": "character_swap" the same agent instead swaps a person in your clip
for a character from a picture, tuning the mask and the prompts itself and
checking the result frame by frame against the source: see
Character swap runs. With
"job": "background_replace" it keeps the people and replaces everything
around them: see Background replace runs.
Every call is authenticated with an API key. Create one at www.happypony.io → API Keys; the full key is shown once, so store it somewhere safe. Revoke a leaked key there and create a new one.
Authorization: Bearer hp_…
Session cookies are not accepted on these endpoints. Runs and jobs belong to the
key's user: another user's id answers 404.
Base URL below: https://api.happypony.io.
| Endpoint | What it does |
|---|---|
POST /api/v1/agent/runs/uploads |
Upload a local file; returns a URL to use in a run |
POST /api/v1/agent/runs |
Start a video-agent run: a video, or a character swap |
GET /api/v1/agent/runs/:id/status |
Poll for status |
GET /api/v1/agent/runs/:id |
Get the result: videos, credits, parameters, log |
PUT /api/v1/agent/runs/:id/cancel |
Cancel |
POST /api/v1/jobs/text-to-image |
Generate an image from text |
POST /api/v1/jobs/text-to-video |
Generate a video with sound from a prompt |
POST /api/v1/jobs/image-to-video |
Animate a first / last frame, plus optional timed keyframes, into a video |
POST /api/v1/jobs/reference-to-video |
A video of your reference people, products and voices in a new scene |
POST /api/v1/jobs/image-edit |
Edit 1–3 images with an instruction |
POST /api/v1/jobs/multi-angle |
New camera angles of one image |
POST /api/v1/jobs/face-swap |
Put a reference face on a base image |
POST /api/v1/jobs/human-portrait |
Portraits of a new person from attributes |
POST /api/v1/jobs/voice-design |
Speech in a voice you describe |
POST /api/v1/jobs/character-swap |
Swap a person in a clip for a character from a picture |
POST /api/v1/jobs/background-replace |
Keep the people in a clip and replace everything around them |
POST /api/v1/jobs/uploads |
Upload a local image, video or audio file for a job |
GET /api/v1/jobs/:id/status |
Job status |
GET /api/v1/jobs/:id |
Job result: image, video or audio URLs, parameters, credits |
PUT /api/v1/jobs/:id/cancel |
Cancel a job |
POST /v1/chat/completions |
Chat with the LLM (OpenAI-compatible, streaming, tools, images) |
GET /v1/models |
List the LLM model |
GET /api/v1/account/llm-usage |
Your LLM usage and cost |