Set up
Use Node.js 20 or later, or Python 3.10 or later withrequests installed (python -m pip install requests). These examples run on your server and use HTTP directly.
Set REACTOR_API_KEY in your environment to your Reactor API key. Keep it out of browser code and
source control.
Generate and save a clip
Save the JavaScript example asgenerate.mjs and run node generate.mjs, or save the Python example
as generate.py and run python generate.py. Both submit one eight-second FastH3 request and save
output.mp4 in the current directory.
The examples print the generation ID so you can resume polling it. They retry temporary polling
errors, honor Retry-After, and stop on a failed generation. The ten-minute polling deadline is a
local example limit, not a service timeout; reaching it does not cancel the generation.
429, wait for Retry-After before submitting again. The examples do not
repeat creation automatically: a network failure can leave you uncertain whether a request was
accepted. For a polling network failure, resume with the printed ID rather than starting over.
See errors and retries.
Use reference files
Upload a file and wait for the PUT to succeed before submitting a generation with itsfile_id. A file with no uploaded bytes is rejected with 400.
Pass the ID in a field supported by your selected model. For example, FastH3 accepts
starting_frame, and FastH3-Omni accepts reference_images and reference_audios.
Find supported fields and file limits in your model’s
Model APIs docs.
Download results within 48 hours of completion. If a signed download URL expires, poll the same
generation for fresh URLs. To cancel a request, see
Cancel a generation.