The Pika AI Video Web Bot

This is the starting point for creating your video generations.

Postman Collection Available

View the collection of API calls through Postman. You can use this to preview requests in any programming language.

https://www.postman.com/avionics-engineer-1130803/workspace/api-glue/overview

POST https://api.pikapikapika.io/web/:route

RouteDescription
/:generateGenerate a video from text and optional attachments. Also used to edit or reprompt a video.
/:lipSyncAdd lip snyc to an existing video.
/:adjustEdit an existing video with inpainting or outpainting
/:extendExtend an existing video by adding 4s of runtime
/:upscaleUpscale an existing video

Options

Options are a required parameter for every request. They are used to configure the video generation. The options are shown below.

ParameterTypeRequiredDescription
parametersParametersYesThe parameters for a video. Paramters are shown below.
frameRatenumberYesThe frame rate for the video: Value must be between 1 and 24
aspectRatiotextNoThe aspect ration of the video, must be one of: "16:9", "9:16", "1:1", "5:2", "4:5", "4:3"
cameraCameraNoThe camera settings for the video. Camera settings are shown below.

Parameters

Parameters is a required parameter for Options

ParameterTypeRequiredDescription
motionnumberYesThe strength of motion value for the video. Must be between 1 and 4.
guidanceScalenumberYesConsistency with the text value for the video. Must be between 5 and 25
negativePrompttextNoThe negative prompt value for the video
seednumberNoA seed value for the video

Camera

Camera is an optional parameter for Options

ParameterTypeRequiredDescription
zoomtextNoThe zoom setting for the video, value must be either "in" or "out"
pantextNoThe pan setting for the video, value must be either "left" or "right"
tilttextNoThe tilt setting for the video, value must be either "up" or "down"
rotatetextNoThe rotate setting for the video, value must be either "cw" (Clockwise) or "ccw" (Counter Clockwise)

Area

Area is a required parameter for the Adjust endpoints. The area is a rectangle that is drawn over the existing video. All values are expressed as a percentage of the video's dimensions.

The values for x and width should add up to at most 100 or an error will be thrown. The values for y and height should add up to at most 100 or an error will be thrown.

ParameterTypeRequiredDescription
xnumberYesA relative position on the x axis for the drawn rectangle. Value must between 0 and 100. A value of 0 denotes the start of the video and 100 denotes the end of the video
ynumberYesA relative position on the y axis for the drawn rectangle. Value must between 0 and 100. A value of 0 denotes the top of the video and 100 denotes the bottom of the video
widthnumberYesThe relative width of the drawn rectangle. Value must between 0 and 100. A value of 100 denotes the full width of the video.
heightnumberYesThe relative height of the drawn rectangle. Value must between 0 and 100. A value of 100 denotes the full height of the video.

Get Job

Grab the results for a job after using any of the other endpoints

GET https://api.pikapikapika.io/web/jobs/:jobId

URL Params

ParameterDescription
/:jobIdThe pikaJobId from a sucessful request

Response

Example: https://api.pikapikapika.io/web/jobs/e89c86c1-2969-1234-a186-53c4c6171ab5

200 OK

{
    "job": {
        "requestType": "generate",
        "upscaled": false,
        "adjusted": false,
        "pikaJobId": "e89c86c1-2969-1234-a186-53c4c6171ab5",
        "id": "e89c86c1-2969-1234-a186-53c4c6171ab5",
        "accountId": "zJHhI5G1234gL1vcG2Mf",
        "params": {
            "options": {
                "extend": false,
                "frameRate": 24,
                "aspectRatio": "16:9",
                "camera": {
                    "rotate": null,
                    "zoom": null,
                    "tilt": null,
                    "pan": null
                },
                "parameters": {
                    "motion": 1,
                    "seed": null,
                    "guidanceScale": 12,
                    "negativePrompt": ""
                }
            },
            "promptText": "robed villain lurking the streets",
            "userId": "92b68ee2-a71d-4500-8fe1-4eea210d0cac"
        },
        "promptText": "robed villain lurking the streets",
        "extended": 0,
        "createdAt": {
            "_seconds": 1704766446,
            "_nanoseconds": 451000000
        }
    },
    "videos": [
        {
            "jobId": "e89c86c1-2969-1234-a186-53c4c6171ab5",
            "pikaVideoId": "e89c86c1-2969-1234-a186-53c4c6171ab5",
            "accountId": "zJHhI5G1234gL1vcG2Mf",
            "id": "e89c86c1-2969-1234-a186-53c4c6171ab5",
            "duration": 3,
            "feedback": 0,
            "seed": null,
            "progress": 100,
            "resultUrl": "https://example.video/1234-a186-53c4c6171ab5/robed_villain_lurking_the_streets.mp4",
            "imageThumb": "https://example.image/1234-a186-53c4c6171ab5/thumbnail.jpg",
            "videoPoster": "https://example.image/1234-a186-53c4c6171ab5/poster.jpg",
            "status": "finished"
        }
    ]
}

