diff --git a/SKILL.md b/SKILL.md index 8720fd8..905732a 100644 --- a/SKILL.md +++ b/SKILL.md @@ -61,6 +61,7 @@ Each page is short and stands alone. Open one when its row applies. | 小红书选题与趋势 (keyword expansion → note search → comments → summary) | | | Competitor accounts on 抖音 / TikTok / 小红书 | | | N 选 1 decisions with JEV | | +| Edit or extend a video with Seedance 2.5 (`task_type`) | | Direct APIs for developers (`/v1/responses`, `/v1/systemone`, OpenAPI): . Source: . diff --git a/references/errors.md b/references/errors.md index f0a89e5..34035b0 100644 --- a/references/errors.md +++ b/references/errors.md @@ -13,7 +13,8 @@ user; when `true`, the same call may succeed later. A failed task carries the sa | 401 `missing_api_key` | The request had no key: add the `Authorization` header. | | 401 `invalid_api_key` | The key was rejected: ask the user to check it in their secure settings. Do not retry. | | 402 / `insufficient_credits` | Balance too low: send the user to . | -| 400 `bad_request` | Inspect again and fix the named field. Not retryable. | +| 400 `bad_request` | Fix the named field. If the message lists the values the model takes (e.g. `available: 16:9, 9:16`), use one of them. Not retryable: never resend unchanged. | +| 400 naming an input file (e.g. `reference_videos[1] runs at 15 frames per second; this model takes 24 to 60.`) | The file is outside the model's limits. Send a file within the stated limit. Not retryable. | | 404 `not_found` | Use `suggestions`, or `GET /v1/models` for text models. Not retryable; do not loop. | | 429 | Wait `error.retry_after_seconds` (or `Retry-After`; MCP sees only the body). Free keys are rate limited before first top-up; batch calls. | | 5xx on a sync call (`retryable:true`) | It failed and was not charged. Retry once, then tell the user or try another capability. | diff --git a/references/recipes/seedance-video-edit-and-drafts.md b/references/recipes/seedance-video-edit-and-drafts.md new file mode 100644 index 0000000..f61a8fe --- /dev/null +++ b/references/recipes/seedance-video-edit-and-drafts.md @@ -0,0 +1,43 @@ +# Recipe: edit or extend a video with Seedance 2.5 + +Seedance 2.5 makes a new video from references, edits one of them, or extends one. Inspect `model:seedance-2.5` before a paid run: its input schema and price are live. Full reference: . + +Poll any task with the status call from the Run page (): + +```json +{"reference":"model:seedance-2.5","operation":"status","task_id":""} +``` + +Repeat it every 8 seconds until `succeeded` or `failed`. The video is `data.output.media[0].url`. + +## Edit or extend a reference video + +Set `task_type` to say what `reference_videos` are for: + +- `reference`: makes a new video from them. +- `edit`: edits one of them and keeps its length and aspect ratio. Leave `duration` and `aspect_ratio` out. The source must be 4 to 30 s. +- `extend`: continues one. `duration` is the total length of the finished video, source included: a 5 s source extended by 5 s takes `duration: 10`. + +Without `task_type` the model decides from the prompt, and a prompt it reads as an edit fails if `duration` or `aspect_ratio` was set. Name the type. + +Refer to inputs by position: `@image1`, `@video1`, `@audio1`. For a new video from references, avoid "replace", "remove" or "extend" in the prompt, or set `task_type` to `reference`. For an edit, say exactly what changes and what stays. + +Edit: + +```json +{"reference":"model:seedance-2.5","input":{"model":"seedance-2.5","task_type":"edit","prompt":"Make the jacket in @video1 red. Keep the person, the background and the camera move unchanged.","reference_videos":["https://example.com/clip.mp4"]}} +``` + +Extend a 5 s source to 10 s: + +```json +{"reference":"model:seedance-2.5","input":{"model":"seedance-2.5","task_type":"extend","prompt":"@video1 continues: the car turns onto the coast road at sunset.","reference_videos":["https://example.com/clip-5s.mp4"],"duration":10}} +``` + +## Output format + +`output_format` is `mp4` (default) or `mov`, at the same price. Draft mode (`draft`) is not offered yet. + +## Inputs are checked first + +Before a task is created: images 300 to 6000 px per side, aspect 0.4 to 2.5, at most 30 MB; reference videos 2 to 30 s each, at most 30 s in total, 24 to 60 fps, at most 200 MB; audio 2 to 30 s each, at most 30 s in total, at most 15 MB. A file outside these limits gets a 400 that names the field, the index and the limit. Fix the file; never resend it unchanged. diff --git a/references/run.md b/references/run.md index f6ee0e8..c39e281 100644 --- a/references/run.md +++ b/references/run.md @@ -19,6 +19,7 @@ Over MCP, pass the same JSON to `capabilities_run`. OpenAI's API does. Send a unique `idempotency_key` per task as a top-level field of the Run body, next to `reference` and `input` (or as an `Idempotency-Key` header), and reuse it only to retry the same task. +- Reference media (images, videos, audio) is checked before a video task is created. A file outside the model's limits, or a reference image over 50 MB, gets a 400 that names the field, the index and the limit, and no task is created. - **Sync** capabilities (social data, web search/read/map, text models, JEV) return the result. Send `"view":"preview"` for data: when the result has a list, it is in `items` (the first `max_items`, default 10, up to 50, each diff --git a/skills/beatapi-video/references/current.md b/skills/beatapi-video/references/current.md index 1f51e7c..ed9d8b7 100644 --- a/skills/beatapi-video/references/current.md +++ b/skills/beatapi-video/references/current.md @@ -56,6 +56,7 @@ Each page is short and stands alone. Open one when its row applies. | 小红书选题与趋势 (keyword expansion → note search → comments → summary) | | | Competitor accounts on 抖音 / TikTok / 小红书 | | | N 选 1 decisions with JEV | | +| Edit or extend a video with Seedance 2.5 (`task_type`) | | Direct APIs for developers (`/v1/responses`, `/v1/systemone`, OpenAPI): . Source: . diff --git a/skills/beatapi-video/references/errors.md b/skills/beatapi-video/references/errors.md index f0a89e5..34035b0 100644 --- a/skills/beatapi-video/references/errors.md +++ b/skills/beatapi-video/references/errors.md @@ -13,7 +13,8 @@ user; when `true`, the same call may succeed later. A failed task carries the sa | 401 `missing_api_key` | The request had no key: add the `Authorization` header. | | 401 `invalid_api_key` | The key was rejected: ask the user to check it in their secure settings. Do not retry. | | 402 / `insufficient_credits` | Balance too low: send the user to . | -| 400 `bad_request` | Inspect again and fix the named field. Not retryable. | +| 400 `bad_request` | Fix the named field. If the message lists the values the model takes (e.g. `available: 16:9, 9:16`), use one of them. Not retryable: never resend unchanged. | +| 400 naming an input file (e.g. `reference_videos[1] runs at 15 frames per second; this model takes 24 to 60.`) | The file is outside the model's limits. Send a file within the stated limit. Not retryable. | | 404 `not_found` | Use `suggestions`, or `GET /v1/models` for text models. Not retryable; do not loop. | | 429 | Wait `error.retry_after_seconds` (or `Retry-After`; MCP sees only the body). Free keys are rate limited before first top-up; batch calls. | | 5xx on a sync call (`retryable:true`) | It failed and was not charged. Retry once, then tell the user or try another capability. | diff --git a/skills/beatapi-video/references/recipes/seedance-video-edit-and-drafts.md b/skills/beatapi-video/references/recipes/seedance-video-edit-and-drafts.md new file mode 100644 index 0000000..f61a8fe --- /dev/null +++ b/skills/beatapi-video/references/recipes/seedance-video-edit-and-drafts.md @@ -0,0 +1,43 @@ +# Recipe: edit or extend a video with Seedance 2.5 + +Seedance 2.5 makes a new video from references, edits one of them, or extends one. Inspect `model:seedance-2.5` before a paid run: its input schema and price are live. Full reference: . + +Poll any task with the status call from the Run page (): + +```json +{"reference":"model:seedance-2.5","operation":"status","task_id":""} +``` + +Repeat it every 8 seconds until `succeeded` or `failed`. The video is `data.output.media[0].url`. + +## Edit or extend a reference video + +Set `task_type` to say what `reference_videos` are for: + +- `reference`: makes a new video from them. +- `edit`: edits one of them and keeps its length and aspect ratio. Leave `duration` and `aspect_ratio` out. The source must be 4 to 30 s. +- `extend`: continues one. `duration` is the total length of the finished video, source included: a 5 s source extended by 5 s takes `duration: 10`. + +Without `task_type` the model decides from the prompt, and a prompt it reads as an edit fails if `duration` or `aspect_ratio` was set. Name the type. + +Refer to inputs by position: `@image1`, `@video1`, `@audio1`. For a new video from references, avoid "replace", "remove" or "extend" in the prompt, or set `task_type` to `reference`. For an edit, say exactly what changes and what stays. + +Edit: + +```json +{"reference":"model:seedance-2.5","input":{"model":"seedance-2.5","task_type":"edit","prompt":"Make the jacket in @video1 red. Keep the person, the background and the camera move unchanged.","reference_videos":["https://example.com/clip.mp4"]}} +``` + +Extend a 5 s source to 10 s: + +```json +{"reference":"model:seedance-2.5","input":{"model":"seedance-2.5","task_type":"extend","prompt":"@video1 continues: the car turns onto the coast road at sunset.","reference_videos":["https://example.com/clip-5s.mp4"],"duration":10}} +``` + +## Output format + +`output_format` is `mp4` (default) or `mov`, at the same price. Draft mode (`draft`) is not offered yet. + +## Inputs are checked first + +Before a task is created: images 300 to 6000 px per side, aspect 0.4 to 2.5, at most 30 MB; reference videos 2 to 30 s each, at most 30 s in total, 24 to 60 fps, at most 200 MB; audio 2 to 30 s each, at most 30 s in total, at most 15 MB. A file outside these limits gets a 400 that names the field, the index and the limit. Fix the file; never resend it unchanged. diff --git a/skills/beatapi-video/references/run.md b/skills/beatapi-video/references/run.md index f6ee0e8..c39e281 100644 --- a/skills/beatapi-video/references/run.md +++ b/skills/beatapi-video/references/run.md @@ -19,6 +19,7 @@ Over MCP, pass the same JSON to `capabilities_run`. OpenAI's API does. Send a unique `idempotency_key` per task as a top-level field of the Run body, next to `reference` and `input` (or as an `Idempotency-Key` header), and reuse it only to retry the same task. +- Reference media (images, videos, audio) is checked before a video task is created. A file outside the model's limits, or a reference image over 50 MB, gets a 400 that names the field, the index and the limit, and no task is created. - **Sync** capabilities (social data, web search/read/map, text models, JEV) return the result. Send `"view":"preview"` for data: when the result has a list, it is in `items` (the first `max_items`, default 10, up to 50, each