Task: Generate Video
Overview
- API: Generate Video (
POST /pika/generate) - Description: Generate a short video from a prompt and optional reference media (images/videos), with optional sound effect references and configurable video parameters.
- Model: Pika video model
Authentication
- Use Bearer Token in the request header:
Authorization: Bearer <token>.
Request Parameters
Request Content-Type:
application/jsonRequest body fields:
pikaffect(string, optional)- Reference effect sound. Example values include:
Ta-da,Deflate,Crumble,Dissolve,Squish,Inflate,Melt,Crush,Cake-ify,Explode.
- Reference effect sound. Example values include:
promptText(string, required)- Prompt text describing the video content to generate.
model(string, optional)- Model version, such as
1.5.
- Model version, such as
options(object, required)- Video settings containing:
aspectRatio(number)- Width-to-height ratio (width / height), e.g. 16:9 1.7777777777777777. Remove this parameter to generate an image instead.
frameRate(integer, default 24)- Video frame rate.
camera(object)- Camera settings (optional; internal fields depend on implementation).
parameters(object, required)- Detailed parameters:
guidanceScale(integer),motion(integer),negativePrompt(string, negative prompt used to exclude undesired content).
- Detailed parameters:
extend(boolean, required)- Whether extend mode is enabled (
falseortrue).
- Whether extend mode is enabled (
- Video settings containing:
image(string, optional)- Reference image (Base64 or image URL). If present, it must contain a value.
video(string, optional)- Reference video or extension video. If present, it must contain a value.
Request Example
bash
curl -X POST "https://api.gpt.ge/pika/generate" \
-H "Authorization: Bearer $YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"pikaffect": "Dissolve",
"promptText": "Apple evaporates",
"model": "1.5",
"options": {
"aspectRatio": 1.7777777777777777,
"frameRate": 24,
"camera": {},
"parameters": {
"guidanceScale": 12,
"motion": 1,
"negativePrompt": ""
},
"extend": false
}
}'Request body example (JSON):
json
{
"pikaffect": "Dissolve",
"promptText": "Apple evaporates",
"model": "1.5",
"options": {
"aspectRatio": 1.7777777777777777,
"frameRate": 24,
"camera": {},
"parameters": {
"guidanceScale": 12,
"motion": 1,
"negativePrompt": ""
},
"extend": false
}
}Success Response Example
json
{
"id": "c8091b7b-06df-48ed-8fe3-8ee8f1e367c2"
}Response Fields
id(string): Task ID, used to query task status and generation results (such as video URLs).
Notes
options.parameters.negativePromptis used to exclude undesired content.- If
imageorvideois provided, ensure it is a reachable URL or valid Base64 content. - Specific parameters may vary based on backend implementation. Use actual responses and error messages as the source of truth.