The guidance scale parameter (ranging from just above 0 to 10) controls how closely the generated video adheres to your prompt:
Lower values (1-3): More creative freedom, potentially less adherence to the prompt
Medium values (3-5): Balanced adherence to prompt while allowing some creative interpretation
Higher values (5-10): Stricter adherence to the prompt, potentially less creative variation
The default value is 3.5, which provides a good balance for most use cases.
Request
Header Params
x-api-key
string
required
your api key
Body Params application/json
model
string
required
Model to use for generation
Example:
Qubico/skyreels
task_type
string
required
Type of task to perform
Example:
img2video
input
object
required
prompt
string
required
Description of the video to generate
Example:
FPS-24, video of a young woman with long, dark hair and bangs. She is wearing a light gray t-shirt and appears to be sitting at a table.
negative_prompt
string
optional
Description of elements to avoid in the generated video
Example:
chaotic, distortion, morphing
image
string
required
URL or base64 encoded image to transform into video
Example:
https://i.ibb.co/wbw9GLY/girl.webp
aspect_ratio
enum<string>
optional
Aspect ratio of the output video
Allowed values:
16:99:161:1
Default:
16:9
guidance_scale
number<float>
optional
Controls how closely the video adheres to the prompt
<= 10> 0
Default:
3.5
config
object
optional
webhook_config
object
optional
Example
{"model":"Qubico/skyreels","task_type":"img2video","input":{"prompt":"FPS-24, video of a young woman with long, dark hair and bangs. She is wearing a light gray t-shirt and appears to be sitting at a table.","negative_prompt":"chaotic, distortion, morphing","image":"https://i.ibb.co/wbw9GLY/girl.webp","aspect_ratio":"16:9","guidance_scale":3.5},"config":{"webhook_config":{"endpoint":"string","secret":"string"}}}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request POST 'https://api.piapi.ai/api/v1/task' \
--header'x-api-key;' \
--header'Content-Type: application/json' \
--data-raw'{
"model": "Qubico/skyreels",
"task_type": "img2video",
"input": {
"prompt": "FPS-24, video of a young woman with long, dark hair and bangs. She is wearing a light gray t-shirt and appears to be sitting at a table.",
"negative_prompt": "chaotic, distortion, morphing",
"image": "https://i.ibb.co/wbw9GLY/girl.webp",
"aspect_ratio": "16:9",
"guidance_scale": 3.5
},
"config": {
"webhook_config": {
"endpoint": "string",
"secret": "string"
}
}
}'