Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import fs from 'node:fs'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { defineConfig } from 'vitepress'
import sandboxDev from './sandbox-dev.mjs'
import {
Expand All @@ -10,6 +13,29 @@ import {
const siteOrigin = 'https://www.sandbase.ai'
const docsBase = '/docs/'

// Compatibility pages for moved model references declare `robots: noindex`.
// Collect them once so the sitemap never advertises a moved URL.
function noindexModelReferenceUrls() {
const docsRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..')
const root = path.join(docsRoot, 'model-api-reference')
const urls = new Set<string>()
const walk = (directory: string) => {
for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {
const filename = path.join(directory, entry.name)
if (entry.isDirectory()) walk(filename)
else if (entry.name.endsWith('.md')) {
const frontmatter = fs.readFileSync(filename, 'utf8').match(/^---\n([\s\S]*?)\n---/)?.[1] ?? ''
if (/^robots:\s*["']?noindex/m.test(frontmatter)) {
urls.add(path.relative(docsRoot, filename).split(path.sep).join('/').replace(/\.md$/, ''))
}
}
}
}
walk(root)
return urls
}
const noindexModelReferences = noindexModelReferenceUrls()

// Keep rendered document titles within a search-friendly length even when a
// generated page title is long. Frontmatter titles remain descriptive; the
// head title is shortened only at render time so navigation labels and body
Expand Down Expand Up @@ -261,6 +287,7 @@ export default defineConfig({
'store/models',
'api-reference/volcengine-contents-generations',
].includes(item.url.replace(/^\//, '')))
.filter((item) => !noindexModelReferences.has(item.url.replace(/^\//, '')))
.map((item) => ({
...item,
url: `${docsBase}${item.url.replace(/^\//, '')}`,
Expand Down
111 changes: 45 additions & 66 deletions .vitepress/modelApiReferenceSidebar.generated.ts

Large diffs are not rendered by default.

52 changes: 6 additions & 46 deletions model-api-reference/image-generation.md

Large diffs are not rendered by default.

25 changes: 7 additions & 18 deletions model-api-reference/image-generation/alibaba/wan-vace.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
---
title: "Vace API Reference"
description: "Vace API reference for SandBase. Use model alibaba/wan-vace with /v1/run; see request and response examples."
aside: false
outline: false
apiReferenceKey: "image/alibaba/wan-vace"
apiReferenceJson: "{\"title\":\"Vace\",\"operation\":\"Image Generation\",\"method\":\"POST\",\"path\":\"/v1/run\",\"description\":\"Wan Vace by Alibaba - AI-powered video editing and transformation. Apply style transfer, motion control, lip-sync, and visual effects to existing videos with natural language instructions.\",\"groups\":[{\"title\":\"Request body\",\"description\":\"Submit an async generation request. The model field selects the model; other fields are model-specific input parameters.\",\"fields\":[{\"name\":\"model\",\"type\":\"string\",\"required\":true,\"description\":\"Model identifier. Set to alibaba/wan-vace.\",\"default\":\"alibaba/wan-vace\"},{\"name\":\"prompt\",\"type\":\"string\",\"required\":true,\"description\":\"The text prompt to guide video generation.\"},{\"name\":\"aspect_ratio\",\"type\":\"string\",\"required\":false,\"description\":\"The aspect ratio of the generated image.\",\"constraints\":\"Allowed values: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16\"},{\"name\":\"mask\",\"type\":\"string\",\"required\":false,\"description\":\"URL to the guiding mask file. If provided, the model will use this mask as a reference to create masked video. If provided mask video url will be ignored.\"},{\"name\":\"video\",\"type\":\"string\",\"required\":false,\"description\":\"URL to the source video file. If provided, the model will use this video as a reference.\"},{\"name\":\"resolution\",\"type\":\"string\",\"required\":false,\"description\":\"Resolution of the generated video (480p,580p, or 720p).\",\"default\":\"720p\",\"constraints\":\"Allowed values: 480p, 580p, 720p\"},{\"name\":\"num_inference_steps\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of inference steps for sampling. Higher values give better quality but take longer.\",\"default\":\"30\",\"constraints\":\"Range: 2 to 40\"},{\"name\":\"seed\",\"type\":\"integer\",\"required\":false,\"description\":\"Random seed for reproducibility. If None, a random seed is chosen.\"},{\"name\":\"preprocess\",\"type\":\"boolean\",\"required\":false,\"description\":\"Whether to preprocess the input video.\",\"default\":\"false\"},{\"name\":\"shift\",\"type\":\"number\",\"required\":false,\"description\":\"Shift parameter for video generation.\",\"default\":\"5\",\"constraints\":\"Range: 1 to 10\"},{\"name\":\"mask_video_url\",\"type\":\"string\",\"required\":false,\"description\":\"URL to the source mask file. If provided, the model will use this mask as a reference.\"},{\"name\":\"num_frames\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of frames to generate. Must be between 81 to 100 (inclusive). Works only with only reference images as input if source video or mask video is provided output len would be same as source up to 241 frames\",\"default\":\"81\",\"constraints\":\"Range: 81 to 240\"},{\"name\":\"task\",\"type\":\"string\",\"required\":false,\"description\":\"Task type for the model.\",\"default\":\"depth\",\"constraints\":\"Allowed values: depth, inpainting\"},{\"name\":\"ref_image_urls\",\"type\":\"array<string>\",\"required\":false,\"description\":\"Urls to source reference image. If provided, the model will use this image as reference.\"},{\"name\":\"frames_per_second\",\"type\":\"integer\",\"required\":false,\"description\":\"Frames per second of the generated video. Must be between 5 to 24.\",\"default\":\"16\",\"constraints\":\"Range: 5 to 24\"}]},{\"title\":\"Response Schema\",\"description\":\"The submit endpoint returns a run response. If its status is pending or running, poll GET /v1/run/{id} with the returned opaque ID until it reaches a terminal state.\",\"fields\":[{\"name\":\"id\",\"type\":\"string\",\"required\":true,\"description\":\"Opaque SandBase run identifier. Use it exactly as returned; no prefix is guaranteed.\"},{\"name\":\"status\",\"type\":\"string\",\"required\":true,\"description\":\"Current public run status.\",\"constraints\":\"Allowed values: pending, running, completed, failed, timeout\"},{\"name\":\"model\",\"type\":\"string\",\"required\":false,\"description\":\"Public SandBase model name used for this run.\"},{\"name\":\"outputs\",\"type\":\"array<object>\",\"required\":false,\"description\":\"Present only for completed runs. Each object is capability-specific; inspect the selected model schema for its fields.\"},{\"name\":\"error\",\"type\":\"object\",\"required\":false,\"description\":\"Present only for failed or timeout runs. Contains a public error type and sanitized message.\"},{\"name\":\"error.type\",\"type\":\"string\",\"required\":false,\"description\":\"Stable public error category.\"},{\"name\":\"error.message\",\"type\":\"string\",\"required\":false,\"description\":\"Sanitized error message safe to show to clients.\"},{\"name\":\"usage\",\"type\":\"object\",\"required\":false,\"description\":\"Usage details when available.\"}]},{\"title\":\"Model capabilities\",\"fields\":[{\"name\":\"capability_tags\",\"type\":\"array<string>\",\"required\":true,\"description\":\"Capabilities declared by the model registry.\",\"default\":\"video-to-video\"},{\"name\":\"execution_mode\",\"type\":\"string\",\"required\":true,\"description\":\"Execution mode declared by the model registry.\",\"default\":\"async\"}]}],\"examples\":[{\"label\":\"cURL\",\"language\":\"bash\",\"code\":\"# 1. Submit a generation request\\ncurl -X POST https://api.sandbase.ai/v1/run \\\\\\n -H \\\"Authorization: Bearer $SANDBASE_API_KEY\\\" \\\\\\n -H \\\"Content-Type: application/json\\\" \\\\\\n -d '{\\n \\\"model\\\": \\\"alibaba/wan-vace\\\",\\n \\\"prompt\\\": \\\"The video shows a man riding a horse on a vast grassland. He has long lavender hair and wears a traditional dress of a white top and black pants. The animation style makes him look like he is doing some kind of outdoor activity or performing. The background is a spectacular mountain range and cloud sky, giving a sense of tranquility and vastness. The entire video is shot from a fixed angle, focusing on the rider and his horse.\\\",\\n \\\"aspect_ratio\\\": \\\"21:9\\\",\\n \\\"video\\\": \\\"https://static.sandbase.ai/examples/alibaba/wan-vace/input_video_0.mp4\\\"\\n}'\\n\\n# 2. If the response is still running, poll the returned id\\ncurl https://api.sandbase.ai/v1/run/f3d2e8a1-7c4b-4a12-9d2e-123456789abc \\\\\\n -H \\\"Authorization: Bearer $SANDBASE_API_KEY\\\"\"},{\"label\":\"Python\",\"language\":\"python\",\"code\":\"import os\\nimport time\\nimport requests\\n\\napi_url = \\\"https://api.sandbase.ai\\\"\\nheaders = {\\n \\\"Authorization\\\": f\\\"Bearer {os.environ['SANDBASE_API_KEY']}\\\",\\n \\\"Content-Type\\\": \\\"application/json\\\",\\n}\\npayload = {\\n \\\"model\\\": \\\"alibaba/wan-vace\\\",\\n \\\"prompt\\\": \\\"The video shows a man riding a horse on a vast grassland. He has long lavender hair and wears a traditional dress of a white top and black pants. The animation style makes him look like he is doing some kind of outdoor activity or performing. The background is a spectacular mountain range and cloud sky, giving a sense of tranquility and vastness. The entire video is shot from a fixed angle, focusing on the rider and his horse.\\\",\\n \\\"aspect_ratio\\\": \\\"21:9\\\",\\n \\\"video\\\": \\\"https://static.sandbase.ai/examples/alibaba/wan-vace/input_video_0.mp4\\\"\\n}\\n\\nresponse = requests.post(f\\\"{api_url}/v1/run\\\", headers=headers, json=payload)\\nresponse.raise_for_status()\\nresult = response.json()\\n\\nwhile result[\\\"status\\\"] in (\\\"pending\\\", \\\"running\\\"):\\n time.sleep(2)\\n result = requests.get(f\\\"{api_url}/v1/run/\\\" + result[\\\"id\\\"], headers=headers).json()\\n\\nprint(result)\"},{\"label\":\"TypeScript\",\"language\":\"typescript\",\"code\":\"const apiUrl = \\\"https://api.sandbase.ai\\\";\\nconst headers = {\\n Authorization: `Bearer ${process.env.SANDBASE_API_KEY}`,\\n \\\"Content-Type\\\": \\\"application/json\\\",\\n};\\n\\nconst payload = {\\n \\\"model\\\": \\\"alibaba/wan-vace\\\",\\n \\\"prompt\\\": \\\"The video shows a man riding a horse on a vast grassland. He has long lavender hair and wears a traditional dress of a white top and black pants. The animation style makes him look like he is doing some kind of outdoor activity or performing. The background is a spectacular mountain range and cloud sky, giving a sense of tranquility and vastness. The entire video is shot from a fixed angle, focusing on the rider and his horse.\\\",\\n \\\"aspect_ratio\\\": \\\"21:9\\\",\\n \\\"video\\\": \\\"https://static.sandbase.ai/examples/alibaba/wan-vace/input_video_0.mp4\\\"\\n};\\n\\nconst submit = await fetch(apiUrl + \\\"/v1/run\\\", {\\n method: \\\"POST\\\",\\n headers,\\n body: JSON.stringify(payload),\\n});\\nif (!submit.ok) throw new Error(await submit.text());\\nlet result = await submit.json();\\n\\nwhile ([\\\"pending\\\", \\\"running\\\"].includes(result.status)) {\\n await new Promise((resolve) => setTimeout(resolve, 2000));\\n const poll = await fetch(apiUrl + \\\"/v1/run/\\\" + result.id, { headers });\\n if (!poll.ok) throw new Error(await poll.text());\\n result = await poll.json();\\n}\\n\\nconsole.log(result);\"}],\"response\":{\"status\":\"202 Accepted\",\"code\":\"{\\n \\\"id\\\": \\\"f3d2e8a1-7c4b-4a12-9d2e-123456789abc\\\",\\n \\\"model\\\": \\\"alibaba/wan-vace\\\",\\n \\\"status\\\": \\\"running\\\"\\n}\"}}"
seo:
modelName: "Vace"
modelId: "alibaba/wan-vace"
vendor: "Alibaba"
vendorSlug: "alibaba"
modelSlug: "wan-vace"
protocol: "Image Generation Reference"
endpoint: "/v1/run"
publishedAt: "2025-04-11T20:48:26.011Z"
capabilities: ["video-to-video"]
category: "Image Generation"
title: "Vace reference moved"
description: "The alibaba/wan-vace reference now lives under Video Generation."
canonical: /docs/model-api-reference/video-generation/alibaba/wan-vace
robots: noindex,follow
---

<ApiReferencePage />
# This page has moved

`alibaba/wan-vace` is a video model. Its API reference now lives at [Vace](/model-api-reference/video-generation/alibaba/wan-vace) under Video Generation.
Loading
Loading