JMovie API

Give the scene its first take

Two adults in a hotel room just before dawn. One reaches for the door, then hesitates. Hold on that hand a little longer and the audience can tell someone wants to stay.

A cinema camera on a tripod beside a desk with an out-of-focus monitor
Concept image, not model output.

An intimate scene can turn on a small gesture. A hand that lingers, a look held a beat too long. Once you can see the take on a timeline, you can decide exactly how long to let that moment breathe.

Try that scene with Uncensored Seedance

JMovie’s Uncensored Seedance API offers Seedance 2.0 and 2.5 for permitted adult NSFW video. If there’s a scene you’ve been putting off, start with one five-second beat. Hold the frame and let the character hesitate. Drop the MP4 into your edit and see if the pause lands.

Working on a series? You can send shots from your own tools and pick up the same task after a render takes longer than expected. Come back to the take when you’re ready to cut.

Create your JMovie API account · Check current pricing

Wan 3 Spicy and NSFW in JMovie Workspace

Updated · JMovie API

Try the shot with Python

1. Create an API key and install requests

Use Python 3.10 or later. In the JMovie API console, fund your API wallet and create a generation key with Seedance 2.5 enabled. Set JMOVIE_API_KEY in the terminal from your secret manager or local environment. Keep it out of the script and any shared logs.

2. Submit one task, poll it, and download the MP4

Save the Python block as seedance_video.py. Choose a unique JMOVIE_REQUEST_ID for this clip and keep it with the exact payload. Run the terminal commands after setting JMOVIE_API_KEY. The submission creates one paid generation.

seedance_video.py
import os
import time
from pathlib import Path
from urllib.parse import quote

import requests

TASKS = "https://api.j-movie.com/api/v3/contents/generations/tasks"
HEADERS = {"Authorization": "Bearer " + os.environ["JMOVIE_API_KEY"]}
PAYLOAD = {
    "model": "dreamina-seedance-2-5-260628",
    "content": [{
        "type": "text",
        "text": "Close-up of an adult's hand on a hotel room door handle at dawn. "
                "They hesitate, then let their hand fall. "
                "Hold the frame. Soft blue light from the window.",
    }],
    "duration": 5,
    "resolution": "720p",
    "ratio": "16:9",
}


def task_body(response):
    if not 200 <= response.status_code < 300:
        try:
            code = response.json().get("code", "HTTP_ERROR")
        except (ValueError, AttributeError):
            code = "HTTP_ERROR"
        request_id = response.headers.get("X-Request-Id", "unknown")
        raise RuntimeError(f"HTTP {response.status_code} {code} ({request_id})")
    return response.json()


def submit():
    request_id = os.environ["JMOVIE_REQUEST_ID"].strip()
    if not request_id:
        raise ValueError("Set JMOVIE_REQUEST_ID to a persistent ID for this clip.")
    headers = {**HEADERS, "Idempotency-Key": request_id, "Prefer": "respond-async"}
    try:
        response = requests.post(
            TASKS, headers=headers, json=PAYLOAD, timeout=(5, 20), allow_redirects=False,
        )
    except (requests.ConnectionError, requests.Timeout):
        raise RuntimeError(
            "Submit outcome unknown. Reuse the same request ID and payload."
        ) from None
    return task_body(response)["id"]


def wait_for_video(task_id):
    url = f"{TASKS}/{quote(task_id, safe='')}"
    deadline = time.monotonic() + 600
    while time.monotonic() < deadline:
        delay = 5
        try:
            response = requests.get(
                url, headers=HEADERS, timeout=(5, 20), allow_redirects=False,
            )
        except (requests.ConnectionError, requests.Timeout):
            pass
        else:
            if response.status_code == 429:
                retry_after = response.headers.get("Retry-After", "")
                if retry_after.isdecimal():
                    delay = max(delay, int(retry_after))
            elif response.status_code < 500:
                task = task_body(response)
                status = task["status"]
                if status in {"failed", "cancelled", "expired"}:
                    code = (task.get("error") or {}).get("code", "")
                    raise RuntimeError(f"Task {task_id}: {status} {code}")
                if status == "succeeded" and task["storage_status"] == "ready":
                    return task["content"]["video_url"]
        time.sleep(min(delay, max(0, deadline - time.monotonic())))
    raise TimeoutError(f"Resume with JMOVIE_TASK_ID={task_id}")


def download(signed_url, output):
    partial = output.with_suffix(".mp4.part")
    try:
        # This separate media request does not carry the API Bearer header.
        with requests.get(signed_url, stream=True, timeout=(5, 60)) as response:
            if response.status_code != 200:
                raise RuntimeError(f"Download returned HTTP {response.status_code}")
            with partial.open("wb") as file:
                for chunk in response.iter_content(chunk_size=1024 * 1024):
                    file.write(chunk)
        partial.replace(output)
    except requests.RequestException:
        raise RuntimeError("Download interrupted. Resume with the same task ID.") from None
    finally:
        partial.unlink(missing_ok=True)


if __name__ == "__main__":
    task_id = os.getenv("JMOVIE_TASK_ID") or submit()
    print(f"Task ID: {task_id}", flush=True)
    output = Path("seedance.mp4")
    download(wait_for_video(task_id), output)
    print(f"Saved {output}")
Terminal
python3 -m venv .venv
source .venv/bin/activate
python -m pip install requests
export JMOVIE_REQUEST_ID="hotel-door-take-001"
python seedance_video.py

How the three requests work

  1. POST /api/v3/contents/generations/tasks — Send the model ID, prompt, duration, resolution and aspect ratio. With Prefer: respond-async, the API returns HTTP 202 and a task ID. Save it before polling.
  2. GET /api/v3/contents/generations/tasks/{id} — Poll the native video response. Queued, running and unknown can still progress. When status is succeeded and storage_status is ready, read content.video_url. Failed and cancelled end the wait. HTTP 410 means the stored media has expired.
  3. Download the signed URL with a separate GET. The script writes seedance.mp4 only after the download completes. The signed URL grants access to the file, so keep it private.

Video request fields · Native video responses

3. Resume an existing task after a timeout

The script stops polling after about ten minutes. The server task can still finish. Set JMOVIE_TASK_ID to the printed ID to skip the POST and fetch a fresh signed URL. If the POST response was lost before you received an ID, use the same API path, exact payload and Idempotency-Key to recover the original task.

  • For 401, check the Bearer key. For INSUFFICIENT_BALANCE or KEY_LIMIT_EXCEEDED, check the wallet or key limit before submitting. Keep the task ID and X-Request-Id for support.
  • On a download 403, query the same task again to refresh its signed URL while the output is still retained. Signed links are valid for up to one hour. Output retention is 72 hours.
Resume in the terminal
JMOVIE_TASK_ID="your-saved-task-id" python seedance_video.py

Frequently asked questions

Can I use the Seedance API in Python without an SDK?

Yes. Use requests with a JMovie API Bearer key. POST to /api/v3/contents/generations/tasks, poll GET /api/v3/contents/generations/tasks/{id}, then download the signed content.video_url.

What happens if my Seedance polling loop times out?

The server can keep processing the task. Save its ID and query the same task to resume. If the original submit response was lost, reuse the same API path, exact payload and Idempotency-Key.

How do I refresh an expired Seedance download link?

Query the same task again while the private output is retained. JMovie keeps generated media for 72 hours and signs each download link for up to one hour.

Do provider rules still apply to the Uncensored Seedance API?

Yes. JMovie API offers Seedance 2.0 and 2.5 for permitted adult NSFW video. The provider can reject prompts, references or outputs. Use adult fictional subjects and reference material you have permission to use.

Where can I use Wan 3 Spicy?

Wan 3 Spicy and Wan 3 NSFW are available in the JMovie production workspace at j-movie.com. This Python example calls Seedance 2.5 on api.j-movie.com.