curl --request POST 'https://restapi.scalingtensor.com/api/media/generate' \
--header 'apiKey: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "eva-video-2.0-mini",
"params": {
"seed": -1,
"model": "eva-video-2.0-mini",
"ratio": "9:16",
"content": [
{
"text": "Use first-person POV composition from Video 1 throughout, and use Audio 1 as background music throughout. First-person fruit tea promo ad for Seedance'\''s limited-edition '\''Apple Peace'\'' apple fruit tea. Opening frame is Image 1: your hand picks a dew-covered Aksu red apple, with a crisp apple-snap sound. Seconds 2-4: quick cut, your hand drops apple chunks into a shaker, adds ice and tea base, and shakes vigorously — the clinking ice and shaking sounds synced to an upbeat drum beat, voiceover: '\''fresh-cut, fresh-shaken'\''. Seconds 4-6: first-person close-up of the finished product, layered fruit tea poured into a transparent cup, your hand gently squeezes cream foam to spread across the top, then sticks a pink label on the cup, camera zooms in on the layered texture of cream foam and fruit tea. Seconds 6-8: first-person hand holding the cup up, you raise the fruit tea from Image 2 in front of the camera (simulating handing it to the viewer), with the cup label clearly visible, voiceover: '\''take a fresh sip'\'', ending frame freezes on Image 2. All voiceover in a female voice.",
"type": "text"
},
{
"role": "reference_image",
"type": "image_url",
"image_url": {
"url": "https://example.com/your-image.jpg"
}
},
{
"role": "reference_image",
"type": "image_url",
"image_url": {
"url": "https://example.com/your-image.jpg"
}
},
{
"role": "reference_video",
"type": "video_url",
"video_url": {
"url": "https://example.com/your-video.mp4"
}
},
{
"role": "reference_audio",
"type": "audio_url",
"audio_url": {
"url": "https://example.com/your-audio.mp3"
}
}
],
"duration": 8,
"watermark": false,
"resolution": "720p",
"generate_audio": true,
"return_last_frame": false
}
}'
const response = await fetch("https://restapi.scalingtensor.com/api/media/generate", {
method: "POST",
headers: {
apiKey: process.env.SCALINGTENSOR_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "eva-video-2.0-mini",
"params": {
"seed": -1,
"model": "eva-video-2.0-mini",
"ratio": "9:16",
"content": [
{
"text": "Use first-person POV composition from Video 1 throughout, and use Audio 1 as background music throughout. First-person fruit tea promo ad for Seedance's limited-edition 'Apple Peace' apple fruit tea. Opening frame is Image 1: your hand picks a dew-covered Aksu red apple, with a crisp apple-snap sound. Seconds 2-4: quick cut, your hand drops apple chunks into a shaker, adds ice and tea base, and shakes vigorously — the clinking ice and shaking sounds synced to an upbeat drum beat, voiceover: 'fresh-cut, fresh-shaken'. Seconds 4-6: first-person close-up of the finished product, layered fruit tea poured into a transparent cup, your hand gently squeezes cream foam to spread across the top, then sticks a pink label on the cup, camera zooms in on the layered texture of cream foam and fruit tea. Seconds 6-8: first-person hand holding the cup up, you raise the fruit tea from Image 2 in front of the camera (simulating handing it to the viewer), with the cup label clearly visible, voiceover: 'take a fresh sip', ending frame freezes on Image 2. All voiceover in a female voice.",
"type": "text"
},
{
"role": "reference_image",
"type": "image_url",
"image_url": {
"url": "https://example.com/your-image.jpg"
}
},
{
"role": "reference_image",
"type": "image_url",
"image_url": {
"url": "https://example.com/your-image.jpg"
}
},
{
"role": "reference_video",
"type": "video_url",
"video_url": {
"url": "https://example.com/your-video.mp4"
}
},
{
"role": "reference_audio",
"type": "audio_url",
"audio_url": {
"url": "https://example.com/your-audio.mp3"
}
}
],
"duration": 8,
"watermark": false,
"resolution": "720p",
"generate_audio": true,
"return_last_frame": false
}
}),
});
const result = await response.json();
if (!response.ok || result.code !== 0) {
throw new Error(result.msg || `Request failed: ${response.status}`);
}
console.log(result.data); // Save data.jobId to query /api/media/result
import os
import requests
payload = {
"model": "eva-video-2.0-mini",
"params": {
"seed": -1,
"model": "eva-video-2.0-mini",
"ratio": "9:16",
"content": [
{
"text": "Use first-person POV composition from Video 1 throughout, and use Audio 1 as background music throughout. First-person fruit tea promo ad for Seedance's limited-edition 'Apple Peace' apple fruit tea. Opening frame is Image 1: your hand picks a dew-covered Aksu red apple, with a crisp apple-snap sound. Seconds 2-4: quick cut, your hand drops apple chunks into a shaker, adds ice and tea base, and shakes vigorously — the clinking ice and shaking sounds synced to an upbeat drum beat, voiceover: 'fresh-cut, fresh-shaken'. Seconds 4-6: first-person close-up of the finished product, layered fruit tea poured into a transparent cup, your hand gently squeezes cream foam to spread across the top, then sticks a pink label on the cup, camera zooms in on the layered texture of cream foam and fruit tea. Seconds 6-8: first-person hand holding the cup up, you raise the fruit tea from Image 2 in front of the camera (simulating handing it to the viewer), with the cup label clearly visible, voiceover: 'take a fresh sip', ending frame freezes on Image 2. All voiceover in a female voice.",
"type": "text",
},
{
"role": "reference_image",
"type": "image_url",
"image_url": {
"url": "https://example.com/your-image.jpg",
},
},
{
"role": "reference_image",
"type": "image_url",
"image_url": {
"url": "https://example.com/your-image.jpg",
},
},
{
"role": "reference_video",
"type": "video_url",
"video_url": {
"url": "https://example.com/your-video.mp4",
},
},
{
"role": "reference_audio",
"type": "audio_url",
"audio_url": {
"url": "https://example.com/your-audio.mp3",
},
},
],
"duration": 8,
"watermark": False,
"resolution": "720p",
"generate_audio": True,
"return_last_frame": False,
},
}
response = requests.post(
"https://restapi.scalingtensor.com/api/media/generate",
headers={"apiKey": os.environ["SCALINGTENSOR_API_KEY"]},
json=payload,
timeout=60,
)
result = response.json()
if result["code"] != 0:
raise RuntimeError(result["msg"])
print(result["data"]) # Save data["jobId"] to query /api/media/result