More APIs
Text to Video
Generate video clips from text prompts.
DEVUP AI hosts text-to-video models that generate short video clips from a text description. Browse all text-to-video models.
Endpoint
Example
import requests
DEVUP_API_KEY = "$DEVUP_API_KEY"
MODEL = "Wan-AI/Wan2.2-T2V-A14B"
response = requests.post(
"https://api.devupai.com/v1/video/generations",
headers={
"Authorization": f"Bearer {DEVUP_API_KEY}",
"Content-Type": "application/json",
},
json={
"model": MODEL,
"prompt": "A serene mountain lake at sunrise, with mist rising from the water and pine trees reflected on the surface.",
},
)
result = response.json()
# result["data"][0]["url"] contains the signed URL to the generated video
video_url = result["data"][0]["url"]
video_response = requests.get(video_url)
with open("output.mp4", "wb") as f:
f.write(video_response.content)Response format options
The response_format parameter controls how the generated video is returned. It accepts "url" (default) or "b64_json". Requesting "url" returns a signed proxy URL in data[].url. Requesting "b64_json" returns the video bytes Base64-encoded inline in data[].b64_json and writes nothing to storage. Any other value is rejected with HTTP 400.
Response format
Default response (response_format: "url"):
{
"data": [
{
"url": "https://api.devupai.com/v1/images/proxy?d=<b64url>&s=<hmac>"
}
],
"_devup": {
"request_id": "req_9fd8ddec5b2149539860a86dccba58cf"
}
}Inline Base64 response (response_format: "b64_json"):
{
"data": [
{
"b64_json": "<base64>"
}
],
"_devup": {
"request_id": "req_9fd8ddec5b2149539860a86dccba58cf"
}
}When "b64_json" is requested and the generated video exceeds the 20 MB inline size limit, the response automatically falls back to a signed URL in data[].url and includes a note field inside _devup explaining why. This is an automated delivery fallback, not an error, and the generation request is billed normally.
The _devup object contains:
cost_dzd(number): Cost of the request in DZD.balance_dzd(number): Remaining balance in DZD.request_id(string): Equal to thex-request-idresponse header.
The examples above are abridged: they show _devup with request_id only.
URL expiry
The generated video URL in data[].url is signed and expires 5 minutes after the response is generated. After expiry, the proxy returns HTTP 403 Forbidden. Download the file rather than storing the URL. This expiration applies only to the "url" response; callers who do not want an expiring URL can request "b64_json" instead. Stored videos are deleted 24 hours after they are created.
Generation time
Video generation is synchronous and a single request may hold the connection open for several minutes. Clients should set a generous timeout when making requests.
Tips for good prompts
- Be descriptive about the scene, lighting, and motion
- Specify the camera movement if relevant (e.g. "slow pan", "aerial shot", "close-up")
- Keep prompts focused — overly complex prompts can produce inconsistent results
- Use the negative prompt parameter (if supported) to exclude unwanted elements