curl --request POST \
--url https://api.apimart.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "pixverse-v6",
"prompt": "A cinematic shot of a corgi running through a sunflower field at golden hour",
"size": "16:9",
"resolution": "540p",
"duration": 5
}'
import requests
url = "https://api.apimart.ai/v1/videos/generations"
payload = {
"model": "pixverse-v6",
"prompt": "A cinematic shot of a corgi running through a sunflower field at golden hour",
"size": "16:9",
"resolution": "540p",
"duration": 5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/videos/generations";
const payload = {
model: "pixverse-v6",
prompt: "A cinematic shot of a corgi running through a sunflower field at golden hour",
size: "16:9",
resolution: "540p",
duration: 5
};
const headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01JWXXXXXXXXXXXX"
}
]
}
{
"error": {
"type": "invalid_request_error",
"message": "invalid duration 20, allowed range: 1-15 seconds"
}
}
{
"error": {
"code": 401,
"message": "Authentication failed, please check your API key",
"type": "authentication_error"
}
}
{
"error": {
"code": 403,
"message": "insufficient quota: balance=0, required=0.25",
"type": "quota_not_enough"
}
}
{
"error": {
"code": 429,
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}
Pixverse v6
Pixverse v6 Video Generation
- Pixverse v6 unified video generation model
- Supports text-to-video, image-to-video, first/last frame transition, multi-reference fusion, and video extension
- Supports 360p/540p/720p/1080p resolutions with 1-15 seconds duration
- Asynchronous task API; query the result by task ID after submission
POST
/
v1
/
videos
/
generations
curl --request POST \
--url https://api.apimart.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "pixverse-v6",
"prompt": "A cinematic shot of a corgi running through a sunflower field at golden hour",
"size": "16:9",
"resolution": "540p",
"duration": 5
}'
import requests
url = "https://api.apimart.ai/v1/videos/generations"
payload = {
"model": "pixverse-v6",
"prompt": "A cinematic shot of a corgi running through a sunflower field at golden hour",
"size": "16:9",
"resolution": "540p",
"duration": 5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/videos/generations";
const payload = {
model: "pixverse-v6",
prompt: "A cinematic shot of a corgi running through a sunflower field at golden hour",
size: "16:9",
resolution: "540p",
duration: 5
};
const headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01JWXXXXXXXXXXXX"
}
]
}
{
"error": {
"type": "invalid_request_error",
"message": "invalid duration 20, allowed range: 1-15 seconds"
}
}
{
"error": {
"code": 401,
"message": "Authentication failed, please check your API key",
"type": "authentication_error"
}
}
{
"error": {
"code": 403,
"message": "insufficient quota: balance=0, required=0.25",
"type": "quota_not_enough"
}
}
{
"error": {
"code": 429,
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}
curl --request POST \
--url https://api.apimart.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "pixverse-v6",
"prompt": "A cinematic shot of a corgi running through a sunflower field at golden hour",
"size": "16:9",
"resolution": "540p",
"duration": 5
}'
import requests
url = "https://api.apimart.ai/v1/videos/generations"
payload = {
"model": "pixverse-v6",
"prompt": "A cinematic shot of a corgi running through a sunflower field at golden hour",
"size": "16:9",
"resolution": "540p",
"duration": 5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/videos/generations";
const payload = {
model: "pixverse-v6",
prompt: "A cinematic shot of a corgi running through a sunflower field at golden hour",
size: "16:9",
resolution: "540p",
duration: 5
};
const headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01JWXXXXXXXXXXXX"
}
]
}
{
"error": {
"type": "invalid_request_error",
"message": "invalid duration 20, allowed range: 1-15 seconds"
}
}
{
"error": {
"code": 401,
"message": "Authentication failed, please check your API key",
"type": "authentication_error"
}
}
{
"error": {
"code": 403,
"message": "insufficient quota: balance=0, required=0.25",
"type": "quota_not_enough"
}
}
{
"error": {
"code": 429,
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}
Authentication
string
required
All endpoints require authentication using a Bearer Token.Get an API Key:Visit the API Key management page to obtain your API Key.Add the following header in your request:
Authorization: Bearer YOUR_API_KEY
Request Parameters
string
required
Video generation model name. Fixed to
pixverse-v6.boolean
default:"false"
Whether to run content moderation before submitting the video task.
true: useomni-moderation-latestto review prompts and input imagesfalseor omitted: do not send a moderation request, adding no moderation cost or latency (default)
string
required
Video content description, up to 5000 characters. Required for all modes.
string
default:"540p"
Video resolution tier; directly affects pricing.
360p: SD540p: Standard (default)720p: HD1080p: Full HD
Other resolution values will return a parameter error.
integer
default:"5"
Video duration in seconds, range
1-15.First/last frame transition mode only supports
5 or 8 seconds.string
default:"16:9"
Video aspect ratio. Only effective in text-to-video and multi-reference fusion modes.
16:9: Landscape widescreen (default)4:3: Landscape 4:31:1: Square3:4: Portrait 3:49:16: Portrait vertical2:3: Portrait 2:33:2: Landscape 3:221:9: Cinematic widescreen
integer
default:"0"
Random seed, range
0-2147483647. Same prompt and seed can reproduce similar results.string
Negative prompt used to exclude unwanted content, up to 2048 characters.
boolean
default:"false"
Whether to generate an audio track.
true: Generate audio (increases pricing)false: No audio (default)
boolean
default:"false"
Whether to add a watermark in the bottom-right corner of the video.
true: Add watermarkfalse: No watermark (default)
string
Motion mode.
normal: Standard mode (pixverse-v6only supports this value)
fast only applies to legacy models and will be rejected by the upstream when used with pixverse-v6.boolean
default:"false"
Whether to generate a multi-clip continuous video. Only supported in text-to-video and image-to-video modes.
true: Generate multi-clip continuous videofalse: Single clip (default)
array<url>
Input image URL array for image-to-video; only the first image is used.Images must be publicly accessible HTTP/HTTPS URLs.
url
First frame image URL for transition mode. Must be provided together with
last_frame_image.url
Last frame image URL for transition mode. Must be provided together with
first_frame_image.array<url>
Reference image URL array for multi-reference fusion mode; supports 1-7 images.Providing this field triggers multi-reference fusion mode.
string
Source task ID for video extension. Providing this field triggers video extension mode.The source task must belong to the current user, use model
pixverse-v6, and have status completed.Generation Modes
The adapter automatically dispatches to the corresponding generation mode based on request fields. Matching is done in priority order; the first match wins.| Mode | Trigger | Description |
|---|---|---|
| Text-to-video | No image or extension fields | Generate video based on prompt |
| Image-to-video | image_urls with one image | Use the first image as input |
| First/last frame transition | Both first_frame_image and last_frame_image provided | Generate a smooth transition between two frames |
| Multi-reference fusion | img_references array provided | Fuse 1-7 reference images into a video |
| Video extension | extend_from_task_id provided | Continue generation from a completed Pixverse task |
All image inputs only accept publicly accessible HTTP/HTTPS URLs. base64 and Data URI are not supported. If you only have local images, upload them to object storage first and pass the URL.
Parameter Rules
| Constraint | Description |
|---|---|
| Duration | 1 ≤ duration ≤ 15 seconds; transition mode only supports 5 or 8 seconds |
| Resolution | Only 360p, 540p, 720p, 1080p are supported |
| Aspect ratio | size is only effective in text-to-video and multi-reference fusion modes |
| Prompt length | prompt up to 5000 chars, negative_prompt up to 2048 chars |
| Image-to-video | image_urls only uses the first image |
| Transition | first_frame_image and last_frame_image must be provided together |
| Motion mode | pixverse-v6 only supports normal |
| Multi-reference fusion | img_references supports 1-7 images |
| Video extension | extend_from_task_id must point to a completed pixverse-v6 task owned by the current user |
Response
integer
Response status code.
200 on success.array
Querying Task Results
Video generation is an asynchronous task. After submission, atask_id is returned. Use the Get Task Status endpoint to query progress and results.
cURL
curl --request GET \
--url https://api.apimart.ai/v1/tasks/task_01JWXXXXXXXXXXXX \
--header 'Authorization: Bearer <token>'
completed or failed.
Successful Result Example
{
"code": 200,
"data": {
"id": "task_01KSPX48B8V1M6C2ZN0D0T4BKB",
"status": "completed",
"progress": 100,
"cost": 0.2,
"credits_cost": 2,
"created": 1779958948,
"completed": 1779958999,
"estimated_time": 100,
"actual_time": 51,
"result": {
"videos": [
{
"url": ["https://upload.apimart.ai/f/video/xxxx.mp4"],
"expires_at": 1780045399
}
]
}
}
}
data.result.videos[0].url[0]. The url field is itself an array. Video links typically expire after 24 hours; download or transfer them in time.
Failed Result Example
{
"code": 200,
"data": {
"id": "task_01KSPX48B8V1M6C2ZN0D0T4BKB",
"status": "failed",
"progress": 100,
"cost": 0,
"credits_cost": 0,
"created": 1779958948,
"completed": 1779958960,
"error": {
"code": "task_failed",
"message": "pixverse error 400063: moderation failed",
"type": "task_failed"
}
}
}
cost is typically 0. Read the error reason from data.error.message.
Use Cases
Case 1: Text-to-video
{
"model": "pixverse-v6",
"prompt": "A neon-lit alley in Tokyo at night, light rain, anamorphic lens flare",
"size": "21:9",
"resolution": "720p",
"duration": 8,
"seed": 42,
"audio": true
}
Case 2: Image-to-video
{
"model": "pixverse-v6",
"prompt": "Camera slowly zooms in, gentle wind moves the leaves",
"image_urls": ["https://example.com/first-frame.jpg"],
"resolution": "540p",
"duration": 5
}
Case 3: First/Last Frame Transition
{
"model": "pixverse-v6",
"prompt": "transform smoothly from a puppy to a cat",
"first_frame_image": "https://example.com/puppy.jpg",
"last_frame_image": "https://example.com/cat.jpg",
"resolution": "540p",
"duration": 5,
"motion_mode": "normal"
}
Case 4: Multi-Reference Fusion
{
"model": "pixverse-v6",
"prompt": "A girl wearing the outfit from image 2, holding the cat from image 3",
"img_references": [
"https://example.com/character.jpg",
"https://example.com/outfit.jpg",
"https://example.com/cat.jpg"
],
"size": "9:16",
"resolution": "720p",
"duration": 5
}
Case 5: Video Extension
{
"model": "pixverse-v6",
"prompt": "the character now walks into a forest",
"extend_from_task_id": "task_01JWXXXXXXXXXXXX",
"resolution": "540p",
"duration": 5
}