{"openapi":"3.0.2","info":{"title":"pika/pika-nano-banana-2","description":"The request body Comfy Router accepts for the model \"pika/pika-nano-banana-2\", 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":"da3fde510441"},"paths":{"/v2/models/pika/pika-nano-banana-2":{"post":{"operationId":"runRouterModel","summary":"Run pika/pika-nano-banana-2 synchronously.","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Request body for Gemini 3.1 Flash Image (Nano Banana 2) text-to-image served by Pika. Comfy Router forwards this body to Pika's `google/gemini-3.1-flash-image/text-to-image` endpoint unchanged and polls the job on the caller's behalf, so the response is the finished job document. This route is text-to-image only: it takes no input image.\nThis id has a SECOND route, which does not take this body: `vertexai/gemini-3.1-flash-image?model_provider=pika` takes the native Gemini `generateContent` body, is validated against that model's schema, and is translated onto this shape before dispatch. The two bodies are not interchangeable.","example":{"aspect_ratio":"1:1","prompt":"A watercolor fox curled up in fresh snow","resolution":"1K","thinking_level":"minimal"},"properties":{"aspect_ratio":{"default":"1:1","description":"Output aspect ratio.","enum":["1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9","21:9","auto"],"type":"string"},"num_images":{"default":1,"description":"Number of images to generate. Pika generates exactly one per request for this model.","maximum":1,"minimum":1,"type":"integer"},"output_format":{"default":"png","description":"Image file format of the output.","enum":["png","jpeg","webp"],"type":"string"},"prompt":{"description":"Text prompt describing the image to generate.","minLength":1,"type":"string"},"resolution":{"default":"1K","description":"Output resolution.","enum":["512","1K","2K","4K"],"type":"string"},"thinking_level":{"default":"minimal","description":"How much the model reasons before rendering. `high` helps complex compositions at the cost of latency.","enum":["minimal","high"],"type":"string"}},"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":"7e2d5a08-1f93-4c6b-9a47-0d8c3e6f2b71","model_id":"google/gemini-3.1-flash-image/text-to-image","output":{"images":[{"content_type":"image/png","height":1024,"url":"https://example.invalid/pika/pika-nano-banana-2/generated.png","width":1024}],"media_type":"image"},"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-nano-banana-2","x-comfy-input-schema-authored":true,"x-comfy-output-schema-authored":true,"x-comfy-router-input-modalities":["text"],"x-comfy-router-output-modalities":["image"],"x-comfy-router-alias-of":"vertexai/gemini-3.1-flash-image","x-comfy-router-alias-provider":"pika"}
