Veo 3.1 画像からビデオ
curl --request POST \
--url https://api.sinancode.com/v1/generate/k/veo3-image-to-video \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"imageUrls": [
"https://example.com/image1.jpg"
],
"prompt": "animate the scene with smooth camera movement",
"aspectRatio": "16:9",
"enableTranslation": true,
"model": "veo3_fast",
"seeds": 12345,
"watermark": ""
}
'import requests
url = "https://api.sinancode.com/v1/generate/k/veo3-image-to-video"
payload = {
"imageUrls": ["https://example.com/image1.jpg"],
"prompt": "animate the scene with smooth camera movement",
"aspectRatio": "16:9",
"enableTranslation": True,
"model": "veo3_fast",
"seeds": 12345,
"watermark": ""
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
imageUrls: ['https://example.com/image1.jpg'],
prompt: 'animate the scene with smooth camera movement',
aspectRatio: '16:9',
enableTranslation: true,
model: 'veo3_fast',
seeds: 12345,
watermark: ''
})
};
fetch('https://api.sinancode.com/v1/generate/k/veo3-image-to-video', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sinancode.com/v1/generate/k/veo3-image-to-video",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'imageUrls' => [
'https://example.com/image1.jpg'
],
'prompt' => 'animate the scene with smooth camera movement',
'aspectRatio' => '16:9',
'enableTranslation' => true,
'model' => 'veo3_fast',
'seeds' => 12345,
'watermark' => ''
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sinancode.com/v1/generate/k/veo3-image-to-video"
payload := strings.NewReader("{\n \"imageUrls\": [\n \"https://example.com/image1.jpg\"\n ],\n \"prompt\": \"animate the scene with smooth camera movement\",\n \"aspectRatio\": \"16:9\",\n \"enableTranslation\": true,\n \"model\": \"veo3_fast\",\n \"seeds\": 12345,\n \"watermark\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sinancode.com/v1/generate/k/veo3-image-to-video")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"imageUrls\": [\n \"https://example.com/image1.jpg\"\n ],\n \"prompt\": \"animate the scene with smooth camera movement\",\n \"aspectRatio\": \"16:9\",\n \"enableTranslation\": true,\n \"model\": \"veo3_fast\",\n \"seeds\": 12345,\n \"watermark\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sinancode.com/v1/generate/k/veo3-image-to-video")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"imageUrls\": [\n \"https://example.com/image1.jpg\"\n ],\n \"prompt\": \"animate the scene with smooth camera movement\",\n \"aspectRatio\": \"16:9\",\n \"enableTranslation\": true,\n \"model\": \"veo3_fast\",\n \"seeds\": 12345,\n \"watermark\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "01234567-89ab-cdef-0123-456789abcdef"
}{
"error_code": "<string>",
"message": "<string>"
}{
"error_code": "<string>",
"message": "<string>"
}{
"error_code": "<string>",
"message": "<string>"
}{
"error_code": "<string>",
"message": "<string>"
}動画生成 - Veo 3
Veo 3 Image to Video
Google Veo 3.1 モデルを使用して、1-2枚の画像からビデオを生成します(非同期)。最初と最後のフレームの補間をサポート
POST
/
generate
/
k
/
veo3-image-to-video
Veo 3.1 画像からビデオ
curl --request POST \
--url https://api.sinancode.com/v1/generate/k/veo3-image-to-video \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"imageUrls": [
"https://example.com/image1.jpg"
],
"prompt": "animate the scene with smooth camera movement",
"aspectRatio": "16:9",
"enableTranslation": true,
"model": "veo3_fast",
"seeds": 12345,
"watermark": ""
}
'import requests
url = "https://api.sinancode.com/v1/generate/k/veo3-image-to-video"
payload = {
"imageUrls": ["https://example.com/image1.jpg"],
"prompt": "animate the scene with smooth camera movement",
"aspectRatio": "16:9",
"enableTranslation": True,
"model": "veo3_fast",
"seeds": 12345,
"watermark": ""
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
imageUrls: ['https://example.com/image1.jpg'],
prompt: 'animate the scene with smooth camera movement',
aspectRatio: '16:9',
enableTranslation: true,
model: 'veo3_fast',
seeds: 12345,
watermark: ''
})
};
fetch('https://api.sinancode.com/v1/generate/k/veo3-image-to-video', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sinancode.com/v1/generate/k/veo3-image-to-video",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'imageUrls' => [
'https://example.com/image1.jpg'
],
'prompt' => 'animate the scene with smooth camera movement',
'aspectRatio' => '16:9',
'enableTranslation' => true,
'model' => 'veo3_fast',
'seeds' => 12345,
'watermark' => ''
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sinancode.com/v1/generate/k/veo3-image-to-video"
payload := strings.NewReader("{\n \"imageUrls\": [\n \"https://example.com/image1.jpg\"\n ],\n \"prompt\": \"animate the scene with smooth camera movement\",\n \"aspectRatio\": \"16:9\",\n \"enableTranslation\": true,\n \"model\": \"veo3_fast\",\n \"seeds\": 12345,\n \"watermark\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sinancode.com/v1/generate/k/veo3-image-to-video")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"imageUrls\": [\n \"https://example.com/image1.jpg\"\n ],\n \"prompt\": \"animate the scene with smooth camera movement\",\n \"aspectRatio\": \"16:9\",\n \"enableTranslation\": true,\n \"model\": \"veo3_fast\",\n \"seeds\": 12345,\n \"watermark\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sinancode.com/v1/generate/k/veo3-image-to-video")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"imageUrls\": [\n \"https://example.com/image1.jpg\"\n ],\n \"prompt\": \"animate the scene with smooth camera movement\",\n \"aspectRatio\": \"16:9\",\n \"enableTranslation\": true,\n \"model\": \"veo3_fast\",\n \"seeds\": 12345,\n \"watermark\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "01234567-89ab-cdef-0123-456789abcdef"
}{
"error_code": "<string>",
"message": "<string>"
}{
"error_code": "<string>",
"message": "<string>"
}{
"error_code": "<string>",
"message": "<string>"
}{
"error_code": "<string>",
"message": "<string>"
}Google DeepMind の Veo 3 モデルを使用して画像から動画を生成します。
承認
API Tokenを使用して認証を行ってください
ボディ
application/json
タスクパラメータ
画像URLリスト(必須)- 動画生成用の画像URL 1枚の画像:単一画像から動画を生成;2枚の画像:開始フレームと終了フレームから動画を生成
Required array length:
1 - 2 elements例:
["https://example.com/image1.jpg"]
プロンプト(必須)- 動画生成のためのテキスト記述
Minimum string length:
1例:
"animate the scene with smooth camera movement"
アスペクト比(オプション)- 動画のアスペクト比、デフォルト 16:9
利用可能なオプション:
16:9, 9:16, Auto 例:
"16:9"
翻訳を有効化(オプション)- 翻訳を有効にする、デフォルト true
例:
true
モデル(オプション)- veo3(品質優先)または veo3_fast(速度優先)、デフォルト veo3_fast
利用可能なオプション:
veo3, veo3_fast 例:
"veo3_fast"
ランダムシード(オプション)- 範囲 10000-99999
必須範囲:
10000 <= x <= 99999例:
12345
透かし(オプション)- 透かし識別子
例:
""
レスポンス
OK
タスクID
例:
"01234567-89ab-cdef-0123-456789abcdef"
⌘I