Studio and async Video API

Video API: Kling 3.0 and Seedance 2.5

Create videos with Seedance 2.5, Kling 3.0, Kling 2.5 Turbo Pro and Hailuo 2.3 in CLODEx Creative Studio or through the asynchronous Video API. Paid wallet balance rules, task polling and safe retry handling are covered below.

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.

Open Creative Studio · Create and verify an API key

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.

StageMethod and routeBackend responsibility
Submit taskPOST /v1/videos/generationsValidate exact model ID, scene parameters and persist the returned request_id.
Poll statusGET /v1/videos/{request_id}Poll with bounded backoff and handle succeeded, failed or expired terminal states.
Fetch videoGET /v1/videos/{request_id}/contentDownload completed media into your own storage after terminal completion.

Video API specification

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.

Contact support

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.

Client configuration · Video API reference

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.

Connect CLODEX API to your application

One key-management layer, compatible endpoints and several LLM families for apps, agents and developer tools.