1. Start in Creative Studio or issue an application API key
For interactive generation without writing code, open Creative Studio (/studio) in your CLODEx account, select an available video model such as clodex-video/seedance-2.5, clodex-video/kling-3.0, clodex-video/kling-3.0-turbo, clodex-video/kling-2.5-turbo-pro or clodex-video/hailuo-2.3-fast, choose resolution and duration, and inspect the estimated cost before submitting.
For backend automation, issue a dedicated credential in /keys and inspect GET /v1/models. Model families do not share identical parameter schemas: verify supported duration, aspect ratio, audio and image-to-video inputs for the exact model ID.
2. Paid wallet balance requirement
Video models require Paid Wallet Balance in CLODEx. Promotional signup credits, non-transferable coupons and subscription text quotas do not fund video generation. Top up your wallet in /wallet (including SBP QR in RUB, Kaspi QR in KZT or supported crypto methods) and check your paid balance before submitting tasks.
Video billing depends on the exact model, resolution and duration rather than text token counts. Review per-task rates in /pricing before launching batch jobs.
Top up wallet balance · Model pricing · Billing and balance rules
3. Asynchronous Video API endpoints
Video rendering is asynchronous. Submitting a generation creates a task and returns a request_id; your backend polls task status at bounded intervals and downloads the rendered asset once completed.
| Stage | Method and route | Backend responsibility |
|---|---|---|
| Submit task | POST /v1/videos/generations | Validate exact model ID, scene parameters and persist the returned request_id. |
| Poll status | GET /v1/videos/{request_id} | Poll with bounded backoff and handle succeeded, failed or expired terminal states. |
| Fetch video | GET /v1/videos/{request_id}/content | Download completed media into your own storage after terminal completion. |
4. Standard-library Python polling example
Set CLODEX_API_KEY and CLODEX_VIDEO_MODEL in a protected server environment. Submitting this script starts a paid video task. If a network error occurs during polling, check the existing task status before sending a second POST request so you do not pay for duplicate renders.
import json
import os
import time
from urllib.request import Request, urlopen
base = "https://clodex.xyz/v1/videos"
headers = {
"Authorization": "Bearer " + os.environ["CLODEX_API_KEY"],
"Content-Type": "application/json",
}
payload = {
"model": os.environ["CLODEX_VIDEO_MODEL"],
"prompt": "Slow aerial shot over alpine peaks at sunrise, crisp light",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
}
req = Request(f"{base}/generations", data=json.dumps(payload).encode("utf-8"), headers=headers, method="POST")
with urlopen(req, timeout=60) as resp:
created = json.load(resp)
task_id = created.get("id") or created.get("request_id")
if not task_id:
raise RuntimeError(f"Missing task identifier: {created}")
for _ in range(60):
time.sleep(5)
status_req = Request(f"{base}/{task_id}", headers={"Authorization": headers["Authorization"]})
with urlopen(status_req, timeout=30) as resp:
state = json.load(resp)
status = state.get("status")
if status in ("succeeded", "completed"):
print("Video task ready:", task_id)
break
if status in ("failed", "canceled", "expired"):
raise RuntimeError(f"Video generation stopped with status={status}: {state}")
5. Production safety and cost controls
- Validate integration with a single short 5-second clip and verify actual wallet deduction in your task log.
- Never expose your CLODEx API key in client-side JavaScript or mobile binaries; route generation requests through your authenticated backend.
- Persist completed video outputs to your own storage and verify rights for any input images, likenesses and audio before commercial publication.
- When contacting support, include the safe request_id, timestamp and model ID without sharing secret credentials.
Documentation and example scope
Connection settings follow CLODEx documentation. Examples target the stated protocol; they are not recorded inference results and do not promise identical features across models. A successful generation request incurs a charge against paid balance.
Frequently asked questions
Why does video generation require paid wallet balance?
Video models settle strictly against paid wallet funds. Promotional signup bonuses and non-transferable text coupons do not apply to video tasks.
What should my client do after a timeout?
Inspect GET /v1/videos/{request_id} and your dashboard task log before submitting a new POST request, otherwise you may create two billable tasks.
Can I use Kling and Seedance without writing code?
Yes. Open /studio in your CLODEx account to configure prompts, reference frames, aspect ratio and duration directly in the browser.