{"openapi":"3.0.2","info":{"title":"pika/pika-music","description":"The request body Comfy Router accepts for the model \"pika/pika-music\", 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":"e9a5317c2f66"},"paths":{"/v2/models/pika/pika-music":{"post":{"operationId":"runRouterModel","summary":"Run pika/pika-music synchronously.","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"Request body for `POST /proxy/pika/v1/media/pika/pika-audio/pika-music`.","example":{"duration":30,"mode":"text_to_music","prompt":"warm lo-fi hip hop with soft piano and vinyl crackle"},"properties":{"clean_reference_audio":{"default":false,"description":"Clean the reference audio before use.","type":"boolean"},"duration":{"default":30,"description":"Length of the music in seconds, 10 to 360.","maximum":360,"minimum":10,"type":"number"},"lyrics":{"description":"Lyrics to sing.","type":"string"},"mode":{"default":"text_to_music","description":"Generation mode: text_to_music, voice_conditioned_text_to_music or music_cover.","enum":["text_to_music","voice_conditioned_text_to_music","music_cover"],"type":"string"},"prompt":{"description":"Description of the music.","type":"string"},"reference_audio":{"description":"URL of a voice reference. It needs `voice_consent_attested` set to true.","type":"string"},"rewrite_prompt":{"default":false,"description":"Expand a short prompt with a model before generation.","type":"boolean"},"seed":{"default":-1,"description":"Seed for reproducible output, -1 to 2147483647. -1 picks a random seed.","maximum":2147483647,"minimum":-1,"type":"integer"},"source_audio":{"description":"URL of the source song for `music_cover`.","type":"string"},"voice_consent_attested":{"default":false,"description":"Attests that the caller has the rights to clone the voice in `reference_audio`.","type":"boolean"}},"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 audio models: the terminal `GET /proxy/pika/v1/media/jobs/{request_id}` job document. The produced audio is at `output.audio.url`. Pika's `billing` record is removed.","example":{"id":"media_2d8e4b71-9c05-4f3a-b6d2-81e7a5c09f44","output":{"audio":{"content_type":"audio/mpeg","url":"https://example.invalid/pika/audio.mp3"},"media_type":"audio"},"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-music","x-comfy-input-schema-authored":true,"x-comfy-output-schema-authored":true,"x-comfy-router-input-modalities":["text","audio"],"x-comfy-router-output-modalities":["audio"]}
