Overview
Build image and video generation into your product.
Use one API key to list the current catalog, start a media job, poll its status, and retrieve signed output URLs.
Start here
Your first request
This request body follows the checked-in OpenAPI schema. Replace the model ID after calling GET /api/v1/models.
curl -X POST "https://reviral.ai/api/v1/generate-media" \
-H "Authorization: Bearer $REVIRAL_API_KEY" \
-H "Idempotency-Key: first-video" \
-H "Content-Type: application/json" \
--data '{"model":"seedance-2","prompt":"A slow camera move across a quiet lake at sunrise","durationSec":5,"resolution":"720p","aspectRatio":"16:9","maxCredits":106}'How it works
- 1
Create a server-side key
Keys are displayed once. Keep them out of browser code and source control.
- 2
Read the catalog
Model IDs, accepted settings, defaults, and live credit prices come from the models endpoint.
- 3
Start one job
Send a unique Idempotency-Key so a safe retry cannot create a second charge.
- 4
Poll and download
Poll the returned status URL until ready, then download the signed output URL.
Live model catalog
The current public catalog contains 40 video models and 18 image models. Each model page is generated from the same catalog used by GET /api/v1/models, including its price, duration, resolution, aspect ratio, and defaults.
Production checklist
- Store the API key in a server-side secret manager.
- Set an Idempotency-Key and keep the same body when retrying.
- Use
maxCreditswhen the exact charge must stay locked. - Respect
Retry-Afteron rate-limit responses.