{"openapi":"3.0.2","info":{"title":"pika/pika-2.5-text-to-video","description":"The request body Comfy Router accepts for the model \"pika/pika-2.5-text-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":"5a363a027e4f"},"paths":{"/v2/models/pika/pika-2.5-text-to-video":{"post":{"operationId":"runRouterModel","summary":"Run pika/pika-2.5-text-to-video synchronously.","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Request body for Pika 2.5 text-to-video: generate a five-second video from a text prompt. Comfy Router forwards this body to Pika's `pika/pika-2.5/text-to-video` endpoint unchanged and polls the job on the caller's behalf, so the response is the finished job document. A body outside the bounds declared here is refused with `422 invalid_input` before any provider is dialled.","example":{"duration_s":5,"prompt":"A paper boat drifting down a rain-soaked city street at dusk","resolution":"720p"},"properties":{"duration_s":{"default":5,"description":"Video length in seconds. Text-to-video produces five-second clips only.","enum":[5],"type":"integer"},"negative_prompt":{"description":"Text describing what to avoid in the video.","nullable":true,"type":"string"},"prompt":{"description":"Text prompt describing the video to generate.","minLength":1,"type":"string"},"resolution":{"default":"1080p","description":"Output resolution.","enum":["720p","1080p"],"type":"string"},"seed":{"description":"Seed for reproducible generation. Omit it (or send null) for a random seed.","nullable":true,"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":{"description":"Pika's job document, the response for every Pika model Comfy Router serves. All of them are SUBMIT-AND-POLL: Router polls Pika's job status route on the caller's behalf, so the body a caller receives is the TERMINAL document rather than the queued handle the submit answers with. A caller therefore reads `status: \"completed\"` with the result under `output` — `output.images[].url` for an image model, `output.video.url` for a video model, or `output.videos[].url` when Pika delivers the video job as a list (`media_type: videos`), which Router treats as the same success. A job Pika fails, or one that completes without its media, does NOT come back as this document: Router answers it with its own error response instead. `queued`, `running` and `failed` are states of Pika's job that Router does not return in this body. Pika's own `billing` record is removed before the document reaches the caller; the credits a call consumed are reported on the response's `X-Comfy-Credits-Used` header.","example":{"id":"6f1c2a9e-3b47-4d8a-9e21-7c5b0f4d8a13","model_id":"pika/pika-2.5/text-to-video","output":{"media_type":"video","seed":42,"video":{"content_type":"video/mp4","height":720,"url":"https://example.invalid/pika/pika-2.5-text-to-video/generated.mp4","width":1280}},"status":"completed"},"properties":{"error":{"$ref":"#/components/schemas/PikaRouterJobError"},"id":{"description":"Pika's job id.","type":"string"},"model_id":{"description":"The Pika catalog entry the job ran.","nullable":true,"type":"string"},"output":{"$ref":"#/components/schemas/PikaRouterJobOutput"},"runtime_s":{"description":"Seconds the generation took, from dispatch to terminal. Best-effort; may be null.","nullable":true,"type":"number"},"status":{"description":"Lifecycle state. A body Router returns always reads `completed`; a `failed` job is answered with Router's error response instead.","enum":["queued","running","completed","failed"],"type":"string"},"usage":{"additionalProperties":true,"description":"Provider-reported units for the job. Keys are sparse; only the units the job reports are present.","nullable":true,"type":"object"}},"required":["id","status"],"type":"object"}}}}}}}},"components":{"schemas":{"PikaRouterJobError":{"description":"Pika's structured failure record, set on a `failed` job. Router answers a failed job with its own error response, so a body Router returns does not carry it; it is declared because it is part of Pika's job document.","nullable":true,"properties":{"code":{"enum":["invalid_input","content_moderation","provider_error","provider_timeout","provider_unavailable","rate_limited","insufficient_balance","membership_required","cycle_limit_exceeded","admission_suspended","usage_limit_exceeded","timed_out","internal"],"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"PikaRouterJobOutput":{"description":"The finished job's media, set when `status` is `completed`. `media_type` says which field carries it: `image` fills `images`, `video` fills `video`, and `videos` fills `videos`.","nullable":true,"properties":{"images":{"description":"Generated images, for an image model.","items":{"$ref":"#/components/schemas/PikaRouterMediaAsset"},"type":"array"},"media_type":{"enum":["image","video","videos"],"type":"string"},"seed":{"description":"The seed the video job actually used, when reported.","nullable":true,"type":"integer"},"video":{"$ref":"#/components/schemas/PikaRouterMediaAsset"},"videos":{"description":"Generated videos, for a multi-video delivery.","items":{"$ref":"#/components/schemas/PikaRouterMediaAsset"},"type":"array"}},"type":"object"},"PikaRouterMediaAsset":{"description":"One generated media file.","properties":{"content_type":{"description":"MIME type of the file.","nullable":true,"type":"string"},"height":{"description":"Height in pixels.","nullable":true,"type":"integer"},"url":{"description":"Download URL of the generated file.","type":"string"},"width":{"description":"Width in pixels.","nullable":true,"type":"integer"}},"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-2.5-text-to-video","x-comfy-input-schema-authored":true,"x-comfy-output-schema-authored":true,"x-comfy-router-input-modalities":["text"],"x-comfy-router-output-modalities":["video"]}
