{"api_id":"pika/video-compose/compose-video","vendor":"pika","function":"compose-video","category":"video","name":"Pika Video Compose","description":"Render a timeline into one video: lay video, image, and audio keyframes out on tracks and get back the composed clip. Billed per output second.","display_pricing":{"components":[{"role":"output","unit":{"type":"output_second","quantity":1,"included":0},"starting_at":{"spec":{},"sell_usd":"0.0002","micro_usd":200},"price_tiers":[{"spec":{},"sell_usd":"0.0002","micro_usd":200}]}]},"call":{"method":"POST","path":"/v1/media/pika/video-compose/compose-video"},"input_schema":{"$defs":{"ComposeAudioKeyframe":{"additionalProperties":false,"properties":{"timestamp":{"description":"Where the keyframe starts on the timeline, in milliseconds.","minimum":0,"title":"Timestamp","type":"number"},"duration":{"description":"How long the keyframe plays, in milliseconds.","minimum":1,"title":"Duration","type":"number"},"url":{"maxLength":4096,"media_kinds":["audio"],"pattern":"^https?://","title":"Url","type":"string"}},"required":["timestamp","duration","url"],"title":"ComposeAudioKeyframe","type":"object"},"ComposeAudioTrack":{"additionalProperties":false,"properties":{"id":{"description":"Track identifier, unique across tracks.","maxLength":64,"minLength":1,"title":"Id","type":"string"},"type":{"const":"audio","title":"Type","type":"string"},"keyframes":{"items":{"$ref":"#/$defs/ComposeAudioKeyframe"},"maxItems":32,"minItems":1,"title":"Keyframes","type":"array"}},"required":["id","type","keyframes"],"title":"ComposeAudioTrack","type":"object"},"ComposeImageKeyframe":{"additionalProperties":false,"properties":{"timestamp":{"description":"Where the keyframe starts on the timeline, in milliseconds.","minimum":0,"title":"Timestamp","type":"number"},"duration":{"description":"How long the keyframe plays, in milliseconds.","minimum":1,"title":"Duration","type":"number"},"url":{"maxLength":4096,"media_kinds":["image"],"pattern":"^https?://","title":"Url","type":"string"}},"required":["timestamp","duration","url"],"title":"ComposeImageKeyframe","type":"object"},"ComposeImageTrack":{"additionalProperties":false,"properties":{"id":{"description":"Track identifier, unique across tracks.","maxLength":64,"minLength":1,"title":"Id","type":"string"},"type":{"const":"image","title":"Type","type":"string"},"keyframes":{"items":{"$ref":"#/$defs/ComposeImageKeyframe"},"maxItems":32,"minItems":1,"title":"Keyframes","type":"array"}},"required":["id","type","keyframes"],"title":"ComposeImageTrack","type":"object"},"ComposeVideoKeyframe":{"additionalProperties":false,"properties":{"timestamp":{"description":"Where the keyframe starts on the timeline, in milliseconds.","minimum":0,"title":"Timestamp","type":"number"},"duration":{"description":"How long the keyframe plays, in milliseconds.","minimum":1,"title":"Duration","type":"number"},"url":{"maxLength":4096,"media_kinds":["video"],"pattern":"^https?://","title":"Url","type":"string"}},"required":["timestamp","duration","url"],"title":"ComposeVideoKeyframe","type":"object"},"ComposeVideoTrack":{"additionalProperties":false,"properties":{"id":{"description":"Track identifier, unique across tracks.","maxLength":64,"minLength":1,"title":"Id","type":"string"},"type":{"const":"video","title":"Type","type":"string"},"keyframes":{"items":{"$ref":"#/$defs/ComposeVideoKeyframe"},"maxItems":32,"minItems":1,"title":"Keyframes","type":"array"}},"required":["id","type","keyframes"],"title":"ComposeVideoTrack","type":"object"}},"additionalProperties":false,"properties":{"tracks":{"description":"Timeline tracks, rendered into one video. At least one video or image track; up to 32 keyframes in total, non-overlapping within a track, ending by 1200000 ms.","items":{"discriminator":{"mapping":{"audio":"#/$defs/ComposeAudioTrack","image":"#/$defs/ComposeImageTrack","video":"#/$defs/ComposeVideoTrack"},"propertyName":"type"},"oneOf":[{"$ref":"#/$defs/ComposeVideoTrack"},{"$ref":"#/$defs/ComposeImageTrack"},{"$ref":"#/$defs/ComposeAudioTrack"}]},"maxItems":8,"minItems":1,"title":"Tracks","type":"array"}},"required":["tracks"],"title":"PikaVideoComposeRequest","type":"object"}}