Generate

Generate a video from text and optional attachments

POST https://api.pikapikapika.io/web/generate

Request Body

ParameterTypeRequiredDescription
promptTexttextNoThe text to create a video from
modeltextNoOne of '1.0', '1.5'. Default 1.0.
pikaeffecttextNoModel 1.5 only. One of 'Levitate', 'Decapitate', 'Eye-pop', 'Inflate', 'Melt', 'Explode', 'Squish', 'Crush', 'Cake-ify', 'Ta-da', 'Deflate', 'Crumble', 'Dissolve'
optionsOptionsYesThe options for the video
videotextNoA video url to generate the video from, must be a valid .mp4 file
imagetextNoA image url to generate the video from, must be a valid .png, .jpeg, .webp or .gif file
sfxbooleanNoModel 1.0 only. Enable sound effects if set to 'true'
styletextNoModel 1.0 only.One of 'Anime', 'Moody', '3D', 'Watercolor', 'Natural', 'Claymation', 'Black & white'
reftextNoA reference you can attach to the completion
webhookOverridetextNoThe webhook URL to override the default webhook

Response Body

ParameterTypeDescription
statustextPossible statuses are "queued", "finished", "delayed"

200 OK

{
    "job": {
        "id": "1233696d-67c8-4293-bf95-524e13aa6578",
        "status": "queued",
        "adjusted": false,
        "accountId": "tlXRhfbjgyr6BbNBUYCo",
        "extended": 0,
        "pikaJobId": "1233696d-67c8-4293-bf95-524e13aa6578",
        "params": {
            "options": {
                "aspectRatio": "16:9",
                "frameRate": 24,
                "camera": {
                    "zoom": null,
                    "pan": null,
                    "tilt": null,
                    "rotate": null
                },
                "parameters": {
                    "motion": 1,
                    "guidanceScale": 12,
                    "negativePrompt": "",
                    "seed": null
                },
                "extend": false
            },
            "userId": "1233696d-67c8-4293-bf95-524e13aa6578",
            "promptText": "Dog",
            "sfx": false,
            "styleId": null,
            "model": "1.0"
        },
        "promptText": "Dog",
        "requestType": "generate",
        "upscaled": false,
        "createdAt": "2024-11-02T20:45:23.125Z",
        "webhookUrl": ""
    },
    "video": {
        "accountId": "tlXRhfbjgyr6BbNBUYCo",
        "id": "1233696d-67c8-4293-bf95-524e13aa6578",
        "jobId": "1233696d-67c8-4293-bf95-524e13aa6578",
        "status": "queued",
        "pikaVideoId": "1233696d-67c8-4293-bf95-524e13aa6578",
        "webhookUrl": ""
    }
}

You can retrieve progress updates and the completion using the Get Job endpoint! You will also receive a webhook update automatically on completion if configured.


Reprompt

Reprompt a video with a new prompt, reusing an existing video and it's video options

POST https://api.pikapikapika.io/web/generate

Request Body

ParameterTypeRequiredDescription
promptTexttextNoThe new prompt to regenerate the video
optionsOptionsYesThe options for the video. You can grab your previous options using the Get Job endpoint. Can be found in job.params.options
videotextYesThe url of the video you want to reprompt. You can grab it using the Get Job endpoint. Can be found in videos[0].resultUrl
reftextNoA reference you can attach to the completion
webhookOverridetextNoThe webhook URL to override the default webhook

Response

200 OK

