Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PixVerse API — Python client

Python 3.8+ License: MIT Hosted on Synexa

PixVerse is a video generation platform whose models turn a still image and a prompt into a short video clip, in either a realistic or a stylised look, with optional generated audio. This repository is a small Python client for the PixVerse API as hosted on Synexa, so you can animate images with PixVerse V6 from a script with one pip install and an API token, without dealing with the platform's web app or its credit system.

You get a blocking run() that takes a first-frame image and a prompt and returns the video URL, a non-blocking create-and-poll path for batches, and webhook delivery for services that would rather be called back. The client has a single runtime dependency and no model weights. It is aimed at developers building social-content tooling, e-commerce video, ad variations or animated storyboards who want PixVerse as an HTTP call.

Try it now: https://synexa.ai/explore/pixverse/pixverse-v6 — the hosted model behind this client. New accounts get a free trial credit.

Contents

Why this client

  • The weights are not published. PixVerse V6 is a proprietary hosted model; the only way to run it programmatically is through an endpoint, and this client wraps the Synexa one.
  • No GPU or video serving stack. Video diffusion models of this class need datacenter GPUs with tens of gigabytes of VRAM, plus a decoder, an audio model and a job queue. The hosted endpoint runs on Synexa's fleet and you pay per clip.
  • No cold start on your side. The model is resident on the endpoint; a single-clip request and a thousand-clip batch see the same latency profile, and there is nothing to warm up.
  • Predictable cost. pixverse/pixverse-v6 is billed at $0.025 per run, so the cost of a campaign of clips is known before you submit it.

Installation

pip install git+https://github.com/pixverse-dev/pixverse-api.git

Then set your API key (create one at synexa.ai):

export SYNEXA_API_KEY="sk-..."

Quickstart

import pixverse_api

output = pixverse_api.run({
    "prompt": "A cinematic shot of a lighthouse at dawn, soft fog, warm light",
    "image_url": "https://example.com/input.png"
})
print(output)   # URL(s) of the generated result

Or with an explicit client:

from pixverse_api import Client

client = Client(api_key="sk-...")
output = client.run({"prompt": "A cinematic shot of a lighthouse at dawn, soft fog, warm light", "image_url": "https://example.com/input.png"})

Hosted models

Model Category What it does Price / run
pixverse/pixverse-v6 image-to-video PixVerse V6 animates a still image into stylised or realistic video, with optional audio. $0.025

The default model is pixverse/pixverse-v6; pass model="owner/name" to run() to use another one from the table.

Parameters

pixverse/pixverse-v6

Field Type Required Default Range Description
prompt string yes Slow dolly in on the subject as the wind… Text prompt for the video generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap.
resolution string no 720p 360p, 540p, 720p, 1080p The resolution of the generated video
duration integer no 5 1, 15 The duration of the generated video in seconds. v6 supports values from 1 to 15 seconds
negative_prompt string no Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap.
style string no anime, 3d_animation, clay, comic, cyberpunk The style of the generated video
seed integer no random The same seed and the same prompt given to the same version of the model will output the same video every time.
generate_audio_switch boolean no False Enable audio generation (BGM, SFX, dialogue)
generate_multi_clip_switch boolean no False Enable multi-clip generation with dynamic camera changes
thinking_type string no enabled, disabled, auto Prompt optimization mode: 'enabled' to optimize, 'disabled' to turn off, 'auto' for model decision
image_url file yes First frame of the video (.jpg/.png/.webp)

Advanced usage

Submit without blocking, then poll:

prediction = client.run(input, wait=False)      # returns immediately
prediction = client.wait(prediction, timeout=300)
print(prediction["output"])

Webhook on completion:

client.run(input, wait=False, webhook="https://your-app.example/hooks/synexa")

Errors:

from pixverse_api import ModelError, PredictionTimeout

try:
    output = client.run(input)
except ModelError as e:
    print("failed:", e, e.prediction and e.prediction.get("id"))
except PredictionTimeout:
    print("still running — poll later")

