Pruna P Video Animate Serverless API

Transfer video motion and audio onto any still image.

~32.91s
POST /v2/p-video-animate · submit + poll
 1# pip install "segmind>=1.1.0"
 2# export SEGMIND_API_KEY="YOUR_API_KEY"
 3from segmind import SegmindClient, InferenceFailed, InferenceTimeout
 4
 5# Async (v2) — recommended for long-running / video models.
 6# run() blocks up to 600s; submit_async + job.wait(timeout=...) sets a longer
 7# deadline and keeps the request_id so you can re-poll later.
 8client = SegmindClient()                      # reads SEGMIND_API_KEY
 9payload = {
10    "video": "https://segmind-resources.s3.amazonaws.com/input/pva-driving-video-14997.mp4",
11    "image": "https://segmind-resources.s3.amazonaws.com/input/pva-image-subject-14997.jpg",
12    "resolution": "720p",
13    "turbo": False,
14    "save_audio": True,
15    "ignore_audio": False,
16    "target_fps": "original",
17    "instruction_prompt": "",
18    "seed": 42,
19    "disable_safety_checker": False,
20}
21job = client.submit_async("p-video-animate", **payload)
22print(job.request_id)                         # available immediately
23try:
24    result = job.wait(timeout=900, interval=2.0)
25    print(result["status"])                  # COMPLETED
26    print(result.get("output"))              # model output (e.g. video URL)
27except InferenceTimeout as e:
28    print("still running:", e.request_id)    # re-poll later with this id
29except InferenceFailed as e:
30    print("failed:", e.detail)
31
32# Fast models (<=600s) can use the one-liner instead:
33# result = segmind.run("p-video-animate", **payload)

API Endpoint

POSThttps://api.segmind.com/v1/p-video-animate

Parameters

imagerequired
string (uri)

Reference still of the subject to animate. Use front-facing, well-lit portraits.

videorequired
string (uri)

Source MP4 whose motion and audio drive animation. Use stable, clear footage.

disable_safety_checkeroptional
boolean

Toggles content safety filtering. Leave disabled for standard, safe generations.

Default: false
ignore_audiooptional
boolean

Ignores source audio during generation. Enable for silent, motion-only animation.

Default: false
instruction_promptoptional
string

Optional text guiding how the subject animates. Name the subject and motion beats.

Default: ""
resolutionoptional
string

Output resolution, 720p or 1080p. Choose 1080p for crisp, detail-heavy results.

Default: "720p"
Allowed values :
"720p""1080p"
save_audiooptional
boolean

Keeps the source audio in output. Enable for talking-head or dialogue clips.

Default: true
seedoptional
integer

Random seed for reproducibility. Fix a value to repeat identical results.

Default: 42Range: -1 - 999999999999999
target_fpsoptional
string

Output frame rate: original, 24, or 48. Use 48 for smoother motion.

Default: "original"
Allowed values :
Original"original"
"24""48"
turbooptional
boolean

Faster inference at slightly lower quality. Enable for quick draft previews.

Default: false

Response Type

Returns: Video

Asynchronous requests (v2)

Use Async for video, long-running (>~60s), or high-concurrency workloads; Sync is simplest for fast image & LLM calls. Async submits a request and you poll it to completion.

  1. 1
    POST /v2/p-video-animate

    Submitreturns request_id, status_url, response_url

  2. 2
    GET /v2/requests/{id}/status

    Polluntil COMPLETED or FAILED

  3. 3
    GET /v2/requests/{id}

    Resultfinal response body

Status states

QUEUEDAccepted, waiting for a worker
PROCESSINGRunning on a worker
COMPLETEDDone — result body is ready
FAILEDErrored (incl. content/RAI blocks)
  • A FAILED request is served as HTTP 422 — the body still carries the error detail.
  • An unknown or expired request_id returns HTTP 404.
  • Results are retained for 1 hour, then expire.
  • Content / RAI blocks surface as FAILED, not a separate state.
  • Track completion by polling the status endpoint.

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out