{
    "job": {
        "id": "0ddd943f-c724-445b-b389-fe2661e0070a",
        "adjusted": false,
        "accountId": "z123I5GukOugL1vcG2Mf",
        "extended": 0,
        "pikaJobId": "0ddd943f-c724-445b-b389-fe2661e0070a",
        "params": {
            "options": {
                "aspectRatio": "16:9",
                "frameRate": 24,
                "camera": {
                    "rotate": null,
                    "zoom": null,
                    "tilt": null,
                    "pan": null
                },
                "parameters": {
                    "motion": 1,
                    "guidanceScale": 12,
                    "negativePrompt": "",
                    "seed": 144124
                },
                "extend": false
            },
            "userId": "92b68ee2-a71d-4500-1234-4eea210d0cac",
            "promptText": "robed villain striding across reflective floor. temple enfilade. scene made of rectilinear shimmering pattern of scales. sinister awakening face made of flickering neon accents. luminous sequential eye stacks. contained in flaring morse lightwire sequences. repetition of form",
            "video": "https://example.video/cc81fd6034c6c69a324b0162e9364427083975e46e6298b3a1b.mp4"
        },
        "promptText": "robed villain striding across reflective floor. temple enfilade. scene made of rectilinear shimmering pattern of scales. sinister awakening face made of flickering neon accents. luminous sequential eye stacks. contained in flaring morse lightwire sequences. repetition of form",
        "requestType": "generate",
        "upscaled": false,
        "createdAt": {}
    },
    "video": {
        "accountId": "z123I5GukOugL1vcG2Mf",
        "id": "0ddd943f-c724-445b-b389-fe2661e0070a",
        "jobId": "0ddd943f-c724-445b-b389-fe2661e0070a",
        "status": "queued",
        "pikaVideoId": "0ddd943f-c724-445b-b389-fe2661e0070a"
    }
}

You can retrieve progress updates and the completion using the Get Job endpoint! You will also receive a webhook update automatically on completion if configured.


Lip Sync

Add lip snyc to an existing video.

POST https://api.pikapikapika.io/web/lipSync

Request Body

ParameterTypeRequiredDescription
videotextYesA video url to generate the video from, must be a valid .mp4 file
speechStartnumberYesThe start time for the audio file. (speechEnd - speechStart must be less or equal to video length)
speechEndnumberYesThe end time for the audio file. (speechEnd - speechStart must be less or equal to video length)
speechtextYesA audio url to generate the lip sync, must be a valid .wav file
reftextNoA reference you can attach to the completion
webhookOverridetextNoThe webhook URL to override the default webhook

Response

200 OK

{
    "job": {
        "accountId": "wefeidQbFIDwef",
        "requestType": "generate",
        "upscaled": false,
        "adjusted": false,
        "pikaJobId": "12234ee0-7aac-4d42-ab97-1216d7f782ea",
        "id": "12234ee0-7aac-4d42-ab97-1216d7f782ea",
        "params": {
            "sfx": false,
            "speech": "https:example.com/audio_0.wav",
            "options": null,
            "speechEnd": 5,
            "video": "https://result.example.com/file.mp4",
            "promptText": "",
            "userId": "123c855a-1841-1234-8d01-316ad9588ad9",
            "speechStart": 2
        },
        "promptText": "",
        "extended": 0,
        "webhookUrl": "",
        "createdAt": "2024-03-22T04:03:41.000Z"
    },
    "videos": [
        {
            "accountId": "wefeidQbFIDwef",
            "jobId": "12234ee0-7aac-4d42-ab97-1216d7f782ea",
            "pikaVideoId": "12234ee0-7aac-4d42-ab97-1216d7f782ea",
            "id": "12234ee0-7aac-4d42-ab97-1216d7f782ea",
            "webhookUrl": "",
            "status": "queued"
        }
    ]
}

You can retrieve progress updates and the completion using the Get Job endpoint! You will also receive a webhook update automatically on completion if configured.


Edit

Edit an existing video with new options and reusing the same prompt

POST https://api.pikapikapika.io/web/generate

Request Body

ParameterTypeRequiredDescription
promptTexttextNoThe promptText for the video you want to edit. You can grab it using the Get Job endpoint. Can be found in job.params.promptText
optionsOptionsYesThe new options for the video.
videotextYesThe url of the video you want to edit. You can grab it using the Get Job endpoint. Can be found in videos[0].resultUrl
styletextNoOne of 'Anime', 'Moody', '3D', 'Watercolor', 'Natural', 'Claymation', 'Black & white'
reftextNoA reference you can attach to the completion
webhookOverridetextNoThe webhook URL to override the default webhook

