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": "認証に失敗しました。API キーを確認してください",
"type": "authentication_error"
}
}
{
"error": {
"code": 403,
"message": "insufficient quota: balance=0, required=0.25",
"type": "quota_not_enough"
}
}
{
"error": {
"code": 429,
"message": "リクエストが多すぎます。しばらくしてから再試行してください",
"type": "rate_limit_error"
}
}
Pixverse v6
Pixverse v6 動画生成
- Pixverse v6 統合動画生成モデル
- テキストから動画、画像から動画、始終フレームトランジション、複数参照画像融合、動画延長に対応
- 360p/540p/720p/1080p の解像度、1~15 秒の動画長に対応
- 非同期タスク API。送信後はタスク ID で結果を取得します
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": "認証に失敗しました。API キーを確認してください",
"type": "authentication_error"
}
}
{
"error": {
"code": 403,
"message": "insufficient quota: balance=0, required=0.25",
"type": "quota_not_enough"
}
}
{
"error": {
"code": 429,
"message": "リクエストが多すぎます。しばらくしてから再試行してください",
"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": "認証に失敗しました。API キーを確認してください",
"type": "authentication_error"
}
}
{
"error": {
"code": 403,
"message": "insufficient quota: balance=0, required=0.25",
"type": "quota_not_enough"
}
}
{
"error": {
"code": 429,
"message": "リクエストが多すぎます。しばらくしてから再試行してください",
"type": "rate_limit_error"
}
}
認証
string
必須
すべてのエンドポイントは Bearer Token による認証が必要です。API Key の取得:API Key 管理ページ にアクセスして API Key を取得してください。リクエストヘッダーに以下を追加します:
Authorization: Bearer YOUR_API_KEY
リクエストパラメータ
string
必須
動画生成モデル名。
pixverse-v6 で固定です。boolean
デフォルト:"false"
動画タスクを送信する前にコンテンツモデレーションを実行するかどうかを指定します。
true:omni-moderation-latestでプロンプトと入力画像を審査falseまたは省略:審査リクエストを行わず、審査コストや遅延を追加しない(デフォルト)
string
必須
動画コンテンツの説明。最大 5000 文字。すべてのモードで必須です。
string
デフォルト:"540p"
動画解像度。課金に直接影響します。
360p:SD540p:標準(デフォルト)720p:HD1080p:フル HD
指定外の解像度はパラメータエラーになります。
integer
デフォルト:"5"
動画の長さ(秒)。範囲は
1-15。始終フレームトランジションモードでは
5 または 8 秒のみ対応します。string
デフォルト:"16:9"
動画のアスペクト比。テキストから動画および複数参照画像融合モードでのみ有効です。
16:9:横長ワイド(デフォルト)4:3:横長 4:31:1:正方形3:4:縦長 3:49:16:縦型2:3:縦長 2:33:2:横長 3:221:9:シネマワイド
integer
デフォルト:"0"
ランダムシード。範囲は
0-2147483647。同一の prompt と seed で類似結果を再現できます。string
ネガティブプロンプト。生成したくない内容を除外します。最大 2048 文字。
boolean
デフォルト:"false"
オーディオトラックを生成するかどうか。
true:オーディオを生成(課金単価が上がります)false:オーディオなし(デフォルト)
boolean
デフォルト:"false"
動画の右下にウォーターマークを追加するかどうか。
true:ウォーターマークを追加false:ウォーターマークなし(デフォルト)
string
モーションモード。
normal:標準モード(pixverse-v6はこの値のみ対応)
fast は旧モデル専用です。pixverse-v6 で指定すると上流に拒否されます。boolean
デフォルト:"false"
複数クリップ連続動画を生成するかどうか。テキストから動画および画像から動画モードのみ対応します。
true:複数クリップ連続動画を生成false:単一クリップ(デフォルト)
array<url>
画像から動画モードの入力画像 URL 配列。先頭の 1 枚のみ使用されます。画像は公開アクセス可能な HTTP/HTTPS URL である必要があります。
url
始終フレームトランジションモードの開始フレーム画像 URL。
last_frame_image と必ずペアで指定します。url
始終フレームトランジションモードの終了フレーム画像 URL。
first_frame_image と必ずペアで指定します。array<url>
複数参照画像融合モードの参照画像 URL 配列。1~7 枚に対応します。このフィールドを指定すると複数参照画像融合モードがトリガーされます。
string
動画延長の元タスク ID。このフィールドを指定すると動画延長モードがトリガーされます。元タスクは現在のユーザーのものであり、モデルが
pixverse-v6、ステータスが completed である必要があります。生成モード
アダプタはリクエストフィールドに応じて自動的に対応する生成モードへ振り分けます。優先順位順にマッチし、最初に条件を満たしたものが採用されます。| モード | トリガー条件 | 説明 |
|---|---|---|
| テキストから動画 | 画像/延長フィールド未指定 | prompt から動画を生成 |
| 画像から動画 | image_urls を 1 枚指定 | 先頭の画像を入力画像として使用 |
| 始終フレームトランジション | first_frame_image と last_frame_image の両方を指定 | 2 フレーム間の滑らかなトランジションを生成 |
| 複数参照画像融合 | img_references 配列を指定 | 1~7 枚の参照画像を融合して動画を生成 |
| 動画延長 | extend_from_task_id を指定 | 完了済み Pixverse タスクから続けて生成 |
すべての画像入力は公開アクセス可能な HTTP/HTTPS URL のみ対応します。base64 や Data URI には対応していません。ローカル画像のみの場合は、先にオブジェクトストレージへアップロードして URL を渡してください。
パラメータルール
| 制約 | 説明 |
|---|---|
| 動画長 | 1 ≤ duration ≤ 15 秒。トランジションモードは 5 または 8 秒のみ |
| 解像度 | 360p、540p、720p、1080p のみ対応 |
| アスペクト比 | size はテキストから動画および複数参照画像融合モードでのみ有効 |
| プロンプト長 | prompt は最大 5000 文字、negative_prompt は最大 2048 文字 |
| 画像から動画 | image_urls は先頭の 1 枚のみ使用 |
| トランジション | first_frame_image と last_frame_image をペアで指定 |
| モーションモード | pixverse-v6 は normal のみ対応 |
| 複数参照画像融合 | img_references は 1~7 枚に対応 |
| 動画延長 | extend_from_task_id は現在のユーザー所有の completed 状態の pixverse-v6 タスクである必要があります |
レスポンス
integer
ステータスコード。成功時は
200。タスク結果の取得
動画生成は非同期タスクです。送信後にtask_id が返されます。タスクステータス取得 エンドポイントで進捗と結果を確認してください。
cURL
curl --request GET \
--url https://api.apimart.ai/v1/tasks/task_01JWXXXXXXXXXXXX \
--header 'Authorization: Bearer <token>'
completed または failed になるまで、5 秒間隔のポーリングを推奨します。
成功結果の例
{
"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] です。url フィールド自体も配列です。動画リンクは通常 24 時間で期限切れとなるため、早めにダウンロードまたは転送してください。
失敗結果の例
{
"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 は 0 です。エラー理由は data.error.message から読み取ってください。
使用シナリオ
シナリオ 1:テキストから動画
{
"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
}
シナリオ 2:画像から動画
{
"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
}
シナリオ 3:始終フレームトランジション
{
"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"
}
シナリオ 4:複数参照画像融合
{
"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
}
シナリオ 5:動画延長
{
"model": "pixverse-v6",
"prompt": "the character now walks into a forest",
"extend_from_task_id": "task_01JWXXXXXXXXXXXX",
"resolution": "540p",
"duration": 5
}