{"openapi":"3.0.2","info":{"title":"pika/pika-h3-flex-image-to-video","description":"The request body Comfy Router accepts for the model \"pika/pika-h3-flex-image-to-video\", and the response body it returns. The INPUT schema is the same schema the server validates a call against before it reaches the provider, so what is published and what is enforced cannot differ. `x-comfy-router-input-modalities` records the media kinds the model is documented to accept; the request schema is shared across sibling models and may admit media kinds this model ignores. The OUTPUT schema describes the provider's native result document exactly as Router returns it: Router does not validate, narrow or re-envelope the response, so the output schema is descriptive rather than enforced, and Comfy owns no output shape of its own.","version":"e25362bc1ec5"},"paths":{"/v2/models/pika/pika-h3-flex-image-to-video":{"post":{"operationId":"runRouterModel","summary":"Run pika/pika-h3-flex-image-to-video synchronously.","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Request body for `POST /proxy/pika/v1/media/pika/pika-h3-flex/image-to-video`. Send `image`, `last_frame_image` or both.","example":{"duration":5,"image":"https://example.invalid/pika/first-frame.png","prompt":"The camera slowly pushes in as the leaves begin to sway in the wind","resolution":"480p"},"properties":{"aspect_ratio":{"description":"Output aspect ratio. `auto` picks one from the prompt and the media inputs. Omit it to let Pika choose: `auto` when `rewrite` is on, else the first media input's ratio, else 16:9.","enum":["auto","21:9","16:9","3:2","4:3","5:4","1:1","4:5","3:4","2:3","9:16","9:21"],"type":"string"},"channel_mode":{"default":"mono","description":"Audio stems only. `mono` downmixes before separation; `stereo` keeps both channels. The video's audio does not change.","enum":["stereo","mono"],"type":"string"},"duration":{"default":5,"description":"Video length in whole seconds, 5 to 15.","maximum":15,"minimum":5,"type":"integer"},"image":{"description":"URL of the first-frame image, a static JPEG, PNG or WebP of at most 24 MiB and 40 million pixels.","maxLength":8192,"pattern":"^https?://","type":"string"},"last_frame_image":{"description":"URL of the last-frame image, with the same format and size limits as `image`.","maxLength":8192,"pattern":"^https?://","type":"string"},"output_mode":{"default":"video","description":"`video` returns the video only. `audio-stems` also returns Dialogue, Music and Effect WAV stems in `output.stems`, and adds Pika's per-second stem separation charge.","enum":["video","audio-stems"],"type":"string"},"prompt":{"description":"Text prompt describing the video and its audio.","maxLength":8000,"minLength":1,"type":"string"},"resolution":{"default":"768p","description":"Output resolution. 480p and 768p are native. 1080p, 2k and 4k generate at 768p and then upscale, keeping the audio and frame rate.","enum":["480p","768p","1080p","2k","4k"],"type":"string"},"rewrite":{"default":true,"description":"Improve the prompt before generation. Set it to false to use the prompt as written.","type":"boolean"},"seed":{"default":0,"description":"Seed for the video, 0 or more.","format":"int64","minimum":0,"type":"integer"}},"required":["prompt"],"type":"object"}}}},"responses":{"200":{"description":"OK - the model's native JSON output, returned unchanged; the schema describes the provider's terminal result document as Router returns it.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PikaMediaJob"}],"description":"Comfy Router output schema for Pika's video models: the terminal `GET /proxy/pika/v1/media/jobs/{request_id}` job document. The produced video is at `output.video.url`. Pika's `billing` record is removed.","example":{"id":"media_8f3a2c91-5b7d-4e0a-9c26-31d4f2a8e6b0","output":{"media_type":"video","video":{"content_type":"video/mp4","url":"https://example.invalid/pika/video.mp4"}},"status":"completed"}}}}}}}}},"components":{"schemas":{"PikaMediaAsset":{"description":"One generated media file.","properties":{"content_type":{"description":"MIME type of the file.","nullable":true,"type":"string"},"url":{"description":"Download URL of the generated file.","type":"string"}},"type":"object"},"PikaMediaJob":{"description":"A Pika job.","properties":{"error":{"$ref":"#/components/schemas/PikaMediaJobError"},"id":{"description":"Job id used to poll for status.","type":"string"},"model_id":{"description":"The Pika catalog entry the job ran.","nullable":true,"type":"string"},"output":{"$ref":"#/components/schemas/PikaMediaJobOutput"},"status":{"description":"Job status: queued, running, completed or failed.","type":"string"},"usage":{"additionalProperties":true,"description":"Units Pika reported for the job.","nullable":true,"type":"object"}},"type":"object"},"PikaMediaJobError":{"description":"Set on a `failed` job.","nullable":true,"properties":{"code":{"description":"Machine-readable failure code, such as invalid_input, content_moderation or provider_error.","type":"string"},"message":{"description":"Diagnostic text.","type":"string"}},"type":"object"},"PikaMediaJobOutput":{"description":"The finished job's media, set when `status` is `completed`.","nullable":true,"properties":{"audio":{"$ref":"#/components/schemas/PikaMediaAsset"},"media_type":{"description":"Which field carries the file: video or audio.","type":"string"},"video":{"$ref":"#/components/schemas/PikaMediaAsset"}},"type":"object"}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"x-comfy-router-model-id":"pika/pika-h3-flex-image-to-video","x-comfy-input-schema-authored":true,"x-comfy-output-schema-authored":true,"x-comfy-router-input-modalities":["text","image"],"x-comfy-router-output-modalities":["video","audio"]}