Response

200 OK

{
    "job": {
        "id": "0ddd943f-c724-445b-b389-fe2661e0070a",
        "adjusted": false,
        "accountId": "z123I5GukOugL1vcG2Mf",
        "extended": 0,
        "pikaJobId": "0ddd943f-c724-445b-b389-fe2661e0070a",
        "params": {
            "options": {
                "aspectRatio": "16:9",
                "frameRate": 24,
                "camera": {
                    "rotate": null,
                    "zoom": null,
                    "tilt": null,
                    "pan": null
                },
                "parameters": {
                    "motion": 1,
                    "guidanceScale": 12,
                    "negativePrompt": "",
                    "seed": 144124
                },
                "extend": false
            },
            "userId": "92b68ee2-a71d-4500-1234-4eea210d0cac",
            "promptText": "robed villain striding in a dungeon",
            "video": "https://example.video/cc81fd6034c6c69a324b0162e9364427083975e46e6298b3a1b.mp4"
        },
        "promptText": "robed villain striding in a dungeon",
        "requestType": "generate",
        "upscaled": false,
        "createdAt": {}
    },
    "video": {
        "accountId": "z123I5GukOugL1vcG2Mf",
        "id": "0ddd943f-c724-445b-b389-fe2661e0070a",
        "jobId": "0ddd943f-c724-445b-b389-fe2661e0070a",
        "status": "queued",
        "pikaVideoId": "0ddd943f-c724-445b-b389-fe2661e0070a"
    }
}

You can retrieve progress updates and the completion using the Get Job endpoint! You will also receive a webhook update automatically on completion if configured.


Adjust (Modify Region / Inapinting)

Modify a region of an existing video with inpainting

POST https://api.pikapikapika.io/web/adjust

Request Body

ParameterTypeRequiredDescription
promptTexttextNoThe prompt from the pervious video. You can grab it using the Get Job endpoint. Can be found in job.params.promptText
optionsOptionsYesThe options from the pervious video. You can grab it using the Get Job endpoint. Can be found in job.params.options
videotextYesThe url of the video you want to edit. You can grab it using the Get Job endpoint. Can be found in videos[0].resultUrl
modetextYesMust be inpainting
areaAreaYesThe area of the video you want to adjust.
styletextNoOne of 'Anime', 'Moody', '3D', 'Watercolor', 'Natural', 'Claymation', 'Black & white'
reftextNoA reference you can attach to the completion
webhookOverridetextNoThe webhook URL to override the default webhook

Response

200 OK

{
    "job": {
        "id": "a602bb11-9c52-459d-bdd6-6666c5e03ca6",
        "adjusted": true,
        "accountId": "z123I5GukOugL1vcG2Mf",
        "extended": 0,
        "pikaJobId": "a602bb11-9c52-459d-bdd6-6666c5e03ca6",
        "params": {
            "mode": "inpainting",
            "options": {
                "aspectRatio": "16:9",
                "frameRate": 24,
                "camera": {
                    "rotate": null,
                    "zoom": null,
                    "tilt": null,
                    "pan": null
                },
                "parameters": {
                    "motion": 1,
                    "guidanceScale": 12,
                    "negativePrompt": "",
                    "seed": 144124
                }
            },
            "userId": "92b68ee2-a71d-4500-1234-4eea210d0cac",
            "promptText": "people on the moon",
            "area": {
                "x": 80,
                "y": 80,
                "width": 20,
                "height": 20
            },
            "mask": null,
            "video": "https://example.video/cc81fd6034c6c69a324b0162e9364427083975e46e6298b3a1b.mp4"
        },
        "promptText": "people on the moon",
        "requestType": "generate",
        "upscaled": false,
        "createdAt": {}
    },
    "video": {
        "accountId": "z123I5GukOugL1vcG2Mf",
        "id": "a602bb11-9c52-459d-bdd6-6666c5e03ca6",
        "jobId": "a602bb11-9c52-459d-bdd6-6666c5e03ca6",
        "status": "queued",
        "pikaVideoId": "a602bb11-9c52-459d-bdd6-6666c5e03ca6"
    }
}

