Skip to main content
This guide takes you from a new account to a downloaded MP4. You need a terminal with curl, or Python 3.8+ or Node.js 18+.
1

Create an account

Sign up at fiveapi.ai and verify your email address. The account you create is the owner of your workspace: its API keys, credits, webhooks and team members.
New production accounts are reviewed before they can create API keys. If key creation is refused with account_not_active, contact support@fiveapi.ai.
2

Add credits

Open Billing in the console and buy a credit pack. Larger packs cost less per credit. See Credits and pricing.
3

Create an API key

Open API Keys in the console, click Create key, give it a name and copy the key. It starts with sk_live_ and is shown only once.Store it in an environment variable instead of your code:
Keep keys on your server. Never put them in a browser, a mobile app or a public repository.
4

Create a video task

Send a text prompt to Video Fast 1.0. The model id is the path of the request.
The answer comes back right away. The task is queued and its estimated price is held from your balance:
5

Wait for the result

Poll the task until it reaches a terminal status: completed, failed or cancelled. Generation usually takes one to a few minutes, depending on the model, the length and the queue.
When the task is completed, output.video.url holds the MP4 and credits.charged the final price:
Polling works fine (every 5–10 seconds per task). For production we recommend webhooks as the primary channel: pass a webhook_url and Five API calls you when the task finishes, so you only poll as a fallback.
6

Download the video

output.video.url is a plain HTTPS download that stays valid until expires_at, 7 days after completion. Copy the file to your own storage if you need it longer.

The whole flow in one script

Next steps

Choose a model

Compare quality, speed, resolutions, durations and audio.

Receive webhooks

Get notified when a task finishes and verify the signature.

Handle errors

Retry what is retryable and nothing else.

Go to production

The checklist for a robust integration.