Build with Kling 2.1 Pro
Make your first request
Use your Sorceress API key on your server. The playground uses your signed-in account; your application uses the same model with an API key.
curl -X POST 'https://sorceress.games/api/v1/jobs' \
-H 'Authorization: Bearer $SORCERESS_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "kling-v2-1-pro",
"input": {
"cfg_scale": 0.5,
"prompt": "<prompt>",
"image_url": "<image_url>",
"duration": "<duration>"
}
}'Inputs & settings
promptstringRequiredText prompt describing the video to generate (Max length: 5000 characters)
durationstringRequiredRequired. "5" or "10" (seconds).
Options: 5, 10
cfg_scalenumberThe CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt (Min: 0, Max: 1, Step: 0.1) (step: 0.1)
image_urlstringRequiredURL of the image to be used for the video (Accepted types: image/jpeg, image/png; Max size: 10.0MB)
tail_image_urlstringURL of the image to be used for the end of the video (Accepted types: image/jpeg, image/png; Max size: 10.0MB)
negative_promptstringTerms to avoid in the generated video (Max length: 500 characters)
Full input schema
{
"type": "object",
"required": [
"prompt",
"image_url",
"duration"
],
"properties": {
"prompt": {
"type": "string",
"title": "Prompt",
"maxLength": 5000,
"description": "Text prompt describing the video to generate (Max length: 5000 characters)"
},
"duration": {
"enum": [
"5",
"10"
],
"type": "string",
"title": "Duration",
"description": "Required. \"5\" or \"10\" (seconds)."
},
"cfg_scale": {
"type": "number",
"title": "CFG scale",
"default": 0.5,
"maximum": 1,
"minimum": 0,
"description": "The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt (Min: 0, Max: 1, Step: 0.1) (step: 0.1)"
},
"image_url": {
"type": "string",
"title": "Image URL",
"format": "uri",
"x-media": "image",
"description": "URL of the image to be used for the video (Accepted types: image/jpeg, image/png; Max size: 10.0MB)"
},
"tail_image_url": {
"type": "string",
"title": "Tail image URL",
"format": "uri",
"x-media": "image",
"description": "URL of the image to be used for the end of the video (Accepted types: image/jpeg, image/png; Max size: 10.0MB)"
},
"negative_prompt": {
"type": "string",
"title": "Negative prompt",
"maxLength": 500,
"description": "Terms to avoid in the generated video (Max length: 500 characters)"
}
}
}Results, saved runs & billing
Media requests return a job ID. Poll GET /api/v1/jobs/:id until it succeeds or fails; keep the same ID while it is processing. Long chat requests can also return a saved job to poll. Completed outputs are stored in your account, and successful work is billed using your model's current rates.
A multi-step workflow may include separately billed successful actions. If a connection drops, check your saved run before submitting it again.






