{"api_id":"pika/video-merge/merge-videos","vendor":"pika","function":"merge-videos","category":"video","name":"Pika Video Merge","description":"Join videos into one clip: hand over two to ten in playback order and get back a single video with stereo audio, at the first clip's size and frame rate unless you choose a size, reference clip, or frame rate. Clips of a different shape get black bars. Billed per output second.","display_pricing":{"components":[{"role":"output","unit":{"type":"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-merge/merge-videos"},"input_schema":{"$defs":{"VideoDimensions":{"additionalProperties":false,"properties":{"width":{"description":"Output width in pixels (even, 512-2048).","maximum":2048,"minimum":512,"multipleOf":2,"title":"Width","type":"integer"},"height":{"description":"Output height in pixels (even, 512-2048).","maximum":2048,"minimum":512,"multipleOf":2,"title":"Height","type":"integer"}},"required":["width","height"],"title":"VideoDimensions","type":"object"}},"additionalProperties":false,"properties":{"videos":{"description":"Videos to join, 2–10, in playback order. Clips without audio play silence; the output has 48kHz stereo audio.","items":{"maxLength":4096,"media_kinds":["video"],"pattern":"^https?://","type":"string"},"maxItems":10,"minItems":2,"title":"Videos","type":"array"},"target_fps":{"anyOf":[{"maximum":60,"minimum":1,"type":"number"},{"type":"null"}],"default":null,"description":"Output frame rate, 1–60. Defaults to the reference video's frame rate.","title":"Target Fps"},"resolution":{"anyOf":[{"$ref":"#/$defs/VideoDimensions"},{"enum":["square_hd","square","portrait_4_3","portrait_16_9","landscape_4_3","landscape_16_9"],"type":"string"},{"type":"null"}],"default":null,"description":"Output size: a preset or an explicit {width, height} (even, 512–2048). Presets: square_hd 1024x1024, square 512x512, portrait_4_3 768x1024, portrait_16_9 576x1024, landscape_4_3 1024x768, landscape_16_9 1024x576. Omit it to use the size of the reference video (reference_video_index). Every clip is scaled to fit without distortion, with black bars filling any gap.","title":"Resolution"},"reference_video_index":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"The video the output matches when resolution or target_fps is omitted, as an index into videos. Defaults to 0, the first video. Other clips are fit inside its size with black bars. Can't be combined with resolution.","title":"Reference Video Index"}},"required":["videos"],"title":"PikaVideoMergeRequest","type":"object"}}