{"title":"Alibaba | Wan 2.7 | Video Edit","slug":"alibaba-wan-2-7-video-edit","version":"0.0.1","output_type":"video","request_schema":{"additionalProperties":false,"properties":{"audio_setting":{"default":"auto","description":"Audio handling for the output video. auto: model decides whether to regenerate audio based on the prompt. origin: always preserve original audio.","enum":["auto","origin"],"title":"Audio Setting","type":"string"},"duration":{"default":0,"description":"Optional output duration in seconds. Use 0 or omit to keep the input video duration. Valid truncation range: 2 to 10 seconds.","maximum":10,"minimum":0,"title":"Duration","type":["integer","null"]},"negative_prompt":{"description":"Optional negative prompt describing content you do not want in the output video. Max 500 characters.","maxLength":500,"title":"Negative Prompt","type":["string","null"]},"prompt":{"description":"Text prompt describing the desired edit or style transfer. Supports Chinese and English. Max 5000 characters.","maxLength":5000,"title":"Prompt","type":"string"},"prompt_extend":{"default":true,"description":"Whether to enable LLM-based prompt rewriting.","title":"Prompt Extend","type":["boolean","null"]},"ratio":{"default":null,"description":"Optional output aspect ratio. If omitted, the output aspect ratio matches the input video.","enum":["16:9","9:16","1:1","4:3","3:4",null],"title":"Aspect Ratio","type":["string","null"]},"reference_image_1":{"description":"Optional reference image URL.","format":"uri","title":"Reference Image 1","type":["string","null"]},"reference_image_2":{"description":"Optional reference image URL.","format":"uri","title":"Reference Image 2","type":["string","null"]},"reference_image_3":{"description":"Optional reference image URL.","format":"uri","title":"Reference Image 3","type":["string","null"]},"resolution":{"default":"1080P","description":"Output video resolution. Valid values: 720P, 1080P. Default is 1080P.","enum":["720P","1080P"],"title":"Resolution","type":"string"},"seed":{"description":"Seed for reproducibility. If omitted, a random seed is used.","maximum":2147483647,"minimum":0,"title":"Seed","type":["integer","null"]},"video_url":{"description":"Public HTTP or HTTPS URL of the input video to edit. Supports MP4 and MOV. Duration: 2 to 10 seconds. Resolution per side: 240 to 4096 px. File size up to 100 MB.","format":"uri","title":"Video URL","type":"string"},"watermark":{"default":false,"description":"Whether to add an AI-generated watermark to the output video.","title":"Watermark","type":["boolean","null"]}},"required":["video_url"],"type":"object"},"openapi_schema":{"components":{"schemas":{"AlibabaWan27VideoEditInput":{"additionalProperties":false,"properties":{"audio_setting":{"default":"auto","description":"Audio handling for the output video. auto: model decides whether to regenerate audio based on the prompt. origin: always preserve original audio.","enum":["auto","origin"],"title":"Audio Setting","type":"string"},"duration":{"default":0,"description":"Optional output duration in seconds. Use 0 or omit to keep the input video duration. Valid truncation range: 2 to 10 seconds.","maximum":10,"minimum":0,"nullable":true,"title":"Duration","type":"integer"},"negative_prompt":{"description":"Optional negative prompt describing content you do not want in the output video. Max 500 characters.","maxLength":500,"nullable":true,"title":"Negative Prompt","type":"string"},"prompt":{"description":"Text prompt describing the desired edit or style transfer. Supports Chinese and English. Max 5000 characters.","maxLength":5000,"title":"Prompt","type":"string"},"prompt_extend":{"default":true,"description":"Whether to enable LLM-based prompt rewriting.","nullable":true,"title":"Prompt Extend","type":"boolean"},"ratio":{"default":null,"description":"Optional output aspect ratio. If omitted, the output aspect ratio matches the input video.","enum":["16:9","9:16","1:1","4:3","3:4",null],"nullable":true,"title":"Aspect Ratio","type":"string"},"reference_image_1":{"description":"Optional reference image URL.","format":"uri","nullable":true,"title":"Reference Image 1","type":"string"},"reference_image_2":{"description":"Optional reference image URL.","format":"uri","nullable":true,"title":"Reference Image 2","type":"string"},"reference_image_3":{"description":"Optional reference image URL.","format":"uri","nullable":true,"title":"Reference Image 3","type":"string"},"resolution":{"default":"1080P","description":"Output video resolution. Valid values: 720P, 1080P. Default is 1080P.","enum":["720P","1080P"],"title":"Resolution","type":"string"},"seed":{"description":"Seed for reproducibility. If omitted, a random seed is used.","maximum":2147483647,"minimum":0,"nullable":true,"title":"Seed","type":"integer"},"video_url":{"description":"Public HTTP or HTTPS URL of the input video to edit. Supports MP4 and MOV. Duration: 2 to 10 seconds. Resolution per side: 240 to 4096 px. File size up to 100 MB.","format":"uri","title":"Video URL","type":"string"},"watermark":{"default":false,"description":"Whether to add an AI-generated watermark to the output video.","nullable":true,"title":"Watermark","type":"boolean"}},"required":["video_url"],"type":"object","x-eachlabs-order-properties":["prompt","negative_prompt","video_url","reference_image_1","reference_image_2","reference_image_3","resolution","ratio","duration","audio_setting","prompt_extend","watermark","seed"]},"Error":{"properties":{"details":{"description":"Optional validation or request details for client errors.","nullable":true},"error":{"description":"Safe user-facing error message.","type":"string"},"status":{"description":"HTTP status code, when returned by the shared error handler.","type":"integer"}},"required":["error"],"type":"object"}},"securitySchemes":{"bearerAuth":{"description":"API key passed as `Authorization: Bearer \u003capi_key\u003e`","scheme":"bearer","type":"http"}}},"info":{"description":"Wan 2.7 Video Edit applies instruction-based edits, reference image-based edits, or style transfer to existing videos. Supports 720P/1080P, preserves or regenerates audio, and handles 2-10s input videos.","title":"Alibaba | Wan 2.7 | Video Edit","version":"1.0.0","x-eachlabs-model-slug":"alibaba-wan-2-7-video-edit","x-eachlabs-output-type":"video"},"openapi":"3.0.4","paths":{"/v1/prediction":{"post":{"description":"Creates a new prediction for Alibaba | Wan 2.7 | Video Edit.","operationId":"createPrediction","requestBody":{"content":{"application/json":{"schema":{"properties":{"input":{"$ref":"#/components/schemas/AlibabaWan27VideoEditInput"},"model":{"description":"Model slug or identifier.","enum":["alibaba-wan-2-7-video-edit"],"type":"string"},"webhook_secret":{"description":"Optional secret used to sign webhook requests.","type":"string"},"webhook_url":{"description":"Optional webhook URL to receive the prediction result asynchronously.","format":"uri","type":"string"}},"required":["model","input"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"message":{"description":"Human-readable message about the prediction creation.","type":"string"},"predictionID":{"description":"Unique prediction identifier.","type":"string"},"status":{"description":"Status of the prediction creation request.","example":"success","type":"string"}},"type":"object"}}},"description":"Prediction created successfully."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Create a prediction"}},"/v1/prediction/{id}":{"get":{"description":"Retrieves the status and results of a prediction by its ID.","operationId":"getPrediction","parameters":[{"description":"Prediction ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"fallback":{"description":"Present when the request selected a fallback config. Status stays non-terminal until the requested model or a fallback model ends the request.","properties":{"requested_model":{"description":"Model the request named.","nullable":true,"type":"string"},"resolved":{"description":"False while a model in the chain is still running.","type":"boolean"},"selector":{"description":"Fallback config the request selected.","type":"string"},"served_by":{"description":"Model whose result this prediction returns; null until resolved.","nullable":true,"type":"string"},"used":{"description":"True once a fallback model ran because the requested model failed.","type":"boolean"}},"type":"object"},"id":{"description":"Unique prediction identifier.","type":"string"},"input":{"additionalProperties":true,"description":"Input parameters used for the prediction.","type":"object"},"logs":{"description":"Execution logs from the prediction.","nullable":true,"type":"string"},"metrics":{"description":"Performance and cost metrics.","properties":{"cost":{"description":"Cost of the prediction in USD.","type":"number"},"predict_time":{"description":"Time taken for prediction in seconds.","type":"number"}},"type":"object"},"output":{"description":"Prediction output (output_type: video).","nullable":true,"oneOf":[{"type":"string"},{"items":{},"type":"array"},{"type":"object"}]},"status":{"description":"Current status of the prediction.","enum":["created","starting","processing","success","error","cancelled"],"type":"string"},"urls":{"description":"Related API endpoints.","properties":{"cancel":{"description":"URL to cancel the prediction.","format":"uri","type":"string"},"get":{"description":"URL to get the prediction.","format":"uri","type":"string"}},"type":"object"}},"type":"object"}}},"description":"Prediction retrieved successfully."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Prediction not found."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Get a prediction"}},"/v1/prediction/{id}/cancel":{"post":{"description":"Cancels a running prediction by ID. Cancellation is record-only: the execution record is set to cancelled and no upstream cancellation is attempted — in-flight provider work runs to completion and its result is discarded.","operationId":"cancelPrediction","parameters":[{"description":"Prediction ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"message":{"description":"Human-readable cancellation message.","type":"string"},"predictionID":{"description":"Unique prediction identifier.","type":"string"},"status":{"description":"Cancellation status returned when the request succeeds.","enum":["success"],"type":"string"}},"type":"object"}}},"description":"Prediction cancelled."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Prediction not found."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Cancel a prediction"}}},"security":[{"bearerAuth":[]}],"servers":[{"url":"https://api.eachlabs.ai"}]},"cost":{"currency":"USD","type":"usage_based","amount":null,"unit":"second","estimate":"$0.10–$0.15 per second, depending on resolution","description":"Pricing is an estimate and may change as rates are updated.","min":0.1,"max":0.15,"depends_on":["resolution"],"rows":[{"label":"720P","value":0.1},{"label":"1080P (default)","value":0.15}]}}
