Pika Videos Generation API
POSThttps://api.acedata.cloud/pika/videos
Pika AI video generation API. Supports models 1.5 and 2.0 for text-to-video and image-to-video generation; one video per request.
Request Headers
acceptstring
Specify the format of the response returned by the server. If not specified, the default format is `application/json`; if specified as `application/x-ndjson`, the response will be returned in a block-streaming format of JSON (NDJSON) separated by newline characters.
Please select
authorizationstring
Bearer token
Request Body
actionstringRequired parameter
Video generation action. If the value is `generate`, then generate a video based on the prompt.
effectstring
Official preset video effects, optional. If no effects are needed, it can be left blank.
promptstring
Prompts for generating videos.
negative_promptstring
Description of content or elements that should not appear in the video.
modelstringRequired parameter
Model used for generating videos.
image_urlstring
URL of reference images for image-to-video generation.
video_urlstring
Reference video URL used in video-to-video mode.
aspect_rationubmer
Generate the aspect ratio of the video.
callback_urlstring
The callback URL that will be called after the video generation is complete.
asyncboolean
Whether to process in asynchronous mode. When set to `true`, the interface immediately returns `task_id`, without the need to provide `callback_url`, and then the result can be obtained by polling the corresponding task query interface; if `callback_url` is also provided, the result will be pushed to that callback address.
Please select
Response
Pika Video Generation
Allow Use General Balance
When 'Allow General Balance' is enabled, the general balance is used automatically if an app's balance is insufficient.
Kind reminder: For streaming requests, the above code may not be fully applicable. Please refer to the integration documentation for changes.
