About
Makes the people or things in the images perform the motion of a source video (1–8 images), keeping its motion and sound · 480p to 1080p · source 4–15 s
Model id sume-remix-motion-transfer, sent to POST https://api.sume.com/v1/sume/remix/motion-transfer/v1.0.
1. Calling the API
Install the client
npm install @sume-com/client
Setup your API key
Set SUME_API_KEY as an environment variable in your server runtime. Make the key in Sume API → API keys.
export SUME_API_KEY="YOUR_API_KEY"
Submit a request
This sends the Playground's request, with the input it holds now. Change the input there and this updates. subscribe submits it, waits for the job and returns the result.
import { createSumeClient } from "@sume-com/client";
const sume = createSumeClient({ baseURL: "https://api.sume.com" });
const response = await sume.subscribe("/v1/sume/remix/motion-transfer/v1.0", {
input: {
"prompt": "Replace every person in this video using the reference images.\n\nFOREGROUND (center, closest to camera, holding a cigarette in their mouth and exhaling smoke) = David only. Use image 1 for David's face and image 3 for David's full body and outfit. He is a young Korean man with a black bowl-cut haircut. He wears exactly the outfit from image 3: black crew-neck short-sleeve t-shirt, black straight pants, black sneakers. Keep the cigarette in his mouth and keep the smoke exhalation and smoke trail exactly as in the source.\n\nEVERY person in the BACKGROUND (all the people standing in rows behind the foreground smoker — every single face and body in the crowd, every row, left and right) = Clawra. Use image 2 for Clawra's face and image 4 for Clawra's full body and outfit. She is a young woman with long wavy black hair with bangs, feminine face and body. She wears exactly the outfit from image 4: white short-sleeve t-shirt, black-and-white checkered knit sweater draped over her shoulders with sleeves tied in front, light beige wide-leg pants, white sneakers. Duplicate Clawra across the entire background crowd — every background person becomes Clawra with her face, hair, body and outfit. Do not leave any original background faces or uniforms.\n\nDo not swap David and Clawra. Do not put Clawra in the foreground smoker role. Do not put David in the background. Keep the same camera framing, composition, lighting, depth of field, timing, and the cigarette smoke. Only the people's identities and outfits change.",
"video_url": "https://media.sume.com/assets/asset_b09c8d8569b347a5855baf3d90735000/source.mp4",
"duration": 10,
"resolution": "720p",
"image_urls": [
"https://media.sume.com/assets/asset_255c4f07f9b64d16bf44ac14f05d8a5a/source.jpg",
"https://media.sume.com/assets/asset_276ea2723d21445dafe924bec6b0fa97/source.jpg"
]
},
});
console.log(response.status, response.video?.url);2. Authentication
API key
Send your Sume API key as a bearer token from server code only. Keys made under Sume API → API keys spend the workspace balance, the same one Studio spends, and call the model API only.
Authorization: Bearer $SUME_API_KEY
3. Queue
A submit answers at once with the job. Poll its status until it is completed, failed or canceled. Failed and canceled jobs are refunded.
Fetch request status
const response = await fetch(`https://api.sume.com/v1/jobs/${jobId}/status`, {
headers: { authorization: `Bearer ${process.env.SUME_API_KEY}` },
});
const { data: job } = await response.json();Get the result
A completed job returns its media. A queued or running job answers 409 job_not_completed with the current status; a failed one 409 job_failed with the reason, and a canceled one 409 job_canceled.
const response = await fetch(`https://api.sume.com/v1/jobs/${jobId}/result`, {
headers: { authorization: `Bearer ${process.env.SUME_API_KEY}` },
});
const { data: result } = await response.json();Cancel a request
A job can be canceled until generation starts.
const response = await fetch(`https://api.sume.com/v1/jobs/${jobId}/cancel`, {
method: "POST",
headers: { authorization: `Bearer ${process.env.SUME_API_KEY}` },
});
const { data: job } = await response.json();4. Files
Hosted files (URL)
Fields that end in _url or _urls take public HTTPS URLs. Some hosts block or rate-limit fetches from servers.
Uploading files
Upload a local file to Sume's storage, then send the URL it returns.
import { readFile } from "node:fs/promises";
import { createSumeClient } from "@sume-com/client";
const sume = createSumeClient({ baseURL: "https://api.sume.com" });
const url = await sume.uploadImage(await readFile("input.png"), "png");5. Schema
Input
modelstringrequired- "sume-remix-motion-transfer"
promptstring- Optional, any language: which subject each image takes, what stays or the moves.
video_urlstringrequired- The source video, 4–15 s, at most 200 MiB (HTTPS). The aspect ratio follows it.
durationinteger- Optional: the source video's length in seconds, rounded up. Left out, the API reads it from the file. The output follows the source's length.Range: 4–15
resolutionstring- Output resolution.Default value: "720p"Possible enum values: 480p, 720p, 1080p
image_urlsstring[]required- 1–8 images of the people, objects or look to use, in order (HTTPS).Range: 1–8
{
"model": "sume-remix-motion-transfer",
"prompt": "Replace every person in this video using the reference images.\n\nFOREGROUND (center, closest to camera, holding a cigarette in their mouth and exhaling smoke) = David only. Use image 1 for David's face and image 3 for David's full body and outfit. He is a young Korean man with a black bowl-cut haircut. He wears exactly the outfit from image 3: black crew-neck short-sleeve t-shirt, black straight pants, black sneakers. Keep the cigarette in his mouth and keep the smoke exhalation and smoke trail exactly as in the source.\n\nEVERY person in the BACKGROUND (all the people standing in rows behind the foreground smoker — every single face and body in the crowd, every row, left and right) = Clawra. Use image 2 for Clawra's face and image 4 for Clawra's full body and outfit. She is a young woman with long wavy black hair with bangs, feminine face and body. She wears exactly the outfit from image 4: white short-sleeve t-shirt, black-and-white checkered knit sweater draped over her shoulders with sleeves tied in front, light beige wide-leg pants, white sneakers. Duplicate Clawra across the entire background crowd — every background person becomes Clawra with her face, hair, body and outfit. Do not leave any original background faces or uniforms.\n\nDo not swap David and Clawra. Do not put Clawra in the foreground smoker role. Do not put David in the background. Keep the same camera framing, composition, lighting, depth of field, timing, and the cigarette smoke. Only the people's identities and outfits change.",
"video_url": "https://media.sume.com/assets/asset_b09c8d8569b347a5855baf3d90735000/source.mp4",
"duration": 10,
"resolution": "720p",
"image_urls": [
"https://media.sume.com/assets/asset_255c4f07f9b64d16bf44ac14f05d8a5a/source.jpg",
"https://media.sume.com/assets/asset_276ea2723d21445dafe924bec6b0fa97/source.jpg"
]
}Output
data.result.artifactsArtifact[]required- The generated media, in order.
data.jobJobrequired- The job record: id, status, model, input, created_at, started_at and completed_at.
Artifact
urlstringrequired- Public Sume CDN URL for the file. Do not parse the path.
typestringrequired- image, video, audio, model or file.
content_typestringrequired- The file's MIME type.
idstringrequired- Opaque artifact id, safe to log.
widthinteger- Pixels, when known.
heightinteger- Pixels, when known.
duration_msinteger- Length of a video or audio file, when known.
size_bytesinteger- File size, when known.
6. Price before you submit
The estimate is the charge: the same function prices both. This one prices the Playground's input.
const response = await fetch("https://api.sume.com/v1/open/estimate", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"model": "sume-remix-motion-transfer",
"input": {
"prompt": "Replace every person in this video using the reference images.\n\nFOREGROUND (center, closest to camera, holding a cigarette in their mouth and exhaling smoke) = David only. Use image 1 for David's face and image 3 for David's full body and outfit. He is a young Korean man with a black bowl-cut haircut. He wears exactly the outfit from image 3: black crew-neck short-sleeve t-shirt, black straight pants, black sneakers. Keep the cigarette in his mouth and keep the smoke exhalation and smoke trail exactly as in the source.\n\nEVERY person in the BACKGROUND (all the people standing in rows behind the foreground smoker — every single face and body in the crowd, every row, left and right) = Clawra. Use image 2 for Clawra's face and image 4 for Clawra's full body and outfit. She is a young woman with long wavy black hair with bangs, feminine face and body. She wears exactly the outfit from image 4: white short-sleeve t-shirt, black-and-white checkered knit sweater draped over her shoulders with sleeves tied in front, light beige wide-leg pants, white sneakers. Duplicate Clawra across the entire background crowd — every background person becomes Clawra with her face, hair, body and outfit. Do not leave any original background faces or uniforms.\n\nDo not swap David and Clawra. Do not put Clawra in the foreground smoker role. Do not put David in the background. Keep the same camera framing, composition, lighting, depth of field, timing, and the cigarette smoke. Only the people's identities and outfits change.",
"video_url": "https://media.sume.com/assets/asset_b09c8d8569b347a5855baf3d90735000/source.mp4",
"duration": 10,
"resolution": "720p",
"image_urls": [
"https://media.sume.com/assets/asset_255c4f07f9b64d16bf44ac14f05d8a5a/source.jpg",
"https://media.sume.com/assets/asset_276ea2723d21445dafe924bec6b0fa97/source.jpg"
]
}
}),
});
const { data } = await response.json();
console.log(data.usd);Full reference: /docs
Remix
