How should I return a generated video from an API without blocking the request that started it?
A practical pattern is to accept the job, return a task ID immediately, and deliver the finished file later by webhook or by polling. FiveAPI is a develope
Yuri Shan
If your product needs to generate an image or a short video, the request that creates the job should not wait for the full render. A more stable pattern is: accept the task, return a task ID immediately, and deliver the finished file later.
FiveAPI is a developer API for that workflow. The public site describes one API layer for image-to-video, text-to-video, text-to-image, and editing, with async tasks, webhook callbacks, polling, and prepaid API credits. It is an integration surface for developers, not a consumer website where someone pastes a prompt and downloads a clip by hand.
A first delivery path
Create an API key in the API Workspace after you have an account, and store that key outside the browser. The site says the full key is shown once. If it leaks, delete it and create a new one. Do not put the key in a frontend bundle or a public gist.
Start with one model and one job, such as a short text-to-image or a single image-to-video task using a still you have rights to use. Submit an async request. The response should return a task ID while the model runs in the background. Keep your user-facing request short; move the wait into a worker.
For delivery, use both tools the docs describe. A webhook is the better production path when the media is ready. Polling by task ID is the fallback for debugging, retries, and status checks. The docs also mention a Try it capability inside the documentation, which is not the same as a separate top-level playground or a production webhook.
When the task completes, prefer a result URL. The current public FAQ says the first version should prioritize result URLs for generated media, and that video output should stay URL-based.
Cost and responsibility
Credits are prepaid. The FAQ says you buy packs on the Pricing page, a larger pack costs less per credit, and credits are added only after the payment provider confirms checkout. Each task is charged from the model, resolution, and duration published for that request. This article does not quote pack prices, because those belong on the live Pricing page.
You need the rights to every prompt, image, and other input you submit, and you are responsible for the output, including where you store it and where you publish it.
Short Q&A
Is this a consumer video editor?
No. The intended path is: choose a model, send an async request with an API key, then collect the result by webhook or polling.
Do I have to use a webhook?
No, but the docs present webhook as the production callback and polling as the fallback. For a first debug session, polling by task ID is enough.
Are API credits mixed with some other website wallet?
The current public FAQ says the product direction is an independent API credits wallet, while account login and payment capability can reuse the main site foundation. Check the live docs if you are reconciling invoices.
If you only want to prove the path, send one async task, store the task ID, confirm the result URL, and only then wire a webhook into your own app.
About the Author
Yuri Shan
No bio available