[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-94956":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":10,"languages":10,"totalLinesOfCode":10,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":15,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":16,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":19,"hasPages":17,"topics":20,"createdAt":10,"pushedAt":10,"updatedAt":28,"readmeContent":29,"aiSummary":30,"trendingCount":14,"starSnapshotCount":14,"syncStatus":31,"lastSyncTime":32,"discoverSource":33},94956,"seedance-2.0-api","apiframe-ai\u002Fseedance-2.0-api","apiframe-ai","Seedance 2.0 API — text-to-video and image-to-video examples","",null,236,1,150,0,86,66.5,false,"main",true,[21,22,23,24,25,26,27],"bytedance","image-to-video","seedance","seedance-2","seedance-api","text-to-video","video-generation","2026-08-24 04:01:23","# Seedance 2.0 API\n\nExamples for calling the **Seedance 2.0 API** (ByteDance text-to-video and image-to-video) through Apiframe.\n\n**Model page:** [Seedance 2.0 API](https:\u002F\u002Fapiframe.ai\u002Fmodels\u002Fseedance-2)\n\nThis repo does not host model weights. Seedance is a closed model. Inference runs on `POST \u002Fv2\u002Fvideos\u002Fgenerate` with `model: \"seedance-2\"`.\n\nRelated model ids on the same endpoint: `seedance-2.5`, `seedance-2-fast`, `seedance-2-mini`.\n\n## What is Seedance 2.0?\n\nSeedance 2.0 is ByteDance's video generation model. It supports text-to-video, image-to-video, and multimodal reference-to-video (images, video, audio), with native synchronized audio. Clips are 4–15 seconds at 480p, 720p, 1080p, or 4K.\n\n## Quick start\n\n```bash\nexport APIFRAME_API_KEY=afk_your_api_key_here\n```\n\n### Python\n\n```bash\npip install requests\n```\n\n```python\nimport os\nimport time\nimport requests\n\nAPI = \"https:\u002F\u002Fapi.apiframe.ai\u002Fv2\"\nheaders = {\n    \"X-API-Key\": os.environ[\"APIFRAME_API_KEY\"],\n    \"Content-Type\": \"application\u002Fjson\",\n}\n\njob = requests.post(\n    f\"{API}\u002Fvideos\u002Fgenerate\",\n    headers=headers,\n    json={\n        \"model\": \"seedance-2\",\n        \"prompt\": \"A cinematic slow-motion shot of a golden eagle soaring through a mountain valley at sunrise.\",\n        \"seedanceParams\": {\n            \"duration\": 8,\n            \"resolution\": \"720p\",\n            \"aspect_ratio\": \"16:9\",\n            \"generate_audio\": True,\n        },\n    },\n).json()\n\nwhile True:\n    result = requests.get(f\"{API}\u002Fjobs\u002F{job['jobId']}\", headers=headers).json()\n    if result[\"status\"] in (\"COMPLETED\", \"FAILED\"):\n        break\n    time.sleep(2)\n\nprint(result.get(\"result\"))\n```\n\n### JavaScript\n\n```bash\nnpm i @apiframe-ai\u002Fsdk@next\n```\n\n```javascript\nimport { Apiframe } from \"@apiframe-ai\u002Fsdk\";\n\nconst client = new Apiframe({ apiKey: process.env.APIFRAME_API_KEY });\n\nconst { jobId } = await client.videos.generate({\n  model: \"seedance-2\",\n  prompt:\n    \"A cinematic slow-motion shot of a golden eagle soaring through a mountain valley at sunrise.\",\n  seedanceParams: {\n    duration: 8,\n    resolution: \"720p\",\n    aspect_ratio: \"16:9\",\n    generate_audio: true,\n  },\n});\n\nconst job = await client.jobs.waitFor(jobId);\nconsole.log(job.result);\n```\n\nPass `webhookUrl` on the generate call if you do not want to poll.\n\n## Parameters\n\n| Parameter | Type | Default | Description |\n|---|---|---|---|\n| `prompt` | string | required | Text description of the video |\n| `seedanceParams.duration` | integer | `8` | Seconds, `4`–`15` |\n| `seedanceParams.resolution` | string | `\"720p\"` | `480p`, `720p`, `1080p`, `4k` |\n| `seedanceParams.aspect_ratio` | string | `\"16:9\"` | `21:9`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16`, `adaptive` |\n| `seedanceParams.start_image` | string | — | First-frame URL (image-to-video) |\n| `seedanceParams.end_image` | string | — | Last-frame URL |\n| `seedanceParams.reference_image_urls` | string[] | — | Up to 9 reference images |\n| `seedanceParams.reference_video_urls` | string[] | — | Up to 3 reference videos |\n| `seedanceParams.reference_audio_urls` | string[] | — | Up to 3 reference audio files |\n| `seedanceParams.generate_audio` | boolean | `true` | Native synchronized audio |\n| `seedanceParams.seed` | integer | — | Reproducible generations |\n| `seedanceParams.camera_fixed` | boolean | `false` | Lock the camera |\n| `seedanceParams.web_search` | boolean | `false` | Ground the prompt with web search |\n\n## Image to video\n\n```python\nrequests.post(\n    \"https:\u002F\u002Fapi.apiframe.ai\u002Fv2\u002Fvideos\u002Fgenerate\",\n    headers=headers,\n    json={\n        \"model\": \"seedance-2\",\n        \"prompt\": \"She slowly turns to face the camera, wind catching her hair.\",\n        \"seedanceParams\": {\n            \"start_image\": \"https:\u002F\u002Fexample.com\u002Fportrait.jpg\",\n            \"duration\": 8,\n            \"resolution\": \"720p\",\n        },\n    },\n)\n```\n\n## Reference to video\n\n```python\nrequests.post(\n    \"https:\u002F\u002Fapi.apiframe.ai\u002Fv2\u002Fvideos\u002Fgenerate\",\n    headers=headers,\n    json={\n        \"model\": \"seedance-2\",\n        \"prompt\": \"The person from the reference image walks down a neon-lit street at night.\",\n        \"seedanceParams\": {\n            \"reference_image_urls\": [\"https:\u002F\u002Fexample.com\u002Fcharacter.jpg\"],\n            \"duration\": 10,\n            \"resolution\": \"720p\",\n        },\n    },\n)\n```\n\nStart\u002Fend frames and reference media are mutually exclusive on Seedance 2.5. On Seedance 2.0 they can be combined; keep inputs consistent.\n\n## Output\n\n```json\n{\n  \"videoUrl\": \"https:\u002F\u002Fcdn2.apiframe.ai\u002Fvideos\u002F….mp4\"\n}\n```\n\n## Examples\n\n| Example | Python | JavaScript |\n|---|---|---|\n| Text to video | [text_to_video.py](examples\u002Ftext_to_video.py) | [text_to_video.js](examples\u002Ftext_to_video.js) |\n| Image to video | [image_to_video.py](examples\u002Fimage_to_video.py) | [image_to_video.js](examples\u002Fimage_to_video.js) |\n| Reference to video | [reference_to_video.py](examples\u002Freference_to_video.py) | [reference_to_video.js](examples\u002Freference_to_video.js) |\n\n```bash\ncp .env.example .env\n# set APIFRAME_API_KEY\npython examples\u002Ftext_to_video.py\n```\n\n## License\n\nExample code in this repository is provided as-is. Seedance outputs are subject to ByteDance's terms. Seedance is a trademark of ByteDance Ltd.\n","Seedance 2.0 API 是一个通过 Apiframe 提供的调用接口，用于访问字节跳动（ByteDance）闭源视频生成模型 Seedance 2.0 的服务。核心功能包括文本到视频（text-to-video）、图像到视频（image-to-video）及多模态参考视频生成（支持图像、视频、音频输入），并原生支持同步音频生成，输出时长4–15秒、分辨率最高达4K的视频。项目不托管模型权重，所有推理在云端完成，提供 RESTful API 和 SDK 封装。适用于内容创作、营销素材生成、AIGC 工具集成等需高质量短视频批量生成的场景。",2,"2026-08-18 02:30:14","CREATED_QUERY"]