Status values you will see on a prediction: startingprocessingsucceeded | failed.

About PixVerse

PixVerse (app.pixverse.ai) is a generative video platform developed by AIsphere. It offers text-to-video and image-to-video generation through a web app and mobile apps, with a library of effect templates, lip-sync, clip extension and a range of visual styles from photoreal to anime. The platform has shipped a numbered series of model versions; V6 is the version exposed by the endpoint this client calls.

PixVerse V6 takes a first-frame image plus a prompt and produces a video of 1 to 15 seconds at a selectable resolution. The endpoint exposes controls for style, a negative_prompt, a seed for reproducible output, a generate_audio_switch that adds background music, sound effects and dialogue, a generate_multi_clip_switch that lets the model cut between camera angles within one generation, and a thinking_type setting that decides whether the model rewrites your prompt before generating (enabled, disabled or auto). Prompts and negative prompts are capped at 2048 UTF-8 bytes; because the limit is in bytes, emoji and non-Latin characters count for more than one each.

Typical outputs are short vertical or landscape clips for social feeds, product spins from a single packshot, animated key art for games and film pitches, and multi-shot clips for ads where the camera changes without a second render. Limits to plan for: a single run produces a single clip, the maximum duration is 15 seconds, and complex multi-subject motion is best described in short, concrete sentences.

The hosted endpoint used by this client is pixverse/pixverse-v6 on Synexa, which is PixVerse's own V6 model served through Synexa's API. It is the same generation model the PixVerse app uses, without the app's template library, editing timeline or account credits; those remain on PixVerse's own platform at app.pixverse.ai.

Official project: https://app.pixverse.ai

Use cases

  • Animate product packshots — pass the packshot as image_url with a prompt such as "slow rotation, studio lighting" and a short duration for a listing video.
  • Social-feed clips from key art — animate an illustration with style set to match, generate_audio_switch on for background music, and 9:16 output for reels.
  • Ad variations at scale — enqueue one image with twenty prompt variants through the poll path and receive the clips by webhook.
  • Multi-shot teasers — enable generate_multi_clip_switch so a single 15-second run cuts between camera angles instead of stitching several clips.
  • Storyboard previews — turn each storyboard frame into a 3 to 5 second clip to check pacing before committing to a full production.
  • Reproducible A/B tests — fix seed and vary only the prompt to measure how a wording change affects motion.

FAQ

Is there a PixVerse API?

Yes. PixVerse offers a developer API on its own platform, and PixVerse V6 is also hosted on Synexa as pixverse/pixverse-v6. This client talks to the Synexa endpoint, which takes a first-frame image and a prompt and returns a video.

How much does the PixVerse API cost through this client?

The hosted pixverse/pixverse-v6 endpoint is billed at $0.025 per run, where one run produces one clip. There is no subscription or credit pack; you pay per completed generation.

Can I run PixVerse without a GPU?

With this client, yes. Generation happens on Synexa's GPUs; your machine only needs Python and network access. PixVerse's models are not available for local use.

Does this client work with the PixVerse app or ComfyUI?

No. It does not log into the PixVerse app, use app credits or drive ComfyUI; it only calls the hosted endpoint. Templates and the editing timeline stay in the app.

What input formats does it accept?

image_url accepts .jpg, .png and .webp and is the first frame of the video. prompt is required and limited to 2048 UTF-8 bytes. Optional fields include resolution, duration (1 to 15 seconds), style, negative_prompt, seed, generate_audio_switch, generate_multi_clip_switch and thinking_type.

Is this the official PixVerse SDK?

No. This is an independent client that wraps the Synexa-hosted endpoint. PixVerse's official product and API are at https://app.pixverse.ai.

Related

License

MIT. This is an independent, community-maintained client and is not affiliated with or endorsed by the authors of PixVerse. Model weights and trademarks belong to their respective owners.

About

Python client for the PixVerse API: PixVerse V6 image-to-video generation with audio via a hosted endpoint.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages