Wan Scail Serverless API
SCAIL generates professional-quality character animations from reference images and motion videos with exceptional pose accuracy.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/scail"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "a cat playing",
12 "reference_image": "https://segmind-resources.s3.amazonaws.com/input/a27216d9-5e6a-497e-a995-392f13e171e3-scail-ref-image.jpg",
13 "input_video": "https://segmind-resources.s3.amazonaws.com/input/4c379a6a-f6af-445b-aa82-8baf4d3c67d4-scail-video.mp4",
14 "seed": 987654321,
15 "resolution": "576p",
16 "base64": false
17}
18
19response = requests.post(url, headers=headers, json=data)
20
21if response.status_code == 200:
22 result = response.json()
23 print(json.dumps(result, indent=2))
24else:
25 print(f"Error: {response.status_code}")
26 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/scail"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "a cat playing",
12 "reference_image": "https://segmind-resources.s3.amazonaws.com/input/a27216d9-5e6a-497e-a995-392f13e171e3-scail-ref-image.jpg",
13 "input_video": "https://segmind-resources.s3.amazonaws.com/input/4c379a6a-f6af-445b-aa82-8baf4d3c67d4-scail-video.mp4",
14 "seed": 987654321,
15 "resolution": "576p",
16 "base64": false
17}
18
19response = requests.post(url, headers=headers, json=data)
20
21if response.status_code == 200:
22 result = response.json()
23 print(json.dumps(result, indent=2))
24else:
25 print(f"Error: {response.status_code}")
26 print(response.text)API Endpoint
https://api.segmind.com/v1/scailParameters
input_videorequiredstring (uri)URL of video to process or enhance. Ensure it matches the scene style.
promptrequiredstringDescribe the scene or action to render. Example: 'a cat playing'.
reference_imagerequiredstring (uri)Reference image URL to guide output. Use images matching prompt theme.
base64optionalbooleanOutput as base64 for integration. Set true for web embedding.
falseresolutionoptionalstringChoose video resolution. Use 720p for high-quality outputs.
"576p""480p""576p""720p"seedoptionalintegerSet random seed for consistent results. Try 987654321 for varied images.
987654321Response Type
Returns: Video
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out