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: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: When the task is
completed, failed or cancelled. Generation usually takes one to a few minutes, depending on the model, the length and the queue.completed, output.video.url holds the MP4 and credits.charged the final price: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.