You can retrieve progress updates and the completion using the Get Job endpoint! You will also receive a webhook update automatically on completion if configured.


Adjust (Extend Canvas / Outpainting)

Extend the canvas for an existing video using outpainting

POST https://api.pikapikapika.io/web/adjust

Request Body

ParameterTypeRequiredDescription
promptTexttextYesThe prompt from the pervious video. You can grab it using the Get Job endpoint. Can be found in job.params.promptText
optionsOptionsYesThe options from the pervious video. You can grab it using the Get Job endpoint. Can be found in job.params.options
options.aspectRatiotextYesWhen outpainting, the aspectRatio field is required in options and can be same or different from the original video
videotextYesThe url of the video you want to edit. You can grab it using the Get Job endpoint. Can be found in videos[0].resultUrl
modetextYesMust be "outpainting"
areaAreaYesThe area of the video you want to adjust.
reftextNoA reference you can attach to the completion
webhookOverridetextNoThe webhook URL to override the default webhook

Response

200 OK

{
    "job": {
        "id": "50959a23-1234-40db-9bfc-14648c1e424a",
        "adjusted": true,
        "accountId": "z123I5GukOugL1vcG2Mf",
        "extended": 0,
        "pikaJobId": "50959a23-1234-40db-9bfc-14648c1e424a",
        "params": {
            "mode": "outpainting",
            "options": {
                "aspectRatio": "1:1",
                "frameRate": 24,
                "camera": {
                    "rotate": null,
                    "zoom": null,
                    "tilt": null,
                    "pan": null
                },
                "parameters": {
                    "motion": 1,
                    "guidanceScale": 12,
                    "negativePrompt": "",
                    "seed": 144124
                }
            },
            "userId": "92b68ee2-a71d-4500-1234-4eea210d0cac",
            "promptText": "people flying on a helicopter",
            "area": {
                "x": 0,
                "y": 0,
                "width": 100,
                "height": 100
            },
            "mask": null,
            "video": "https://example.video/cc81fd6034c6c69a324b0162e9364427083975e46e6298b3a1b.mp4"
        },
        "promptText": "people flying on a helicopter",
        "requestType": "generate",
        "upscaled": false,
        "createdAt": {}
    },
    "video": {
        "accountId": "z123I5GukOugL1vcG2Mf",
        "id": "50959a23-1234-40db-9bfc-14648c1e424a",
        "jobId": "50959a23-1234-40db-9bfc-14648c1e424a",
        "status": "queued",
        "pikaVideoId": "50959a23-1234-40db-9bfc-14648c1e424a"
    }
}

You can retrieve progress updates and the completion using the Get Job endpoint! You will also receive a webhook update automatically on completion if configured.


Extend

Extend a video with an existing video url, adds 4 seconds of runtime to the video. You need a "Standard" Pika subscription to use this endpoint.

POST https://api.pikapikapika.io/web/extend

Request Body

ParameterTypeRequiredDescription
promptTexttextNoThe prompt from the pervious video. You can grab it using the Get Job endpoint. Can be found in job.params.promptText
optionsOptionsYesThe options from the pervious video. You can grab it using the Get Job endpoint. Can be found in job.params.options
videotextYesThe url of the video you want to edit. You can grab it using the Get Job endpoint. Can be found in videos[0].resultUrl
reftextNoA reference you can attach to the completion
webhookOverridetextNoThe webhook URL to override the default webhook

Response

200 OK

{
    "job": {
        "id": "0ddd943f-c724-445b-b389-fe2661e0070a",
        "adjusted": false,
        "accountId": "z123I5GukOugL1vcG2Mf",
        "extended": 1,
        "pikaJobId": "0ddd943f-c724-445b-b389-fe2661e0070a",
        "params": {
            "options": {
                "aspectRatio": "16:9",
                "frameRate": 24,
                "camera": {
                    "rotate": null,
                    "zoom": null,
                    "tilt": null,
                    "pan": null
                },
                "parameters": {
                    "motion": 1,
                    "guidanceScale": 12,
                    "negativePrompt": "",
                    "seed": 144124
                },
                "extend": true
            },
            "userId": "92b68ee2-a71d-4500-1234-4eea210d0cac",
            "promptText": "robed villain striding across reflective floor. temple enfilade. scene made of rectilinear shimmering pattern of scales. sinister awakening face made of flickering neon accents. luminous sequential eye stacks. contained in flaring morse lightwire sequences. repetition of form",
            "video": "https://example.video/cc81fd6034c6c69a324b0162e9364427083975e46e6298b3a1b.mp4"
        },
        "promptText": "robed villain striding across reflective floor. temple enfilade. scene made of rectilinear shimmering pattern of scales. sinister awakening face made of flickering neon accents. luminous sequential eye stacks. contained in flaring morse lightwire sequences. repetition of form",
        "requestType": "extend",
        "upscaled": false,
        "createdAt": {}
    },
    "video": {
        "accountId": "z123I5GukOugL1vcG2Mf",
        "id": "0ddd943f-c724-445b-b389-fe2661e0070a",
        "jobId": "0ddd943f-c724-445b-b389-fe2661e0070a",
        "status": "queued",
        "pikaVideoId": "0ddd943f-c724-445b-b389-fe2661e0070a"
    }
}

You can retrieve progress updates and the completion using the Get Job endpoint! You will also receive a webhook update automatically on completion if configured.


Upscale

Upscale a video generated by the Pika Web Bot. You need a "Standard" Pika subscription to use this endpoint.

POST https://api.pikapikapika.io/upscale/run

Request Body

ParameterTypeRequiredDescription
videotextYesThe url of the video you want to upscale. Must be generated by the Pika Web Bot. Can be found in Can be found in videos[0].resultUrl

Response

200 OK

{
    "success": true,
    "video": "https://example.video/4c3cb912-4a7a-4c6a-234-1f3f44afc553/people_flying_on_a_helicopter_s.mp4",
    "message": "Upscale job was started, please use the video url with the POST /web/jobs/upscaled endpoint to check the status of the job."
}

You can retrieve progress updates and the completion using the Get Upscale Job endpoint! You will also receive a webhook update automatically on completion if configured.


Get Upscale Job

Get the result of an Upscale job using the original video url

POST https://api.pikapikapika.io/upscale/jobs

Request Body

ParameterTypeRequiredDescription
videotextYesThe original url of the video you wanted to upscale. Must be generated by the Pika Web Bot. Can be found in Can be found in videos[0].resultUrl

Response

200 OK

{
    "job": {
        "requestType": "upscale",
        "upscaled": true,
        "adjusted": false,
        "pikaJobId": "f4fae039-74bd-4387-1234-c9352a8decd6",
        "accountId": "zJH1234ukOugL1vcG2Mf",
        "id": "f4fae039-74bd-4387-1234-c9352a8decd6",
        "promptText": "people flying on a helicopter",
        "params": {
            "options": {
                "frameRate": 24,
                "aspectRatio": "16:9",
                "camera": {
                    "rotate": null,
                    "zoom": null,
                    "tilt": null,
                    "pan": null
                },
                "parameters": {
                    "motion": 1,
                    "seed": null,
                    "guidanceScale": 12,
                    "negativePrompt": ""
                }
            },
            "video": "https://example.url/v1/4c3cb912-4a7a-1234-a01d-1f3f44afc553/people_flying_on_a_helicopter_seed144124.mp4",
            "promptText": "people flying on a helicopter",
            "userId": "92b68ee2-a71d-4500-8fe1-4eea210d0cac"
        },
        "extended": 0,
        "createdAt": "2024-01-12T05:26:41.000Z"
    },
    "videos": [
        {
            "jobId": "f4fae039-74bd-4387-1234-c9352a8decd6",
            "pikaVideoId": "f4fae039-74bd-4387-1234-c9352a8decd6",
            "accountId": "zJH1234ukOugL1vcG2Mf",
            "id": "f4fae039-74bd-4387-1234-c9352a8decd6",
            "duration": 3,
            "feedback": 0,
            "seed": null,
            "progress": 100,
            "resultUrl": "https://example.url/v1/f4fae039-74bd-4387-1234-c9352a8decd6/people_flying_on_a_helicopter_seed144124_upscaled.mp4",
            "imageThumb": "https://example.url/v1/f4fae039-74bd-4387-1234-c9352a8decd6/thumbnail.jpg",
            "videoPoster": "https://example.url/v1/f4fae039-74bd-4387-1234-c9352a8decd6/poster.jpg",
            "status": "finished"
        }
    ]
}