{"openapi":"3.0.0","info":{"description":"CometAPI connector — unified LLM/agentic-model gateway (OpenAI-compatible chat/responses/embeddings/audio/images, Anthropic Messages, Gemini generateContent, video: Kling/Suno/Runway/Midjourney/Seedance/Veo/Sora/MiniMax/Hunyuan 3D, plus Bria/Flux/Grok/Replicate media surfaces). Official per-operation OpenAPI 3 fragments (143 files, 116 ops) from apidoc.cometapi.com; Bearer key; host api.cometapi.com.","version":"v1"},"servers":[{"description":"CometAPI connector — unified LLM/agentic-model gateway (OpenAI-compatible chat/responses/embeddings/audio/images, Anthropic Messages, Gemini generateContent, video: Kling/Suno/Runway/Midjourney/Seedance/Veo/Sora/MiniMax/Hunyuan 3D, plus Bria/Flux/Grok/Replicate media surfaces). Official per-operation OpenAPI 3 fragments (143 files, 116 ops) from apidoc.cometapi.com; Bearer key; host api.cometapi.com.","url":"https://api.apirails.com/cometapi"}],"paths":{"/hunyuan3d/v1/jobs/{job_id}":{"get":{"tags":["Hunyuan 3D"],"parameters":[{"name":"job_id","in":"path","description":"Job identifier returned by `POST /hunyuan3d/v1/jobs`.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/hunyuan3d/v1/jobs/{job_id}"},"summary":"Retrieve a Tencent HY 3D Global (Hunyuan 3D) job","description":"Wait 30 seconds before the first request, then poll every 30 seconds for at most 30 attempts. Stop on `DONE`, `FAIL`, or an unknown status.","security":[{"bearerAuth":[]}]}},"/hunyuan3d/v1/jobs":{"post":{"tags":["Hunyuan 3D"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/hunyuan3d/v1/jobs"},"summary":"Create a Tencent HY 3D Global (Hunyuan 3D) job","description":"Create an asynchronous image-to-3D job from a Base64 image. Store the returned `job_id`, wait 30 seconds, then retrieve the job.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"Action":{"type":"string","description":"Tencent HY 3D Global operation name. Must be `SubmitHunyuanTo3DProJob`.","required":true},"EnablePBR":{"type":"boolean","description":"Whether to add physically based rendering (PBR) material maps to the OBJ and MTL resource bundle for a `Normal` job."},"FaceCount":{"type":"number","description":"Target face count for the generated mesh. Treat this value as a target rather than an exact polygon guarantee."},"GenerateType":{"type":"string","description":"Generation mode. Choose `Normal` for textured output or `Geometry` for geometry-only output.","enum":["Normal","Geometry"]},"ImageBase64":{"type":"string","description":"Base64-encoded primary image without a data URL prefix. Supported formats are JPG, JPEG, PNG, and WebP. Each side must be from 128 through 5,000 pixels. The encoded value must be at most 8 MB; keep the source file at or below 6 MB to allow for encoding overhead.","required":true},"Model":{"type":"string","description":"Tencent HY 3D Global model version. Must be `3.1`.","required":true}}},"example":{"Action":"","EnablePBR":"","FaceCount":"","GenerateType":"","ImageBase64":"","Model":""}}}}}},"/v1/audio/speech":{"post":{"tags":["Audio"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/v1/audio/speech"},"summary":"Create speech","description":"Create speech","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"input":{"type":"string","description":"The text to generate audio for. Maximum length is 4096 characters.","required":true},"model":{"type":"string","description":"The TTS model to use. Choose a current speech model from the [Models page](/overview/models).","required":true},"response_format":{"type":"string","description":"The audio output format.","enum":["mp3","opus","aac","flac","wav","pcm"]},"speed":{"type":"number","description":"The speed of the generated audio. Select a value between 0.25 and 4.0."},"voice":{"type":"string","description":"The voice to use for speech synthesis.","required":true,"enum":["alloy","ash","ballad","coral","echo","fable","onyx","nova","sage","shimmer"]}}},"example":{"input":"","model":"","response_format":"","speed":"","voice":""}}}}}},"/v1/audio/transcriptions":{"post":{"tags":["Audio"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/v1/audio/transcriptions"},"summary":"Create transcription","description":"Create transcription","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/v1/audio/translations":{"post":{"tags":["Audio"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/v1/audio/translations"},"summary":"Create translation","description":"Create translation","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/v1/moderations":{"post":{"tags":["Moderation"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/v1/moderations"},"summary":"Create a moderation","description":"Checks text or multimodal input with a moderation model. The response is OpenAI-compatible and returns one `results` item for each moderated input.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"input":{"type":"string","description":"Content to check. Use a string for one text input, an array of strings for batch text checks, or OpenAI-style multimodal parts such as text plus `image_url` when the selected model supports it.","required":true},"model":{"type":"string","description":"Required moderation model ID. Use `omni-moderation-latest` for text and image moderation unless you have a specific moderation model requirement.","required":true}}},"example":{"input":"","model":""}}}}}},"/bria/{request_id}":{"get":{"tags":["Bria"],"parameters":[{"name":"request_id","in":"path","description":"The request_id returned by the Bria Image Editing API","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/bria/{request_id}"},"summary":"Query Status","description":"Poll an asynchronous Bria image-editing task by `request_id`. Editing actions return a `request_id`; text-to-image and text-to-vector respond synchronously and have no task to poll. Finished tasks return `status: \"COMPLETED\"` with `result.image_url`; task-level failures return `status: \"ERROR\"` with details.","security":[{"bearerAuth":[]}]}},"/bria/text-to-image":{"post":{"tags":["Bria"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/bria/text-to-image"},"summary":"Generate Bria images","description":"Create one or more Bria images from a text prompt. For the most predictable first request, keep num_results at 1 and use a square aspect ratio.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"aspect_ratio":{"type":"string","description":"Requested output aspect ratio.","enum":["1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9"]},"enhance_image":{"type":"boolean","description":"Optional image detail enhancement switch."},"ip_signal":{"type":"boolean","description":"Optional IP warning flag."},"medium":{"type":"string","description":"Optional visual medium.","enum":["photography","art"]},"negative_prompt":{"type":"string","description":"Optional exclusions for the generated image."},"num_results":{"type":"number","description":"Number of images to generate. Use 1 for the simplest integration test."},"prompt":{"type":"string","description":"English text prompt for image generation.","required":true},"prompt_content_moderation":{"type":"boolean","description":"Optional moderation switch."},"prompt_enhancement":{"type":"boolean","description":"Optional prompt enhancement switch."},"seed":{"type":"number","description":"Optional seed for reproducible results."},"steps_num":{"type":"number","description":"Optional refinement step count."},"sync":{"type":"boolean","description":"Optional sync hint. CometAPI returns final results immediately without setting this field."},"text_guidance_scale":{"type":"number","description":"Optional prompt adherence setting."}}},"example":{"aspect_ratio":"","enhance_image":"","ip_signal":"","medium":"","negative_prompt":"","num_results":"","prompt":"","prompt_content_moderation":"","prompt_enhancement":"","seed":"","steps_num":"","sync":"","text_guidance_scale":""}}}}}},"/bria/text-to-vector":{"post":{"tags":["Bria"],"parameters":[{"name":"Content-Type","in":"query","description":"Value","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/bria/text-to-vector"},"summary":"Generate Vector Graphics - Base (Beta)","description":"Generate Vector Graphics - Base (Beta)","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"aspect_ratio":{"type":"string","description":"The aspect ratio of the image.\n\nDefault `\"1:1\"`\n\nEnum `\"1:1\"` `\"2:3\"` `\"3:2\"` `\"3:4\"` `\"4:3\"` `\"4:5\"` `\"5:4\"` `\"9:16\"` `\"16:9\"`"},"content_moderation":{"type":"boolean","description":"When enabled, applies content moderation to both input visuals and generated outputs.\n\nFor input images:\n\n- Processing stops at the first image that fails moderation\n- Returns a 422 error with details about which parameter failed\n\nFor synchronous requests (sync=true):\n\n- If all generated images fail moderation, returns a 422 error\n- If some images pass and others fail, returns a 200 response with successful generations and \"blocked\" objects for failed ones\n\nFor asynchronous requests (sync=false):\n\n- Failed images are replaced with zero-byte files at their placeholder URLs\n- Successful images are stored at their original placeholder URLs\n\nDefault `false`"},"guidance_method_1":{"type":"string","description":"Which guidance type you would like to include in the generation. Up to 2 guidance methods can be combined during a single inference. This parameter is optional.\nEnum `\"controlnet_canny\"` `\"controlnet_depth\"` `\"controlnet_recoloring\"` `\"controlnet_color_grid\"`"},"guidance_method_1_image_file":{"type":"string","description":"The image that should be used as guidance, in base64 format, with the method defined in guidance_method_1. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB. If more then one guidance method is used, all guidance images must be of the same aspect ratio, and this will be the aspect ratio of the generated results. If guidance_method_1 is selected, an image must be provided."},"guidance_method_1_scale":{"type":"number","description":"The impact of the guidance.\n\nDefault `1`"},"guidance_method_2":{"type":"string","description":"Which guidance type you would like to include in the generation. Up to 2 guidance methods can be combined during a single inference. This parameter is optional.\nEnum `\"controlnet_canny\"` `\"controlnet_depth\"` `\"controlnet_recoloring\"` `\"controlnet_color_grid\"`"},"guidance_method_2_image_file":{"type":"string","description":"The image that should be used as guidance, in base64 format, with the method defined in guidance_method_2. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB. If more then one guidance method is used, all guidance images must be of the same aspect ratio, and this will be the aspect ratio of the generated results. If guidance_method_1 is selected, an image must be provided."},"guidance_method_2_scale":{"type":"number","description":"The impact of the guidance.\n\nDefault `1`","required":true},"image_prompt_file":{"type":"string","description":"The image file to be used as guidance, in base64 format. Accepted formats are jpeg, jpg, png, webp. The support for image prompt is currently available only when model_version=\"2.3\". Maximum file size 12MB. This image can be of any aspect ratio, even when it's not alligned with the one defined in the parameter 'aspect_ratio' or by visuals provided to the ControlNets."},"image_prompt_mode":{"type":"string","description":"- `regular`: Uses the image’s content, style elements, and color palette to guide generation.\n- `style_only`: Uses the image’s high-level style elements and color palette to influence the generated output. The support for image prompt is currently available only when model_version=\"2.3\".\n\nDefault `\"regular\"`\n\nEnum `\"regular\"` `\"style_only\"`"},"image_prompt_scale":{"type":"number","description":"The impact of the provided image on the generated results. A value between 0.0 (no impact) and 1.0 (full impact).\nDefault `1`"},"image_prompt_urls":{"type":"array","description":"A list of URLs of images that should be used as guidance. The images can be of different aspect ratios. Accepted formats are jpeg, jpg, png, webp. The URLs should point to accessible, publicly available images. The support for image prompt is currently available only when model_version=\"2.3\".","items":{"type":"string"}},"ip_signal":{"type":"boolean","description":"Flags prompts with potential IP content. If detected, a warning will be included in the response.\n\nDefault `false`"},"negative_prompt":{"type":"string","description":"Specify here elements that you didn't ask in the prompt, but are being generated, and you would like to exclude. This parameter is optional. Bria currently supports prompts in English only."},"num_results":{"type":"number","description":"The aspect ratio of the image. When a ControlNet is being used, the aspect ratio is defined by the guidance image and this parameter is ignored.\nDefault `4`"},"prompt":{"type":"string","description":"The prompt you would like to use to generate images. Bria currently supports prompts in English only.","required":true},"prompt_content_moderation":{"type":"boolean","description":"When enabled (default: true), the input prompt is scanned for NSFW or ethically restricted terms before image generation. If the prompt violates Bria's ethical guidelines, the request will be rejected with a 408 error.\nDefault `true`"},"seed":{"type":"number","description":"You can choose whether you want your generated result to be random or predictable. You can recreate the same result in the future by using the seed value of a result from the response with the prompt, model type and model version. You can exclude this parameter if you are not interested in recreating your results. This parameter is optional."},"steps_num":{"type":"number","description":"The number of iterations the model goes through to refine the generated image. This parameter is optional.\nDefault `30`"},"sync":{"type":"boolean","description":"Determines the response mode. When true, responses are synchronous. With false, responses are asynchronous, immediately providing URLs for images that are generated in the background. Use polling for the URLs to retrieve images once ready.\nDefault `false`"},"text_guidance_scale":{"type":"number","description":"Determines how closely the generated image should adhere to the input text description. This parameter is optional.\nDefault `5`"}}},"example":{"aspect_ratio":"","content_moderation":"","guidance_method_1":"","guidance_method_1_image_file":"","guidance_method_1_scale":"","guidance_method_2":"","guidance_method_2_image_file":"","guidance_method_2_scale":"","image_prompt_file":"","image_prompt_mode":"","image_prompt_scale":"","image_prompt_urls":[],"ip_signal":"","negative_prompt":"","num_results":"","prompt":"","prompt_content_moderation":"","seed":"","steps_num":"","sync":"","text_guidance_scale":""}}}}}},"/bria/image/edit/{action}":{"post":{"tags":["Bria"],"parameters":[{"name":"action","in":"path","description":"Editing action to perform. Supported values: `erase`, `gen_fill`, `expand`, `enhance`, `increase_resolution`, `replace_background`.","required":true,"schema":{"type":"string","example":""}},{"name":"Content-Type","in":"query","description":"Must be `application/json`.","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/bria/image/edit/{action}"},"summary":"Image Editing","description":"Image Editing","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"image":{"type":"string","description":"Source image as a public URL or base64-encoded data URI. Accepted formats: JPEG, PNG, WebP. Maximum 12 MB."},"mask":{"type":"string","description":"Mask image as a public URL or base64. White areas mark the region to edit; black areas are preserved. Required for `erase`, `gen_fill`, and `expand` actions."},"num_results":{"type":"number","description":"Number of result variants to generate. Default: 1."},"prompt":{"type":"string","description":"Text description of the desired edit. Required for `gen_fill` and `replace_background` actions."},"sync":{"type":"boolean","description":"When `true`, the response blocks until results are ready. When `false` (default), returns immediately with placeholder URLs that can be polled."}}},"example":{"image":"","mask":"","num_results":"","prompt":"","sync":""}}}}}},"/flux/v1/get_result":{"get":{"tags":["Flux"],"parameters":[{"name":"id","in":"query","description":"Top-level task ID returned by the FLUX create endpoint.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/flux/v1/get_result"},"summary":"Get a FLUX image result","description":"Poll a native FLUX task with the top-level `id` returned by `POST /flux/v1/{model}`. `Ready` is the successful terminal state. Stop on `Error`, `Failed`, `Failure`, `Task not found`, `Request Moderated`, or `Content Moderated`; continue polling other states only within a bounded client timeout.","security":[{"bearerAuth":[]}]}},"/flux/v1/{model}":{"post":{"tags":["Flux"],"parameters":[{"name":"model","in":"path","description":"FLUX.2 model ID in the URL path. Check `/v1/models` or the Models page for account availability.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/flux/v1/{model}"},"summary":"Generate or edit a FLUX image","description":"Submit a native BFL-format asynchronous task. Store the top-level response `id`, then poll `GET /flux/v1/get_result?id=...`. Use that CometAPI route instead of depending on a response-supplied `polling_url`.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"height":{"type":"number","description":"Requested output height in pixels. Use a dimension supported by the selected model."},"input_image":{"type":"string","description":"Public HTTPS URL of the first reference image. Replace the example URL with an image that the model provider can retrieve. This editing field is available for the FLUX.2 models covered by this reference."},"input_image_2":{"type":"string","description":"Public HTTPS URL of a second reference image for `flux-2-pro`. Replace the example URL and also send `input_image`."},"output_format":{"type":"string","description":"Requested output image format supported by the selected model. The examples use `png`."},"prompt":{"type":"string","description":"Text prompt describing the image or reference-image edit.","required":true},"seed":{"type":"number","description":"Optional seed value. A completed result can report the used seed; that field alone does not establish repeatable output."},"width":{"type":"number","description":"Requested output width in pixels. Use a dimension supported by the selected model."}}},"example":{"height":"","input_image":"","input_image_2":"","output_format":"","prompt":"","seed":"","width":""}}}}}},"/v1beta/models/{model}/generateContent":{"post":{"tags":["Gemini"],"parameters":[{"name":"model","in":"path","description":"The Gemini image model to use. See the [Models page](/overview/models) for current options.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/v1beta/models/{model}:generateContent"},"summary":"Gemini Image Generation","description":"Gemini Image Generation","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"contents":{"type":"array","description":"Conversation turns. Each item has a `role` (\"user\" or \"model\") and `parts` array containing text and/or image data.","required":true,"items":{"type":"object","properties":{"parts":{"type":"array","description":"Content blocks — text prompts and/or inline image data."},"role":{"type":"string","description":"Role of the message sender.","enum":["user","model"]}}}},"generationConfig":{"type":"object","description":"Controls generation behavior — output modalities, image resolution, thinking, etc.","properties":{"imageConfig":{"type":"object","description":"Image output configuration."},"responseModalities":{"type":"array","description":"Output types to return. Use `[\"TEXT\", \"IMAGE\"]` for mixed output, or `[\"IMAGE\"]` to force image-only output."},"thinkingConfig":{"type":"object","description":"Controls the Thinking process (Gemini 3 models). Thinking generates interim images before the final output."}}},"tools":{"type":"array","description":"Optional tools. Pass `[{\"google_search\": {}}]` to enable Google Search grounding for real-time information in generated images.","items":{"type":"object","properties":{"google_search":{"type":"object","description":"Enables Google Search grounding."}}}}}},"example":{"contents":[],"generationConfig":{},"tools":[]}}}}}},"/v1/images/edits":{"post":{"tags":["Images"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/v1/images/edits"},"summary":"Edit images with Grok","description":"Edit images with Grok","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"aspect_ratio":{"type":"string","description":"The output shape for a multi-image edit.","enum":["1:1","3:4","4:3","16:9","2:3","3:2","9:19.5","19.5:9","9:20","20:9","1:2"]},"image":{"type":"string","description":"A source image represented by `url` or the compatibility alias `image_url`."},"images":{"type":"array","description":"Two or three source images. Use this field instead of `image`.","items":{"type":"string"}},"model":{"type":"string","description":"The Grok image model ID. See the [Models page](/overview/models) for available model IDs.","required":true,"enum":["grok-imagine-image","grok-imagine-image-quality"]},"n":{"type":"number","description":"The number of edited images to generate. Use an integer from 1 through 10."},"prompt":{"type":"string","description":"A text instruction that describes the requested edit.","required":true},"resolution":{"type":"string","description":"The requested output resolution.","enum":["1k","2k"]},"response_format":{"type":"string","description":"The image representation in each response item. Use `url` for a temporary download URL or `b64_json` for Base64-encoded image bytes.","enum":["url","b64_json"]}}},"example":{"aspect_ratio":"","image":"","images":[],"model":"","n":"","prompt":"","resolution":"","response_format":""}}}}}},"/v1/images/generations":{"post":{"tags":["Images"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/v1/images/generations"},"summary":"Generate images with Grok","description":"Generate images with Grok","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"aspect_ratio":{"type":"string","description":"The output shape. Use `auto` to let the model select the aspect ratio.","enum":["1:1","3:4","4:3","9:16","16:9","2:3","3:2","9:19.5","19.5:9","9:20","20:9","1:2","2:1","auto"]},"model":{"type":"string","description":"The Grok image model ID. See the [Models page](/overview/models) for available model IDs.","required":true,"enum":["grok-imagine-image","grok-imagine-image-quality","grok-imagine-image-2.0"]},"n":{"type":"number","description":"The number of images to generate. Use an integer from 1 through 10."},"prompt":{"type":"string","description":"A text description of the image to generate.","required":true},"quality":{"type":"string","description":"Image quality for `grok-imagine-image-2.0`. This field is not available for the older Grok image model IDs.","enum":["low","medium"]},"resolution":{"type":"string","description":"The requested output resolution. Image 2.0 uses `1k` when this field is omitted.","enum":["1k","2k"]},"response_format":{"type":"string","description":"The image representation in each response item. Use `url` for a temporary download URL or `b64_json` for Base64-encoded image bytes.","enum":["url","b64_json"]}}},"example":{"aspect_ratio":"","model":"","n":"","prompt":"","quality":"","resolution":"","response_format":""}}}}}},"/kling/v1/images/omni-image/{task_id}":{"get":{"tags":["Kling"],"parameters":[{"name":"task_id","in":"path","description":"Task ID returned by `POST /kling/v1/images/omni-image`.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/images/omni-image/{task_id}"},"summary":"Get a Kling Omni image task","description":"Get the status and result of a Kling Omni Image task by `task_id`. Use the `task_id` returned by `POST /kling/v1/images/omni-image`.","security":[{"bearerAuth":[]}]}},"/kling/v1/images/editing/expand":{"post":{"tags":["Kling"],"parameters":[{"name":"Content-Type","in":"query","description":"Must be `application/json`.","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/images/editing/expand"},"summary":"Expand an image with Kling","description":"Expand an image with Kling","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"callback_url":{"type":"string","description":"Webhook URL for task status notifications."},"down_expansion_ratio":{"type":"number","description":"Downward expansion ratio as a multiple of the original image dimension. Range: 0-2. Send `0` for sides you do not want to expand.","required":true},"external_task_id":{"type":"string","description":"Optional user-defined task ID for your own tracking. Must be unique per account."},"image":{"type":"string","description":"Source image to expand. Image URL or raw Base64 string without a `data:` prefix. Supported formats: JPG, JPEG, PNG. Maximum 10 MB, minimum 300x300 px, aspect ratio between 1:2.5 and 2.5:1.","required":true},"left_expansion_ratio":{"type":"number","description":"Leftward expansion ratio as a multiple of the original image dimension. Range: 0-2. Send `0` for sides you do not want to expand.","required":true},"n":{"type":"number","description":"Number of expanded images to generate. Range: 1-9."},"prompt":{"type":"string","description":"Optional text prompt to guide the expanded area content. Maximum 2500 characters."},"right_expansion_ratio":{"type":"number","description":"Rightward expansion ratio as a multiple of the original image dimension. Range: 0-2. Send `0` for sides you do not want to expand.","required":true},"up_expansion_ratio":{"type":"number","description":"Upward expansion ratio as a multiple of the original image dimension. Range: 0-2. Send `0` for sides you do not want to expand.","required":true},"watermark_info":{"type":"object","description":"Watermark options.","properties":{"enabled":{"type":"boolean","description":"Value"}}}}},"example":{"callback_url":"","down_expansion_ratio":"","external_task_id":"","image":"","left_expansion_ratio":"","n":"","prompt":"","right_expansion_ratio":"","up_expansion_ratio":"","watermark_info":{}}}}}}},"/kling/v1/images/generations":{"post":{"tags":["Kling"],"parameters":[{"name":"Content-Type","in":"query","description":"Must be `application/json`.","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/images/generations"},"summary":"Generate images with Kling","description":"Generate images with Kling","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"aspect_ratio":{"type":"string","description":"Output aspect ratio (width:height).","enum":["16:9","9:16","1:1","4:3","3:4","3:2","2:3","21:9"]},"callback_url":{"type":"string","description":"Webhook URL to receive task status updates when the task completes."},"element_list":{"type":"array","description":"Optional Kling element references. The total count of element references and input images must not exceed 10.","items":{"type":"object","properties":{"element_id":{"type":"number","description":"Kling element ID.","required":true}}}},"external_task_id":{"type":"string","description":"Optional user-defined task ID for your own tracking. Must be unique per account."},"human_fidelity":{"type":"number","description":"Human-subject fidelity control. Range: 0-1. Used only by legacy subject-reference requests."},"image":{"type":"string","description":"Reference image as a raw Base64 string without a `data:` prefix, or a public URL. Accepted formats: JPG, JPEG, PNG. Maximum 10 MB, minimum 300x300 px, aspect ratio between 1:2.5 and 2.5:1."},"image_fidelity":{"type":"number","description":"How closely the output follows the reference image. Range: 0-1. Used by legacy image-reference models."},"image_reference":{"type":"string","description":"Reference mode for legacy image-to-image requests when `image` is provided.","enum":["subject","face"]},"model_name":{"type":"string","description":"Kling image model variant. Use `kling-v3` for new requests. Omitting `model_name` uses the legacy CometAPI route default.","enum":["kling-v1","kling-v1-5","kling-v2","kling-v2-1","kling-v3"]},"n":{"type":"number","description":"Number of images to generate. Range: 1-9."},"negative_prompt":{"type":"string","description":"Elements to exclude from the image. Maximum 2500 characters. Not supported when `image` is provided."},"prompt":{"type":"string","description":"Text prompt describing the image to generate. Maximum 2500 characters.","required":true},"resolution":{"type":"string","description":"Output resolution. Defaults to `1k`.","enum":["1k","2k"]},"watermark_info":{"type":"object","description":"Watermark options.","properties":{"enabled":{"type":"boolean","description":"Whether to add the official watermark."}}}}},"example":{"aspect_ratio":"","callback_url":"","element_list":[],"external_task_id":"","human_fidelity":"","image":"","image_fidelity":"","image_reference":"","model_name":"","n":"","negative_prompt":"","prompt":"","resolution":"","watermark_info":{}}}}}}},"/kling/v1/images/multi-image2image":{"post":{"tags":["Kling"],"parameters":[{"name":"Content-Type","in":"query","description":"Must be `application/json`.","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/images/multi-image2image"},"summary":"Generate a Kling image from multiple images","description":"Generate a Kling image from multiple images","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"aspect_ratio":{"type":"string","description":"Aspect ratio of the generated image.","enum":["16:9","9:16","1:1","4:3","3:4","3:2","2:3","21:9"]},"callback_url":{"type":"string","description":"Webhook URL for task status notifications."},"external_task_id":{"type":"string","description":"Optional user-defined task ID for your own tracking. Must be unique per account."},"model_name":{"type":"string","description":"Model to use for multi-image generation. Use `kling-v2-1` for new requests; omitting the field uses the legacy route default.","enum":["kling-v2","kling-v2-1"]},"n":{"type":"number","description":"Number of images to generate. Range: 1-9."},"negative_prompt":{"type":"string","description":"Elements to exclude from the image. Maximum 2500 characters."},"prompt":{"type":"string","description":"Text prompt describing the desired output. Maximum 2500 characters."},"scene_image":{"type":"string","description":"Optional scene reference image. Image URL or raw Base64 string without a `data:` prefix. Supported formats: JPG, JPEG, PNG. Maximum 10 MB, minimum 300x300 px, aspect ratio between 1:2.5 and 2.5:1."},"style_image":{"type":"string","description":"Optional style reference image. Image URL or raw Base64 string without a `data:` prefix. Supported formats: JPG, JPEG, PNG. Maximum 10 MB, minimum 300x300 px, aspect ratio between 1:2.5 and 2.5:1."},"subject_image_list":{"type":"array","description":"Subject reference images. Minimum 1, maximum 4.","required":true,"items":{"type":"object","properties":{"subject_image":{"type":"string","description":"Image URL or raw Base64 string without a `data:` prefix. Supported formats: JPG, JPEG, PNG. Maximum 10 MB, minimum 300x300 px, aspect ratio between 1:2.5 and 2.5:1.","required":true}}}},"watermark_info":{"type":"object","description":"Watermark options.","properties":{"enabled":{"type":"boolean","description":"Value"}}}}},"example":{"aspect_ratio":"","callback_url":"","external_task_id":"","model_name":"","n":"","negative_prompt":"","prompt":"","scene_image":"","style_image":"","subject_image_list":[],"watermark_info":{}}}}}}},"/kling/v1/images/omni-image":{"post":{"tags":["Kling"],"parameters":[{"name":"Content-Type","in":"query","description":"Must be `application/json`.","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/images/omni-image"},"summary":"Create a Kling Omni image task","description":"Create an asynchronous Kling Omni Image task. Poll `GET /kling/v1/images/omni-image/{task_id}` until the task reaches a terminal state.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"aspect_ratio":{"type":"string","description":"Requested output aspect ratio in width:height format. Use `auto` to let the provider choose from the prompt and references.","enum":["16:9","9:16","1:1","4:3","3:4","3:2","2:3","21:9","auto"]},"callback_url":{"type":"string","description":"Webhook URL that receives task status notifications when the task status changes. Omit this field to poll manually."},"external_task_id":{"type":"string","description":"User-defined task ID for your own tracking. It does not replace the system-generated `task_id` and must be unique per account."},"image_list":{"type":"array","description":"Reference images that the prompt can cite with `<<<image_1>>>`, `<<<image_2>>>`, and so on. Keep the total number of reference images within the provider limits for the selected model.","items":{"type":"object","properties":{"image":{"type":"string","description":"Image URL or Base64 image string. Supported formats are JPG, JPEG, and PNG. The image file must be accessible, no larger than 10 MB, at least 300 px on each side, and between 1:2.5 and 2.5:1 aspect ratio.","required":true}}}},"model_name":{"type":"string","description":"Optional model ID for this Omni Image request. Omit this field to use the route default."},"n":{"type":"number","description":"Number of single-image results to generate. Range: 1 to 9."},"prompt":{"type":"string","description":"Text prompt for the generated image. The prompt can reference images with `<<<image_1>>>`, `<<<image_2>>>`, and matching indexes from `image_list`. Maximum length is 2,500 characters.","required":true},"resolution":{"type":"string","description":"Requested output resolution. Use `1k`, `2k`, or `4k`; omitted requests use `1k`.","enum":["1k","2k","4k"]},"result_type":{"type":"string","description":"Use `single` for a single-image task.","enum":["single"]},"watermark_info":{"type":"object","description":"Watermark options. When `enabled` is `true`, the task can return watermarked result URLs in addition to the original result URLs.","properties":{"enabled":{"type":"boolean","description":"Whether to request watermarked result URLs."}}}}},"example":{"aspect_ratio":"","callback_url":"","external_task_id":"","image_list":[],"model_name":"","n":"","prompt":"","resolution":"","result_type":"","watermark_info":{}}}}}}},"/kling/v1/images/kolors-virtual-try-on":{"post":{"tags":["Kling"],"parameters":[{"name":"Content-Type","in":"query","description":"Must be `application/json`.","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/images/kolors-virtual-try-on"},"summary":"Create a Kling virtual try-on","description":"Create a Kling virtual try-on","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"callback_url":{"type":"string","description":"Webhook URL for task status notifications."},"cloth_image":{"type":"string","description":"Clothing image for the try-on. Image URL or raw Base64 string without a `data:` prefix. Supported formats: JPG, JPEG, PNG. Maximum 10 MB, minimum 300x300 px, aspect ratio between 1:2.5 and 2.5:1. Supports tops, bottoms, and one-piece dresses.","required":true},"external_task_id":{"type":"string","description":"Optional user-defined task ID for your own tracking. Must be unique per account."},"human_image":{"type":"string","description":"Person image to dress. Image URL or raw Base64 string without a `data:` prefix. Supported formats: JPG, JPEG, PNG. Maximum 10 MB, minimum 300x300 px, aspect ratio between 1:2.5 and 2.5:1.","required":true},"model_name":{"type":"string","description":"Virtual try-on model version. Defaults to `kolors-virtual-try-on-v1`.","enum":["kolors-virtual-try-on-v1","kolors-virtual-try-on-v1-5"]}}},"example":{"callback_url":"","cloth_image":"","external_task_id":"","human_image":"","model_name":""}}}}}},"/mj/submit/action":{"post":{"tags":["Midjourney"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/mj/submit/action"},"summary":"Create a Midjourney follow-up action task","description":"Create a Midjourney follow-up action task","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"chooseSameChannel":{"type":"boolean","description":"Whether to prefer the same provider account used by the current task."},"customId":{"type":"string","description":"Action id taken from the latest `buttons` array returned by the fetch endpoint.","required":true},"enableRemix":{"type":"boolean","description":"Whether to force remix mode when the current action supports it."},"state":{"type":"string","description":"Custom state string. Returned as-is in the task result and webhook callback for your own tracking."},"taskId":{"type":"string","description":"Midjourney task id you want to continue from.","required":true}}},"example":{"chooseSameChannel":"","customId":"","enableRemix":"","state":"","taskId":""}}}}}},"/mj/submit/blend":{"post":{"tags":["Midjourney"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/mj/submit/blend"},"summary":"Blend (image -> image)","description":"Blend (image -> image)","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"base64Array":{"type":"array","description":"Two or more base64-encoded images to blend. Each item should be a data URI such as `data:image/png;base64,xxx`.","required":true,"items":{"type":"string"}},"botType":{"type":"string","description":"Bot type to use. `MID_JOURNEY` for Midjourney (default), `NIJI_JOURNEY` for Niji.","enum":["MID_JOURNEY","NIJI_JOURNEY"]},"dimensions":{"type":"string","description":"Output aspect ratio.","enum":["PORTRAIT","SQUARE","LANDSCAPE"]},"notifyHook":{"type":"string","description":"Webhook URL to receive task status updates. Falls back to your account-level webhook if omitted."},"state":{"type":"string","description":"Custom state string. Returned as-is in the task result and webhook callback for your own tracking."}}},"example":{"base64Array":[],"botType":"","dimensions":"","notifyHook":"","state":""}}}}}},"/mj/submit/describe":{"post":{"tags":["Midjourney"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/mj/submit/describe"},"summary":"Describe (image -> text)","description":". The extracted prompt suggestions arrive in the task's `promptEn` field when you fetch the finished task.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"base64":{"type":"string","description":"Base64-encoded image to describe. Use a data URI such as `data:image/png;base64,xxx`. Provide either `base64` or `link`.","required":true},"botType":{"type":"string","description":"Bot type to use. `MID_JOURNEY` for Midjourney (default), `NIJI_JOURNEY` for Niji.","enum":["NIJI_JOURNEY","MID_JOURNEY"]},"link":{"type":"string","description":"URL of the image to describe. Provide either `link` or `base64`.","required":true},"state":{"type":"string","description":"Custom state string. Returned as-is in the task result and webhook callback for your own tracking."}}},"example":{"base64":"","botType":"","link":"","state":""}}}}}},"/mj/submit/imagine":{"post":{"tags":["Midjourney"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/mj/submit/imagine"},"summary":"Create a Midjourney imagine task","description":"Submit the primary Midjourney generation request. Poll the returned task id with the fetch endpoint until the task reaches a terminal state.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"accountFilter":{"type":"object","description":"Filter which Midjourney account modes may be used for this task.","properties":{"modes":{"type":"array","description":"Allowed speed modes, e.g. `FAST`, `RELAX`, or `TURBO`."}}},"base64Array":{"type":"array","description":"Base64-encoded reference images. Each item should be a data URI such as `data:image/png;base64,xxx`.","items":{"type":"string"}},"botType":{"type":"string","description":"Bot type to use. `MID_JOURNEY` for Midjourney (default), `NIJI_JOURNEY` for Niji.","enum":["MID_JOURNEY","NIJI_JOURNEY"]},"prompt":{"type":"string","description":"Text prompt for the generation. Supports standard Midjourney parameters such as `--v`, `--ar`, `--stylize`, etc.","required":true},"state":{"type":"string","description":"Custom state string. Returned as-is in the task result and webhook callback for your own tracking."}}},"example":{"accountFilter":{},"base64Array":[],"botType":"","prompt":"","state":""}}}}}},"/mj/submit/modal":{"post":{"tags":["Midjourney"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/mj/submit/modal"},"summary":"Modal (Area Redesign & Zoom)","description":"Modal (Area Redesign & Zoom)","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"customId":{"type":"string","description":"The button `customId` that opened the modal, such as `MJ::Inpaint::1::xxxx::SOLO` from the Vary (Region) button. Required.","required":true},"maskBase64":{"type":"string","description":"Base64-encoded mask image for partial inpainting. White areas are repainted; black areas are preserved."},"prompt":{"type":"string","description":"Text prompt describing the desired change for the selected region."},"taskId":{"type":"string","description":"Task id from the parent task whose modal action you are continuing.","required":true}}},"example":{"customId":"","maskBase64":"","prompt":"","taskId":""}}}}}},"/mj/submit/edits":{"post":{"tags":["Midjourney"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/mj/submit/edits"},"summary":"Submit Editor","description":"Submit Editor","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"image":{"type":"string","description":"Image to edit. Pass a public URL or a base64-encoded data URI.","required":true},"noStorage":{"type":"boolean","description":"When `true`, return the original provider image URL instead of a CometAPI-proxied link."},"notifyHook":{"type":"string","description":"Webhook URL to receive task status updates. Falls back to your account-level webhook if omitted."},"prompt":{"type":"string","description":"Text prompt describing the desired edit.","required":true},"state":{"type":"string","description":"Custom state string. Returned as-is in the task result and webhook callback for your own tracking."}}},"example":{"image":"","noStorage":"","notifyHook":"","prompt":"","state":""}}}}}},"/mj/submit/video":{"post":{"tags":["Midjourney"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/mj/submit/video"},"summary":"Submit Video","description":"Submit Video","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"action":{"type":"string","description":"Action to perform on an existing video task. When set, `index` and `taskId` are required."},"image":{"type":"string","description":"First-frame image as a public URL or base64-encoded data URI.","required":true},"index":{"type":"number","description":"Zero-based index selecting which video variant to act on from the parent task."},"motion":{"type":"string","description":"Motion intensity of the generated video.","required":true,"enum":["low","high"]},"noStorage":{"type":"boolean","description":"When `true`, return the original provider video URL instead of a CometAPI-proxied link."},"prompt":{"type":"string","description":"Text prompt to guide the video generation."},"state":{"type":"string","description":"Custom state string. Returned as-is in the task result and webhook callback for your own tracking."},"taskId":{"type":"string","description":"Parent task id to continue from. Required when `action` is set."},"videoType":{"type":"string","description":"Video model variant, e.g. `vid_1.1_i2v_480` (480p) or `vid_1.1_i2v_720` (720p)."}}},"example":{"action":"","image":"","index":"","motion":"","noStorage":"","prompt":"","state":"","taskId":"","videoType":""}}}}}},"/mj/task/{id}/fetch":{"get":{"tags":["Midjourney"],"parameters":[{"name":"id","in":"path","description":"Midjourney task id.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/mj/task/{id}/fetch"},"summary":"Fetch a Midjourney task","description":"Use the task id returned by imagine, action, blend, modal, or editor endpoints. This is the main polling endpoint for Midjourney workflows on CometAPI.","security":[{"bearerAuth":[]}]}},"/mj/task/list-by-condition":{"post":{"tags":["Midjourney"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/mj/task/list-by-condition"},"summary":"List by Condition","description":"List by Condition","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"ids":{"type":"array","description":"Array of Midjourney task ids to retrieve. Returns the current status and result for each.","required":true,"items":{"type":"string"}}}},"example":{"ids":[]}}}}}},"/v1/images/generations/{task_id}":{"get":{"tags":["Images"],"parameters":[{"name":"task_id","in":"path","description":"Task ID returned in `data.task_id` by the async create request.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/v1/images/generations/{task_id}"},"summary":"Retrieve an image generation task","description":"Poll an async image generation task by task ID. Use the `task_id` returned by an async `POST /v1/images/generations` request.","security":[{"bearerAuth":[]}]}},"/replicate/v1/predictions/{id}":{"get":{"tags":["Replicate"],"parameters":[{"name":"id","in":"path","description":"Prediction id returned by the create endpoint.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/replicate/v1/predictions/{id}"},"summary":"Query a Replicate prediction","description":"Use the prediction id returned by the create endpoint. Keep polling until `output` is populated or `error` is not null.","security":[{"bearerAuth":[]}]}},"/replicate/v1/models/{models}/predictions":{"post":{"tags":["Replicate"],"parameters":[{"name":"models","in":"path","description":"Replicate model id, for example `black-forest-labs/flux-schnell` or `black-forest-labs/flux-kontext-pro`.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/replicate/v1/models/{models}/predictions"},"summary":"Create a Replicate prediction","description":"Submit a prediction request using a model id in the path and a provider-specific `input` object in the body.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"input":{"type":"object","description":"Provider-specific model input. Keep all parameters inside this object.","required":true,"properties":{"aspect_ratio":{"type":"string","description":"Common aspect ratios supported by many FLUX models, for example `1:1`, `16:9`, `9:16`, `3:2`, or `2:3`."},"input_image":{"type":"string","description":"Single reference image URL or provider-supported image input for edit or context-aware models such as `flux-kontext-pro`."},"input_images":{"type":"array","description":"Multiple reference images when the selected Replicate-compatible model supports them."},"output_format":{"type":"string","description":"Value","enum":["webp","png","jpg","jpeg"]},"output_quality":{"type":"number","description":"Value"},"prompt":{"type":"string","description":"Value","required":true}}}}},"example":{"input":{}}}}}}},"/suno/custom-model/feed/{model_id}":{"get":{"tags":["Suno"],"parameters":[{"name":"model_id","in":"path","description":"Model ID returned when creating the custom model","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/custom-model/feed/{model_id}"},"summary":"Query custom model","description":"Query custom model","security":[{"bearerAuth":[]}]}},"/suno/act/mp4/{clip_id}":{"get":{"tags":["Suno"],"parameters":[{"name":"clip_id","in":"path","description":"Clip ID from a music generation task. Obtained from a successful response of the [generate music](/api/music/suno/generate-music) endpoint.\n  - Must be a valid `clip_id` from a completed music generation task","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/act/mp4/{clip_id}"},"summary":"Generate MP4 music video","description":"Generate MP4 music video","security":[{"bearerAuth":[]}]}},"/suno/act/midi/{clip_id}":{"get":{"tags":["Suno"],"parameters":[{"name":"clip_id","in":"path","description":"Value","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/act/midi/{clip_id}"},"summary":"Get MIDI","description":"The MIDI transcription is generated lazily: the first call can return `fetch result time out` while the transcription runs. Retry after roughly 30 seconds to receive the `state: complete` payload.","security":[{"bearerAuth":[]}]}},"/suno/act/wav/{clip_id}":{"get":{"tags":["Suno"],"parameters":[{"name":"clip_id","in":"path","description":"Value","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/act/wav/{clip_id}"},"summary":"Get WAV format file","description":"The WAV file is converted lazily: the first call can return an empty object while the conversion runs. Retry after roughly 30 seconds to receive `wav_file_url`.","security":[{"bearerAuth":[]}]}},"/suno/act/timing/{clip_id}":{"get":{"tags":["Suno"],"parameters":[{"name":"clip_id","in":"path","description":"Value","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/act/timing/{clip_id}"},"summary":"Timing: lyrics and audio timeline","description":"Timing: lyrics and audio timeline","security":[{"bearerAuth":[]}]}},"/suno/uploads/open/{id}":{"get":{"tags":["Suno"],"parameters":[{"name":"id","in":"path","description":"Upload task ID returned by `POST /suno/uploads/open`.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/uploads/open/{id}"},"summary":"Query an open upload task","description":"Query an open upload task","security":[{"bearerAuth":[]}]}},"/suno/fetch/{task_id}":{"get":{"tags":["Suno"],"parameters":[{"name":"task_id","in":"path","description":"Task ID. Available in the generate music response.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/fetch/{task_id}"},"summary":"Query single task","description":"Query single task","security":[{"bearerAuth":[]}]}},"/suno/uploads/uncr/{id}":{"get":{"tags":["Suno"],"parameters":[{"name":"id","in":"path","description":"Upload task ID returned by `POST /suno/uploads/uncr`.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/uploads/uncr/{id}"},"summary":"Query an Uncr upload task","description":"Query an Uncr upload task","security":[{"bearerAuth":[]}]}},"/suno/custom-model":{"post":{"tags":["Suno"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/custom-model"},"summary":"Create custom model","description":"Create custom model","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"clip_ids":{"type":"array","description":"Array of song clip_ids. Minimum 6, recommended 24. All must belong to the same account.","required":true,"items":{"type":"string"}},"name":{"type":"string","description":"Model name","required":true}}},"example":{"clip_ids":[],"name":""}}}}}},"/suno/act/tags":{"post":{"tags":["Suno"],"parameters":[{"name":"Content-Type","in":"query","description":"Value","required":true,"schema":{"type":"string","example":""}},{"name":"myuid","in":"query","description":"Value","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/act/tags"},"summary":"Expand style tags","description":"Expand style tags","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"original_tags":{"type":"string","description":"Simple style keyword, theme, or basic tag to expand into a detailed music style description.\n  - Can be a single word or phrase\n  - Examples: `\"student\"`, `\"energetic rock\"`, `\"romantic\"`, `\"party vibes\"`","required":true}}},"example":{"original_tags":""}}}}}},"/suno/submit/music":{"post":{"tags":["Suno"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/submit/music"},"summary":"Full-track separation","description":"Full-track separation","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"continue_at":{"type":"string","description":"Value","required":true},"continue_clip_id":{"type":"string","description":"Value","required":true},"continued_aligned_prompt":{"type":"string","description":"Value","required":true},"generation_type":{"type":"string","description":"Value","required":true},"make_instrumental":{"type":"boolean","description":"Value","required":true},"mv":{"type":"string","description":"Value","required":true},"stem_task":{"type":"string","description":"Value","required":true},"stem_type_group_name":{"type":"string","description":"Value","required":true},"stem_type_id":{"type":"number","description":"Value","required":true},"task":{"type":"string","description":"Value","required":true},"task_id":{"type":"string","description":"Value","required":true},"title":{"type":"string","description":"Value","required":true}}},"example":{"continue_at":"","continue_clip_id":"","continued_aligned_prompt":"","generation_type":"","make_instrumental":"","mv":"","stem_task":"","stem_type_group_name":"","stem_type_id":"","task":"","task_id":"","title":""}}}}}},"/suno/submit/lyrics":{"post":{"tags":["Suno"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/submit/lyrics"},"summary":"Generate lyrics","description":"Generate lyrics","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"notify_hook":{"type":"string","description":"Webhook URL for receiving lyrics generation completion notifications. When provided, the system sends a POST request with task results to this URL.\n  - Must be a valid HTTP/HTTPS URL\n  - Suitable for async processing and automated workflows","required":true},"prompt":{"type":"string","description":"Topic, theme, or description for lyrics generation. Can be a simple phrase, story concept, or specific instructions about what you want the lyrics to convey.\n  - Example: `\"[Verse]\\nA song about summer love and beach sunsets\"`\n  - Example: `\"Write a romantic song about missing someone\"`","required":true}}},"example":{"notify_hook":"","prompt":""}}}}}},"/suno/act/vox/{clip_id}":{"post":{"tags":["Suno"],"parameters":[{"name":"clip_id","in":"path","description":"Value","required":true,"schema":{"type":"string","example":""}},{"name":"Content-Type","in":"query","description":"Value","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/act/vox/{clip_id}"},"summary":"Get vox","description":"Get vox","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"vocal_end_s":{"type":"number","description":"Must be less than 30 seconds after vocal_start_s","required":true},"vocal_start_s":{"type":"number","description":"Value","required":true}}},"example":{"vocal_end_s":"","vocal_start_s":""}}}}}},"/suno/act/lyrics-mashup":{"post":{"tags":["Suno"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/act/lyrics-mashup"},"summary":"Blend two lyric drafts","description":"Blend two lyric drafts","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"lyrics_a":{"type":"string","description":"First non-empty lyric draft to include in the blended result.","required":true},"lyrics_b":{"type":"string","description":"Second non-empty lyric draft to include in the blended result.","required":true}}},"example":{"lyrics_a":"","lyrics_b":""}}}}}},"/suno/persona/create":{"post":{"tags":["Suno"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/persona/create"},"summary":"Create persona","description":"Create persona","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"clips":{"type":"array","description":"Value","required":true,"items":{"type":"string"}},"description":{"type":"string","description":"Value","required":true},"is_public":{"type":"boolean","description":"Value","required":true},"name":{"type":"string","description":"Value","required":true},"persona_type":{"type":"string","description":"Set to `vox` when creating a Persona v2 singer persona from an extracted vocal segment.","enum":["vox"]},"root_clip_id":{"type":"string","description":"Value","required":true},"user_input_styles":{"type":"string","description":"Style description used for the Persona v2 singer persona."},"vocal_end_s":{"type":"number","description":"End of the extracted vocal segment in seconds."},"vocal_start_s":{"type":"number","description":"Start of the extracted vocal segment in seconds."},"vox_audio_id":{"type":"string","description":"Vocal segment ID returned by `POST /suno/act/vox/{clip_id}`."}}},"example":{"clips":[],"description":"","is_public":"","name":"","persona_type":"","root_clip_id":"","user_input_styles":"","vocal_end_s":"","vocal_start_s":"","vox_audio_id":""}}}}}},"/suno/uploads/open":{"post":{"tags":["Suno"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/uploads/open"},"summary":"Create an open upload task","description":"Create an open upload task","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":false,"content":{"multipart/form-data":{"schema":{"type":"object","required":[],"properties":{"name":{"type":"string","description":"Song name shown for the uploaded clip.","required":true},"url":{"type":"string","description":"Public URL for an audio file that you are authorized to use.","required":true}}},"example":{"name":"","url":""}}}}}},"/suno/fetch":{"post":{"tags":["Suno"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/fetch"},"summary":"Query batch tasks","description":"Query batch tasks","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"action":{"type":"string","description":"Action type: MUSIC or LYRICS.","required":true},"ids":{"type":"array","description":"Value","required":true,"items":{"type":"string"}}}},"example":{"action":"","ids":[]}}}}}},"/suno/submit/concat":{"post":{"tags":["Suno"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/submit/concat"},"summary":"Song concatenation","description":"Song concatenation","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"clip_id":{"type":"string","description":"The `clip_id` returned from the extend task. This ID identifies the extended music clip to concatenate.\n  - Must be a valid `clip_id` returned from a completed extend task\n  - Example: `\"task_id_after_extension\"`","required":true},"is_infill":{"type":"boolean","description":"Whether this task is an infill operation.","required":true}}},"example":{"clip_id":"","is_infill":""}}}}}},"/suno/act/speed/{clip_id}":{"post":{"tags":["Suno"],"parameters":[{"name":"clip_id","in":"path","description":"Generated or uploaded source clip ID.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/act/speed/{clip_id}"},"summary":"Change clip speed","description":"Change clip speed","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"keep_pitch":{"type":"boolean","description":"Preserve pitch when changing speed. Set `false` to change pitch with speed.","required":true},"speed_multiplier":{"type":"number","description":"Playback speed multiplier.","required":true},"title":{"type":"string","description":"Title for the transformed clip.","required":true}}},"example":{"keep_pitch":"","speed_multiplier":"","title":""}}}}}},"/suno/uploads/uncr":{"post":{"tags":["Suno"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/uploads/uncr"},"summary":"Create an Uncr upload task","description":"Create an Uncr upload task","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":false,"content":{"multipart/form-data":{"schema":{"type":"object","required":[],"properties":{"name":{"type":"string","description":"Display name for the uploaded audio.","required":true},"url":{"type":"string","description":"Public MP3 or WAV URL for audio that you are authorized to use. The provider must be able to download the URL without authentication.","required":true}}},"example":{"name":"","url":""}}}}}},"/suno/uploads/audio-url":{"post":{"tags":["Suno"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/uploads/audio-url"},"summary":"Upload music","description":"Upload music","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":false,"content":{"multipart/form-data":{"schema":{"type":"object","required":[],"properties":{"clip_id":{"type":"string","description":"Optional first upload clip ID. Include it on later uploads when several clips must be routed to the same account."},"url":{"type":"string","description":"Public audio URL. Use a supported audio format and keep the source within the endpoint's duration limit.","required":true}}},"example":{"clip_id":"","url":""}}}}}},"/suno/persona/voice/create":{"post":{"tags":["Suno"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/persona/voice/create"},"summary":"Create voice persona","description":"Create voice persona","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"description":{"type":"string","description":"Persona description"},"image_s3_id":{"type":"string","description":"Image in Base64 format (data:image/jpeg;base64,...)"},"is_public":{"type":"boolean","description":"Whether the persona is public (note: always reset to false regardless of input)"},"is_voice_recording":{"type":"boolean","description":"Whether this is a voice recording"},"name":{"type":"string","description":"Persona name","required":true},"persona_type":{"type":"string","description":"Must be vox","required":true,"enum":["vox"]},"singer_skill_level":{"type":"string","description":"Singer skill level","enum":["Advanced","Intermediate","Beginner","Professional"]},"source":{"type":"string","description":"Source type"},"user_input_styles":{"type":"string","description":"Style description"},"verification_id":{"type":"string","description":"verification_id from the voice verification step","required":true},"vocal_end_s":{"type":"number","description":"Vocal end time (seconds)"},"vocal_start_s":{"type":"number","description":"Vocal start time (seconds)"},"voice_recording_id":{"type":"string","description":"voice_recording_id from the upload voice step","required":true},"vox_audio_id":{"type":"string","description":"vox_audio_id from the upload voice step","required":true}}},"example":{"description":"","image_s3_id":"","is_public":"","is_voice_recording":"","name":"","persona_type":"","singer_skill_level":"","source":"","user_input_styles":"","verification_id":"","vocal_end_s":"","vocal_start_s":"","voice_recording_id":"","vox_audio_id":""}}}}}},"/suno/persona/voice/one":{"post":{"tags":["Suno"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/persona/voice/one"},"summary":"Create a voice persona from one recording","description":"Create a voice persona from one recording","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"name":{"type":"string","description":"Name for the voice persona.","required":true},"singer_skill_level":{"type":"string","description":"Singer skill classification.","required":true,"enum":["Advanced","Intermediate","Beginner","Professional"]},"url":{"type":"string","description":"Public MP3 or WAV URL containing spoken words or singing.","required":true},"vocal_end_s":{"type":"number","description":"End of the selected voice segment in seconds. It must be greater than `vocal_start_s`.","required":true},"vocal_start_s":{"type":"number","description":"Start of the selected voice segment in seconds.","required":true}}},"example":{"name":"","singer_skill_level":"","url":"","vocal_end_s":"","vocal_start_s":""}}}}}},"/suno/act/phrase":{"post":{"tags":["Suno"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/act/phrase"},"summary":"Get verification phrase","description":"Get verification phrase","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"language":{"type":"string","description":"Language code. Supported: zh, en, es, fr, pt, de, ja, ko, hi, ru","required":true,"enum":["zh","en","es","fr","pt","de","ja","ko","hi","ru"]},"voice_recording_id":{"type":"string","description":"voice_recording_id from the upload voice step","required":true}}},"example":{"language":"","voice_recording_id":""}}}}}},"/suno/persona/voice/verify":{"post":{"tags":["Suno"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/persona/voice/verify"},"summary":"Voice verification","description":"Voice verification","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"phrase_id":{"type":"string","description":"phrase_id from the get verification phrase step","required":true},"url":{"type":"string","description":"URL of the recorded verification audio matching phrase_text. Supports .mp3 or .wav.","required":true},"voice_recording_id":{"type":"string","description":"voice_recording_id from the upload voice step","required":true}}},"example":{"phrase_id":"","url":"","voice_recording_id":""}}}}}},"/suno/persona/voice/vox":{"post":{"tags":["Suno"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/suno/persona/voice/vox"},"summary":"Upload voice","description":"Upload voice","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"url":{"type":"string","description":"Audio file URL","required":true},"vocal_end_s":{"type":"number","description":"Vocal end time (seconds)","required":true},"vocal_start_s":{"type":"number","description":"Vocal start time (seconds)","required":true}}},"example":{"url":"","vocal_end_s":"","vocal_start_s":""}}}}}},"/v1/messages":{"post":{"tags":["Anthropic Messages"],"parameters":[{"name":"anthropic-beta","in":"query","description":"Comma-separated list of beta features to enable. Examples: `max-tokens-3-5-sonnet-2024-07-15`, `pdfs-2024-09-25`, `output-128k-2025-02-19`.","required":false,"schema":{"type":"string","example":""}},{"name":"anthropic-version","in":"query","description":"The Anthropic API version to use. Defaults to `2023-06-01`.","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/v1/messages"},"summary":"Anthropic Messages","description":"Send structured messages to Claude models using the Anthropic native API format. Supports text and multimodal inputs, multi-turn conversations, adaptive thinking, tool use, prompt caching, streaming, and web search. Use this endpoint when you need Claude-specific features like adaptive thinking or prompt caching that are not available through the OpenAI-compatible endpoint.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"max_tokens":{"type":"number","description":"The maximum number of tokens to generate. The model may stop before reaching this limit. When using `thinking`, the thinking tokens count towards this limit.","required":true},"messages":{"type":"array","description":"The conversation messages. Must alternate between `user` and `assistant` roles. Each message's `content` can be a string or an array of content blocks (text, image, document, tool_use, tool_result). There is a limit of 100,000 messages per request.","required":true,"items":{"type":"object","properties":{"content":{"type":"string","description":"The message content. Either a plain string or an array of content blocks for multimodal input.","required":true},"role":{"type":"string","description":"The role of the message author.","required":true,"enum":["user","assistant"]}}}},"metadata":{"type":"object","description":"Request metadata for tracking and analytics.","properties":{"user_id":{"type":"string","description":"An external identifier for the user making the request. Used for abuse detection."}}},"model":{"type":"string","description":"The Claude model to use. See the [Models page](/overview/models) for available Claude model IDs.","required":true},"output_config":{"type":"object","description":"Configuration for response effort and output format. Field support depends on the selected Claude model.","properties":{"effort":{"type":"string","description":"Controls how much effort Claude applies to the response. `high` is the default for newer effort-capable models. Use `low` or `medium` for lower latency and cost, `xhigh` for advanced coding or agentic work when supported, and `max` only for the hardest tasks with a large `max_tokens` value.","enum":["low","medium","high","xhigh","max"]},"format":{"type":"object","description":"Structured output configuration. Use `{\"type\":\"json\",\"schema\":{...}}` to ask for JSON that matches your schema when the selected model supports structured output."}}},"service_tier":{"type":"string","description":"The service tier to use. `auto` tries priority capacity first, `standard_only` uses only standard capacity.","enum":["auto","standard_only"]},"stop_sequences":{"type":"array","description":"Custom strings that cause the model to stop generating when encountered. The stop sequence is not included in the response.","items":{"type":"string"}},"stream":{"type":"boolean","description":"If `true`, stream the response incrementally using Server-Sent Events (SSE). Events include `message_start`, `content_block_start`, `content_block_delta`, `content_block_stop`, `message_delta`, and `message_stop`."},"system":{"type":"string","description":"System prompt providing context and instructions to Claude. Can be a plain string or an array of content blocks (useful for prompt caching)."},"temperature":{"type":"number","description":"Model-dependent sampling control. Many newer Claude models reject non-default `temperature` values on the Messages API. Omit this field unless you have verified that the selected model accepts it; if the model returns an unsupported or deprecated-parameter error, remove the field instead of substituting another sampling value."},"thinking":{"type":"object","description":"Controls Claude thinking when the selected model supports a configurable thinking mode. For newer adaptive-thinking models, use `{\"type\":\"adaptive\"}` with `output_config.effort`, or omit `thinking` when adaptive thinking is already the model default. Manual `{\"type\":\"enabled\",\"budget_tokens\":...}` is supported only by older models and is rejected by newer Claude models.","properties":{"type":{"type":"string","description":"Thinking mode. `adaptive` lets the model decide when and how much to think. `disabled` turns thinking off only on models that support disabling it. `enabled` is the legacy manual-budget mode and is rejected by newer Claude models.","enum":["adaptive","disabled","enabled"]},"budget_tokens":{"type":"number","description":"Legacy manual-thinking token budget. Minimum: 1,024 when accepted. These tokens count toward `max_tokens`. Do not send this field to newer adaptive-thinking models that reject manual thinking budgets."},"display":{"type":"string","description":"Controls visible thinking blocks on models that support display selection. `summarized` returns a readable thinking summary; `omitted` returns an empty thinking field with continuity metadata where applicable.","enum":["summarized","omitted"]}}},"tool_choice":{"type":"object","description":"Controls how the model uses tools.","properties":{"type":{"type":"string","description":"The tool choice mode: `auto` (model decides), `any` (must use a tool), `tool` (must use a specific tool), or `none` (no tools).","enum":["auto","any","tool","none"]},"disable_parallel_tool_use":{"type":"boolean","description":"If `true`, prevent the model from calling multiple tools in parallel."},"name":{"type":"string","description":"The specific tool name to use. Required when `type` is `tool`."}}},"tools":{"type":"array","description":"Tools the model may use. Supports client-defined functions, web search (`web_search_20250305`), web fetch (`web_fetch_20250910`), code execution (`code_execution_20250522`), and more.","items":{"type":"object","properties":{"type":{"type":"string","description":"The tool type. Required for server tools (e.g., `web_search_20250305`, `web_fetch_20250910`, `code_execution_20250522`)."},"description":{"type":"string","description":"A description of what the tool does."},"input_schema":{"type":"object","description":"JSON Schema defining the tool's input parameters."},"max_uses":{"type":"number","description":"Maximum number of times this tool can be used in a single request."},"name":{"type":"string","description":"Tool name. The model repeats it in `tool_use` blocks when it calls the tool."}}}},"top_k":{"type":"number","description":"Model-dependent top-k sampling control. Many newer Claude models reject non-default `top_k` values on the Messages API. Omit this field unless you have verified support for the selected model."},"top_p":{"type":"number","description":"Model-dependent nucleus sampling control. Many newer Claude models reject non-default `top_p` values on the Messages API. Omit this field unless you have verified support for the selected model. Do not set `temperature` and `top_p` together."}}},"example":{"max_tokens":"","messages":[],"metadata":{},"model":"","output_config":{},"service_tier":"","stop_sequences":[],"stream":"","system":"","temperature":"","thinking":{},"tool_choice":{},"tools":[],"top_k":"","top_p":""}}}}}},"/v1/chat/completions":{"post":{"tags":["Chat"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/v1/chat/completions"},"summary":"Chat Completions","description":"Routes chat requests across multiple model providers. Request parameters and response fields can vary significantly by provider, so check the official documentation for the provider behind the model you use when you need provider-specific parameters or behavior details.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"frequency_penalty":{"type":"number","description":"Number between -2.0 and 2.0. Positive values penalize tokens proportionally to how often they have appeared, reducing verbatim repetition."},"logit_bias":{"type":"object","description":"A JSON object mapping token IDs to bias values from -100 to 100. The bias is added to the model's logits before sampling. Values between -1 and 1 subtly adjust likelihood; -100 or 100 effectively ban or force selection of a token.","properties":{}},"logprobs":{"type":"boolean","description":"Whether to return log probabilities of the output tokens."},"max_completion_tokens":{"type":"number","description":"An upper bound for the number of tokens to generate, including visible output tokens and reasoning tokens. Use this instead of `max_tokens` for GPT-4.1+, GPT-5 series, and o-series models."},"max_tokens":{"type":"number","description":"Maximum number of tokens to generate in the completion. The total of input + output tokens is capped by the model's context length."},"messages":{"type":"array","description":"A list of messages forming the conversation. Each message has a `role` (`system`, `user`, `assistant`, or `developer`) and `content` (text string or multimodal content array).","required":true,"items":{"type":"object","properties":{"content":{"type":"string","description":"The message content. Can be a text string or an array of content objects for multimodal input (text + images)."},"role":{"type":"string","description":"The role of the message author. Common values: `system` (recommended for system-level instructions), `user`, `assistant`, `tool`. Newer OpenAI models may also accept `developer` instead of `system`.","enum":["system","user","assistant","tool","developer"]}}}},"model":{"type":"string","description":"Model ID to use for this request. See the [Models page](/overview/models) for current options.","required":true},"n":{"type":"number","description":"Number of completion choices to generate for each input message. Defaults to 1."},"presence_penalty":{"type":"number","description":"Number between -2.0 and 2.0. Positive values penalize tokens based on whether they have already appeared, encouraging the model to explore new topics."},"reasoning_effort":{"type":"string","description":"Controls the reasoning effort for o-series and GPT-5.1+ models.","enum":["low","medium","high"]},"response_format":{"type":"object","description":"Specifies the output format. Use `{\"type\": \"json_object\"}` for JSON mode, or `{\"type\": \"json_schema\", \"json_schema\": {...}}` for strict structured output.","properties":{"type":{"type":"string","description":"Output format type: `text` (default), `json_object`, or `json_schema`.","enum":["text","json_object","json_schema"]},"json_schema":{"type":"object","description":"The JSON Schema definition."}}},"service_tier":{"type":"string","description":"Specifies the processing tier.","enum":["auto","default","flex","priority"]},"stop":{"type":"string","description":"Up to 4 sequences where the API will stop generating further tokens. Can be a string or an array of strings."},"stream":{"type":"boolean","description":"If `true`, partial response tokens are delivered incrementally via server-sent events (SSE). The stream ends with a `data: [DONE]` message."},"stream_options":{"type":"object","description":"Options for streaming. Only valid when `stream` is `true`.","properties":{"include_usage":{"type":"boolean","description":"If true, includes usage stats in the final streaming chunk."}}},"temperature":{"type":"number","description":"Sampling temperature between 0 and 2. Higher values (e.g., 0.8) produce more random output; lower values (e.g., 0.2) make output more focused and deterministic. Recommended to adjust this or `top_p`, but not both."},"tool_choice":{"type":"string","description":"Controls how the model selects tools. `auto` (default): model decides. `none`: no tools. `required`: must call a tool."},"tools":{"type":"array","description":"A list of tools the model may call. Currently supports `function` type tools.","items":{"type":"object","properties":{"type":{"type":"string","description":"Tool type. Use `function`.","enum":["function"]},"function":{"type":"object","description":"The function definition the model may call."}}}},"top_logprobs":{"type":"number","description":"Number of most likely tokens to return at each position (0-20). Requires `logprobs` to be `true`."},"top_p":{"type":"number","description":"Nucleus sampling parameter. The model considers only the tokens whose cumulative probability reaches `top_p`. For example, 0.1 means only the top 10% probability tokens are considered. Recommended to adjust this or `temperature`, but not both."},"user":{"type":"string","description":"A unique identifier for your end-user. Helps with abuse detection and monitoring."}}},"example":{"frequency_penalty":"","logit_bias":{},"logprobs":"","max_completion_tokens":"","max_tokens":"","messages":[],"model":"","n":"","presence_penalty":"","reasoning_effort":"","response_format":{},"service_tier":"","stop":"","stream":"","stream_options":{},"temperature":"","tool_choice":"","tools":[],"top_logprobs":"","top_p":"","user":""}}}}}},"/v1/embeddings":{"post":{"tags":["Embeddings"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/v1/embeddings"},"summary":"Create Embeddings","description":"Create Embeddings","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"dimensions":{"type":"number","description":"The number of dimensions for the output embedding vector. Only supported by `text-embedding-3-*` models. Reducing dimensions can lower storage costs while maintaining most of the embedding's utility."},"encoding_format":{"type":"string","description":"The format of the returned embedding vectors. `float` returns an array of floating-point numbers. `base64` returns a base64-encoded string representation, which can reduce response size for large batches.","enum":["float","base64"]},"input":{"type":"string","description":"The text to embed. Can be a single string, an array of strings, or an array of token arrays. Each input must not exceed the model's maximum token limit (8,191 tokens for `text-embedding-3-*` models).","required":true},"model":{"type":"string","description":"The embedding model to use. See the [Models page](/overview/models) for current embedding model IDs.","required":true},"user":{"type":"string","description":"A unique identifier for your end-user, which can help monitor and detect abuse."}}},"example":{"dimensions":"","encoding_format":"","input":"","model":"","user":""}}}}}},"/v1beta/models/{model}/{operator}":{"post":{"tags":["Gemini"],"parameters":[{"name":"model","in":"path","description":"Gemini model ID. Example: `gemini-3-flash-preview`, `gemini-2.5-pro`. See the [Models page](/overview/models) for current options.","required":true,"schema":{"type":"string","example":""}},{"name":"operator","in":"path","description":"The operation to perform. Use `generateContent` for synchronous responses, or `streamGenerateContent?alt=sse` for Server-Sent Events streaming.","required":true,"schema":{"type":"string","example":"","items":{"type":"string","enum":["generateContent","streamGenerateContent?alt=sse"]}}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/v1beta/models/{model}:{operator}"},"summary":"Gemini Generating Content","description":"Generates content using Google Gemini models via the native Gemini API format. Supports text generation, multimodal inputs, thinking/reasoning, function calling, Google Search grounding, structured output, and streaming. CometAPI proxies requests to Google's Gemini API — use this endpoint when you need Gemini-native features not available through the OpenAI-compatible endpoint.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"cachedContent":{"type":"string","description":"The name of cached content to use as context. Format: `cachedContents/{id}`. See the Gemini context caching documentation for details."},"contents":{"type":"array","description":"Conversation content. Each entry has an optional `role` (`user` or `model`) and a `parts` array.","items":{"type":"object","properties":{"parts":{"type":"string","description":"The content parts for this turn. Supports text, inline base64 media, public file URLs, and function call results."},"role":{"type":"string","description":"The role of the content author. Use `user` for user messages and `model` for assistant responses in multi-turn conversations. Can be omitted for single-turn requests.","enum":["user","model"]}}}},"generationConfig":{"type":"object","description":"Configuration for model generation behavior including temperature, output length, and response format.","properties":{"candidateCount":{"type":"number","description":"Number of response candidates to generate. Defaults to 1. Not supported by Gemini 1.0 models."},"frequencyPenalty":{"type":"number","description":"Penalizes tokens proportionally to how many times they have appeared. Positive values discourage repetition."},"imageConfig":{"type":"object","description":"Configuration for image generation. Only applicable to models that support image output."},"logprobs":{"type":"number","description":"Number of top log probabilities to return per token (0–20). Only valid when `responseLogprobs` is `true`."},"maxOutputTokens":{"type":"number","description":"Maximum number of tokens in the generated response. The default varies by model."},"mediaResolution":{"type":"string","description":"Resolution for processing input media files.","enum":["MEDIA_RESOLUTION_LOW","MEDIA_RESOLUTION_MEDIUM","MEDIA_RESOLUTION_HIGH"]},"presencePenalty":{"type":"number","description":"Penalizes tokens that have already appeared in the response (binary on/off per token). Positive values encourage diverse vocabulary."},"responseLogprobs":{"type":"boolean","description":"If `true`, include log probabilities in the response."},"responseMimeType":{"type":"string","description":"The MIME type for the response. Use `application/json` for JSON mode, `text/x.enum` for enum output, or `text/plain` (default) for free text.","enum":["text/plain","application/json","text/x.enum"]},"responseModalities":{"type":"array","description":"The expected modalities in the response. Use `[\"TEXT\"]` for text-only, `[\"IMAGE\"]` for images, or `[\"TEXT\", \"IMAGE\"]` for both. An empty list defaults to text only."},"responseSchema":{"type":"object","description":"Output schema for structured responses (JSON Schema subset). Requires `responseMimeType` to be `application/json`."},"seed":{"type":"number","description":"Seed for deterministic generation. If not set, a random seed is used."},"stopSequences":{"type":"array","description":"Up to 5 character sequences that will stop output generation. The stop sequence is not included in the response."},"temperature":{"type":"number","description":"Controls randomness in output generation. Range: 0.0–2.0. For Gemini 3 models, keeping the default (1.0) is strongly recommended — lower values may cause looping or degraded reasoning."},"thinkingConfig":{"type":"object","description":"Controls the model's internal reasoning (thinking) process. Supported by Gemini 2.5 and later models."},"topK":{"type":"number","description":"Maximum number of tokens to consider when sampling. Not supported by all models."},"topP":{"type":"number","description":"Nucleus sampling threshold. Tokens are considered in order of probability until the cumulative probability reaches this value."}}},"safetySettings":{"type":"array","description":"Safety filter settings. Override default thresholds for specific harm categories.","items":{"type":"object","properties":{"category":{"type":"string","description":"The harm category to configure.","enum":["HARM_CATEGORY_HARASSMENT","HARM_CATEGORY_HATE_SPEECH","HARM_CATEGORY_SEXUALLY_EXPLICIT","HARM_CATEGORY_DANGEROUS_CONTENT","HARM_CATEGORY_CIVIC_INTEGRITY"]},"threshold":{"type":"string","description":"The blocking threshold for this category.","enum":["BLOCK_NONE","BLOCK_ONLY_HIGH","BLOCK_MEDIUM_AND_ABOVE","BLOCK_LOW_AND_ABOVE","OFF"]}}}},"systemInstruction":{"type":"object","description":"System instructions that guide the model's behavior across the entire conversation. Text only.","properties":{"parts":{"type":"array","description":"Content parts of the system instruction."}}},"toolConfig":{"type":"object","description":"Configuration for tool usage, such as function calling mode.","properties":{"functionCallingConfig":{"type":"object","description":"Configuration for function calling behavior."},"retrievalConfig":{"type":"object","description":"Configuration for retrieval-based tools (e.g., Google Maps location context)."}}},"tools":{"type":"array","description":"Tools the model may use to generate responses. Supports function declarations, Google Search, Google Maps, and code execution.","items":{"type":"object","properties":{"codeExecution":{"type":"object","description":"Enable code execution. Pass an empty object `{}` to enable."},"functionDeclarations":{"type":"array","description":"A list of function declarations for function calling."},"googleMaps":{"type":"object","description":"Enable Google Maps grounding. Pass an empty object `{}` to enable."},"googleSearch":{"type":"object","description":"Enable Google Search grounding. Pass an empty object `{}` to enable."}}}}}},"example":{"cachedContent":"","contents":[],"generationConfig":{},"safetySettings":[],"systemInstruction":{},"toolConfig":{},"tools":[]}}}}}},"/v1/responses":{"post":{"tags":["Responses"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/v1/responses"},"summary":"Create Response","description":"Create Response","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"text":{"type":"object","description":"Configuration for text output. Use this to request structured JSON output via JSON mode or JSON Schema.","properties":{"format":{"type":"object","description":"The format of the text output."},"verbosity":{"type":"string","description":"Controls the verbosity of the text output.","enum":["low","medium","high"]}}},"background":{"type":"boolean","description":"Whether to run the model response in the background. Background responses do not return output directly — you retrieve the result later via the response ID."},"context_management":{"type":"array","description":"Context management configuration for this request. Controls how the model manages context when the conversation exceeds the context window.","items":{"type":"object","properties":{"type":{"type":"string","description":"The type of context management."},"compact_threshold":{"type":"number","description":"The threshold at which context compaction is triggered."}}}},"conversation":{"type":"string","description":"The conversation this response belongs to. Items from the conversation are prepended to `input` for context. Input and output items are automatically added to the conversation after the response completes. Cannot be used with `previous_response_id`."},"include":{"type":"array","description":"Additional output data to include in the response. Use this to request extra information that is not included by default.","items":{"type":"string"}},"input":{"type":"string","description":"Text, image, or file inputs to the model, used to generate a response. Can be a simple string for text-only input, or an array of input items for multimodal content (images, files) and multi-turn conversations.","required":true},"instructions":{"type":"string","description":"A system (or developer) message inserted into the model's context. When used with `previous_response_id`, instructions from the previous response are not carried over — this makes it easy to swap system messages between turns."},"max_output_tokens":{"type":"number","description":"An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens."},"max_tool_calls":{"type":"number","description":"The maximum number of total calls to built-in tools that can be processed in a response. This limit applies across all built-in tool calls, not per individual tool. Any further tool call attempts by the model will be ignored."},"metadata":{"type":"object","description":"Set of up to 16 key-value pairs that can be attached to the response. Useful for storing additional information in a structured format. Keys have a maximum length of 64 characters; values have a maximum length of 512 characters.","properties":{}},"model":{"type":"string","description":"Model ID to use for this request. See the [Models page](/overview/models) for current options.","required":true},"parallel_tool_calls":{"type":"boolean","description":"Whether to allow the model to run tool calls in parallel."},"previous_response_id":{"type":"string","description":"The unique ID of a previous response. Use this to create multi-turn conversations without manually managing conversation state. Cannot be used with `conversation`."},"prompt":{"type":"object","description":"Reference to a prompt template and its variables.","properties":{"id":{"type":"string","description":"The ID of the prompt template."},"variables":{"type":"object","description":"Key-value pairs for template variables."},"version":{"type":"string","description":"The version of the prompt template to use."}}},"prompt_cache_key":{"type":"string","description":"A key used to cache responses for similar requests, helping optimize cache hit rates. Replaces the deprecated `user` field for caching purposes."},"prompt_cache_retention":{"type":"string","description":"The retention policy for the prompt cache. Set to `24h` to keep cached prefixes active for up to 24 hours.","enum":["in-memory","24h"]},"reasoning":{"type":"object","description":"Configuration options for reasoning models (o-series and gpt-5). Controls the depth of reasoning before generating a response.","properties":{"effort":{"type":"string","description":"Constrains effort on reasoning. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning.","enum":["none","minimal","low","medium","high"]},"generate_summary":{"type":"string","description":"Whether to generate a summary of the reasoning process.","enum":["auto","concise","detailed"]},"summary":{"type":"string","description":"Deprecated. Use `generate_summary` instead.","enum":["auto","concise","detailed"]}}},"safety_identifier":{"type":"string","description":"A stable identifier for your end-users, used to help detect policy violations. Should be a hashed username or email — do not send identifying information directly."},"service_tier":{"type":"string","description":"Specifies the processing tier for the request. When set, the response will include the actual `service_tier` used.\n\n- `auto`: Uses the tier configured in project settings (default behavior).\n- `default`: Standard pricing and performance.\n- `flex`: Flexible processing with potential cost savings.\n- `priority`: Priority processing with faster response times.","enum":["auto","default","flex","priority"]},"store":{"type":"boolean","description":"Whether to store the generated response for later retrieval via API."},"stream":{"type":"boolean","description":"If set to `true`, the response data will be streamed to the client as it is generated using server-sent events (SSE). Events include `response.created`, `response.output_text.delta`, `response.completed`, and more."},"stream_options":{"type":"object","description":"Options for streaming responses. Only set this when `stream` is `true`.","properties":{"include_obfuscation":{"type":"boolean","description":"Whether to include obfuscation data in streaming events."}}},"temperature":{"type":"number","description":"Sampling temperature between 0 and 2. Higher values (e.g., 0.8) increase randomness; lower values (e.g., 0.2) make output more focused and deterministic. We recommend adjusting either this or `top_p`, but not both."},"tool_choice":{"type":"string","description":"Controls how the model selects which tool(s) to call.\n\n- `auto` (default): The model decides whether and which tools to call.\n- `none`: The model will not call any tools.\n- `required`: The model must call at least one tool.\n- An object specifying a particular tool to use."},"tools":{"type":"array","description":"An array of tools the model may call while generating a response. CometAPI supports three categories:\n\n- **Built-in tools**: Platform-provided tools like `web_search_preview` and `file_search`.\n- **Function calls**: Custom functions you define, enabling the model to call your own code with structured arguments.\n- **MCP tools**: Integrations with third-party systems via MCP servers.","items":{"type":"object","properties":{}}},"top_logprobs":{"type":"number","description":"Number of most likely tokens to return at each position (0–20), each with an associated log probability. Must include `message.output_text.logprobs` in the `include` parameter to receive logprobs."},"top_p":{"type":"number","description":"Nucleus sampling parameter. The model considers tokens with `top_p` cumulative probability mass. For example, 0.1 means only the top 10% probability tokens are considered. We recommend adjusting either this or `temperature`, but not both."},"truncation":{"type":"string","description":"The truncation strategy for handling inputs that exceed the model's context window.\n\n- `auto`: The model truncates the input by dropping items from the beginning of the conversation to fit.\n- `disabled` (default): The request fails with a 400 error if the input exceeds the context window.","enum":["auto","disabled"]},"user":{"type":"string","description":"Deprecated. Use `safety_identifier` and `prompt_cache_key` instead. A stable identifier for your end-user."}}},"example":{"text":{},"background":"","context_management":[],"conversation":"","include":[],"input":"","instructions":"","max_output_tokens":"","max_tool_calls":"","metadata":{},"model":"","parallel_tool_calls":"","previous_response_id":"","prompt":{},"prompt_cache_key":"","prompt_cache_retention":"","reasoning":{},"safety_identifier":"","service_tier":"","store":"","stream":"","stream_options":{},"temperature":"","tool_choice":"","tools":[],"top_logprobs":"","top_p":"","truncation":"","user":""}}}}}},"/v1/videos/{task_id}/content":{"get":{"tags":["Video"],"parameters":[{"name":"task_id","in":"path","description":"Task ID returned by POST /v1/videos.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/v1/videos/{task_id}/content"},"summary":"Download Flux 3 video content","description":"Download the generated MP4 file after a Flux 3 video task reaches completed status.","security":[{"bearerAuth":[]}]}},"/v1/videos/{task_id}":{"get":{"tags":["Video"],"parameters":[{"name":"task_id","in":"path","description":"Task ID returned by POST /v1/videos.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/v1/videos/{task_id}"},"summary":"Retrieve a Flux 3 video task","description":"Read the state of a Flux 3 video task that was created through POST /v1/videos.","security":[{"bearerAuth":[]}]}},"/v1/videos":{"post":{"tags":["Video"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/v1/videos"},"summary":"Create a Flux 3 video task","description":"Create a Flux 3 video from a text prompt or from a text prompt and one reference image.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/kling/v1/{action}/{action2}/{task_id}":{"get":{"tags":["Kling"],"parameters":[{"name":"action","in":"path","description":"Resource type. One of: `images`, `videos`, `audio`.","required":true,"schema":{"type":"string","example":""}},{"name":"action2","in":"path","description":"Sub-action matching the resource type. For `images`: `generations`, `kolors-virtual-try-on`. For `videos`: `text2video`, `image2video`, `motion-control`, `lip-sync`, `effects`, `multi-image2video`, `multi-elements`. For `audio`: `text-to-audio`, `video-to-audio`.","required":true,"schema":{"type":"string","example":""}},{"name":"task_id","in":"path","description":"Task ID","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/{action}/{action2}/{task_id}"},"summary":"Individual queries","description":"The example uses `videos/text2video`; substitute the action segments that match your task type, such as `images/generations` or `audio/text-to-audio`.","security":[{"bearerAuth":[]}]}},"/kling/v1/videos/omni-video/{task_id}":{"get":{"tags":["Kling"],"parameters":[{"name":"task_id","in":"path","description":"Task id returned by the Omni Video endpoint.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/videos/omni-video/{task_id}"},"summary":"Omni Query","description":"Omni Query","security":[{"bearerAuth":[]}]}},"/kling/v1/videos/multi-elements/add-selection":{"post":{"tags":["Kling"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/videos/multi-elements/add-selection"},"summary":"Add selection points to a Kling multimodal session","description":"Place normalized point coordinates on a chosen frame within the current session.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"frame_index":{"type":"number","description":"Frame number\n\nSupports adding up to 10 marked frames, meaning video selections can be marked based on a maximum of 10 frames.\nOnly 1 frame can be marked at a time.","required":true},"points":{"type":"array","description":"Click coordinates, represented by x and y.\nValue range: [0,1], expressed as a percentage; [0,1] represents the top-left corner of the frame.\nSupports adding multiple marked points simultaneously, with a maximum of 10 points per frame.","required":true,"items":{"type":"object","properties":{"x":{"type":"number","description":"Value"},"y":{"type":"number","description":"Value"}}}},"session_id":{"type":"string","description":"Selection session id returned by init-selection. Follow-up calls must use the same account and exact session id.","required":true}}},"example":{"frame_index":"","points":[],"session_id":""}}}}}},"/kling/v1/videos/multi-elements/clear-selection":{"post":{"tags":["Kling"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/videos/multi-elements/clear-selection"},"summary":"Clear Video Selection","description":"Clear Video Selection","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"session_id":{"type":"string","description":"Session id returned by the video initialization endpoint.","required":true}}},"example":{"session_id":""}}}}}},"/kling/v1/videos/multi-elements":{"post":{"tags":["Kling"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/videos/multi-elements"},"summary":"Create a Kling multimodal edit task","description":"Send the `session_id`, `edit_mode`, and final edit prompt after the selection area has already been prepared.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"callback_url":{"type":"string","description":"Webhook URL to receive task status updates."},"duration":{"type":"string","description":"Requested output duration in seconds."},"edit_mode":{"type":"string","description":"Editing operation for the selected video region. Use `addition` to add an element, `swap` to replace a selected element, or `removal` to remove it.","required":true,"enum":["addition","swap","removal"]},"external_task_id":{"type":"string","description":"Custom task id for your own tracking. Must be unique per account."},"image_list":{"type":"array","description":"Image references used by `addition` and `swap` tasks. Omit this field for `removal` tasks.","items":{"type":"object","properties":{"image":{"type":"string","description":"Value","required":true}}}},"mode":{"type":"string","description":"Generation mode. Use `std` or `pro`.","enum":["std","pro"]},"model_name":{"type":"string","description":"Kling model variant for the final edit task. Omit to use `kling-v1-6`.","enum":["kling-v1-6"]},"negative_prompt":{"type":"string","description":"Elements to avoid in the edited result."},"prompt":{"type":"string","description":"Instruction describing the desired edit. Reference the source video as `<<<video_1>>>` and any reference image as `<<<image_1>>>`.","required":true},"session_id":{"type":"string","description":"Selection session id returned by init-selection. Follow-up calls must use the same account and exact session id.","required":true}}},"example":{"callback_url":"","duration":"","edit_mode":"","external_task_id":"","image_list":[],"mode":"","model_name":"","negative_prompt":"","prompt":"","session_id":""}}}}}},"/kling/v1/videos/multi-elements/delete-selection":{"post":{"tags":["Kling"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/videos/multi-elements/delete-selection"},"summary":"Delete Video Selection","description":"Delete Video Selection","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"frame_index":{"type":"number","description":"Frame index where the selected point set applies.","required":true},"points":{"type":"array","description":"Points to delete from the current selection.","required":true,"items":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal coordinate as a 0-1 frame percentage.","required":true},"y":{"type":"number","description":"Vertical coordinate as a 0-1 frame percentage.","required":true}}}},"session_id":{"type":"string","description":"Selection session id returned by init-selection. Follow-up calls must use the same account and exact session id.","required":true}}},"example":{"frame_index":"","points":[],"session_id":""}}}}}},"/kling/v1/videos/multi-elements/init-selection":{"post":{"tags":["Kling"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/videos/multi-elements/init-selection"},"summary":"Initialize a Kling multimodal editing session","description":"Send exactly one source: either `video_id` from a completed Kling video task, or `video_url` for an already-hosted video. The response opens the session used by later selection-editing calls.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"video_id":{"type":"string","description":"Kling video id from a completed task. Send exactly one of video_id or video_url."},"video_url":{"type":"string","description":"Public MP4 or MOV URL. Send exactly one of video_id or video_url."}}},"example":{"video_id":"","video_url":""}}}}}},"/kling/v1/videos/multi-elements/preview-selection":{"post":{"tags":["Kling"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/videos/multi-elements/preview-selection"},"summary":"Preview Selected Video Area","description":"Preview Selected Video Area","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"session_id":{"type":"string","description":"Session id returned by the video initialization endpoint.","required":true}}},"example":{"session_id":""}}}}}},"/kling/v1/videos/avatar/image2video":{"post":{"tags":["Kling"],"parameters":[{"name":"Content-Type","in":"query","description":"Optional content type header.","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/videos/avatar/image2video"},"summary":"Create a Kling avatar task","description":"Submit one avatar image and exactly one audio source. Poll the returned task id through the generic Kling query route.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"audio_id":{"type":"string","description":"Audio id from a prior Kling audio task."},"image":{"type":"string","description":"Avatar image URL or base64 image string. Use an image that meets Kling pixel requirements; very small thumbnails are rejected.","required":true},"mode":{"type":"string","description":"Generation mode. Use `std` or `pro`; omitted requests use `std`.","enum":["std","pro"]},"prompt":{"type":"string","description":"Prompt describing the desired avatar performance.","required":true},"sound_file":{"type":"string","description":"Public audio URL when you provide your own audio."},"task_id":{"type":"string","description":"Optional prior task id associated with the referenced audio asset."}}},"example":{"audio_id":"","image":"","mode":"","prompt":"","sound_file":"","task_id":""}}}}}},"/kling/v1/videos/advanced-lip-sync":{"post":{"tags":["Kling"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/videos/advanced-lip-sync"},"summary":"Create an advanced Kling lip-sync task","description":"Submit the `session_id` returned by face identification plus one or more `face_choose` mappings that connect target faces to audio segments.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"callback_url":{"type":"string","description":"Webhook URL to receive task status updates."},"external_task_id":{"type":"string","description":"Custom task id for your own tracking. Must be unique per account."},"face_choose":{"type":"array","description":"One or more face/audio mappings to synthesize.","required":true,"items":{"type":"object","properties":{"audio_id":{"type":"string","description":"Audio id from a prior audio task."},"face_id":{"type":"string","description":"Face id returned by identify-face.","required":true},"original_sound_volume":{"type":"number","description":"Volume for the original video audio."},"sound_end_time":{"type":"string","description":"End time within the audio source, in milliseconds. The clipped segment must be at least 2000 ms and must not exceed the source audio duration."},"sound_file":{"type":"string","description":"Public audio URL when you provide your own audio."},"sound_insert_time":{"type":"string","description":"Insertion time in the target video, in milliseconds."},"sound_start_time":{"type":"string","description":"Start time within the audio source, in milliseconds."},"sound_volume":{"type":"number","description":"Volume for the inserted audio."}}}},"session_id":{"type":"string","description":"Session id returned by identify-face.","required":true}}},"example":{"callback_url":"","external_task_id":"","face_choose":[],"session_id":""}}}}}},"/kling/v1/videos/image-recognize":{"post":{"tags":["Kling"],"parameters":[{"name":"Content-Type","in":"query","description":"Optional content type header.","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/videos/image-recognize"},"summary":"Run Kling image recognition","description":"Submit one image and receive recognition flags such as head, face, cloth, or object segmentation presence.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"image":{"type":"string","description":"Image to analyze. Accepts an image URL or raw Base64 string (no `data:` prefix). Supported formats: JPG, JPEG, PNG. Max 10 MB, minimum 300 px per side, aspect ratio between 1:2.5 and 2.5:1.","required":true}}},"example":{"image":""}}}}}},"/kling/v1/videos/image2video":{"post":{"tags":["Kling"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/videos/image2video"},"summary":"Create a Kling image-to-video task","description":"Submit one source image and receive a task id for later polling.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"callback_url":{"type":"string","description":"Webhook URL to receive task status updates when the task completes."},"cfg_scale":{"type":"number","description":"Prompt adherence strength. Higher values follow the prompt more closely. Range: 0–1."},"duration":{"type":"string","description":"Output video length in seconds. Use `5` or `10`; omit to use `5`."},"dynamic_masks":{"type":"array","description":"Optional motion masks. Each entry contains a mask image and an ordered trajectory list.","items":{"type":"object","properties":{"mask":{"type":"string","description":"Mask image URL or base64 string for the moving area.","required":true},"trajectories":{"type":"array","description":"Trajectory points for the masked area.","required":true}}}},"external_task_id":{"type":"string","description":"Custom task id for your own tracking. Does not replace the system-generated task id but can be used to query tasks. Must be unique per user."},"image":{"type":"string","description":"Source image URL or base64 image string. Use an image that meets Kling pixel requirements; very small thumbnails are rejected. For base64 input, send the encoded image string as the field value.","required":true},"image_tail":{"type":"string","description":"Tail-frame reference image as a Base64 string or public URL. Same format requirements as `image`. Controls the last frame of the generated video."},"mode":{"type":"string","description":"Generation mode. `std` for standard (faster), `pro` for professional (higher quality).","enum":["std","pro"]},"model_name":{"type":"string","description":"Model ID for this image-to-video request. Use `kling-v3` for new requests. Use Omni model IDs only with the Omni Video endpoint.","enum":["kling-v1","kling-v1-5","kling-v1-6","kling-v2-master","kling-v2-1","kling-v2-1-master","kling-v2-5-turbo","kling-v2-6","kling-v3"]},"negative_prompt":{"type":"string","description":"Elements to exclude from the video. Maximum 200 characters."},"prompt":{"type":"string","description":"Text prompt describing the desired motion. Maximum 500 characters."},"sound":{"type":"string","description":"Optional generated-audio switch for models that support video sound. Use `on` or `off`, or omit the field for the model default.","enum":["on","off"]},"static_mask":{"type":"string","description":"Static brush mask image as a Base64 string or public URL. White areas are frozen in place during video generation. Must match the aspect ratio and resolution of the input image."}}},"example":{"callback_url":"","cfg_scale":"","duration":"","dynamic_masks":[],"external_task_id":"","image":"","image_tail":"","mode":"","model_name":"","negative_prompt":"","prompt":"","sound":"","static_mask":""}}}}}},"/kling/v1/videos/identify-face":{"post":{"tags":["Kling"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/videos/identify-face"},"summary":"Lip-Sync","description":"Lip-Sync","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"video_id":{"type":"string","description":"Kling video id from a completed task. Send either video_id or video_url."},"video_url":{"type":"string","description":"Public MP4 or MOV URL. Send either video_id or video_url."}}},"example":{"video_id":"","video_url":""}}}}}},"/kling/v1/videos/motion-control":{"post":{"tags":["Kling"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/videos/motion-control"},"summary":"Create a Kling Motion Control task","description":"Submit a character image and a reference motion video. The response contains a task ID that you can use for status queries.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"callback_url":{"type":"string","description":"Optional callback field in the compatible structure. Provide a URI, or omit the field or send an empty string when no callback URI is configured."},"character_orientation":{"type":"string","description":"Required compatible string enum. With `image`, the reference video can be 3 to 10 seconds long. With `video`, the reference video can be 3 to 30 seconds long.","required":true,"enum":["image","video"]},"element_list":{"type":"array","description":"Optional compatible Element structure. Provide at most one object, and combine this field only with `character_orientation: video`.","items":{"type":"object","properties":{"element_id":{"type":"number","description":"Kling Element ID in the compatible structure.","required":true}}}},"external_task_id":{"type":"string","description":"Optional ID for correlation in your application. The value must be unique for your account. Store the returned `task_id` for CometAPI status queries."},"image_url":{"type":"string","description":"Character image as a public URL or a raw Base64 string. Send raw Base64 without a `data:image/...;base64,` prefix; data-URI input is outside the compatible contract. Supported formats are JPG, JPEG, and PNG. The image must be 10 MB or smaller. Its width and height must each be from 300 through 65,536 pixels, and its aspect ratio must be between 1:2.5 and 2.5:1.","required":true},"keep_original_sound":{"type":"string","description":"Compatible string enum. Accepted values are `yes` and `no`. Omitted requests use `yes`.","enum":["yes","no"]},"mode":{"type":"string","description":"Both compatible models accept `std` and `pro`. Omitted requests use `std`.","enum":["std","pro"]},"model_name":{"type":"string","description":"Model ID for this compatible Motion Control request. Omit this field to use `kling-v2-6`. The `kling-v3` value keeps this compatible request shape; it does not select the separate Kling 3.0 path-version contract.","enum":["kling-v2-6","kling-v3"]},"prompt":{"type":"string","description":"Optional text field in the compatible request structure. Maximum 2500 characters."},"video_url":{"type":"string","description":"Public reference motion video URL. Use an MP4 or MOV file that is 100 MB or smaller. The short edge must be at least 340 pixels, and the long edge must not exceed 3850 pixels. The video must be at least 3 seconds long. The maximum duration depends on `character_orientation`.","required":true},"watermark_info":{"type":"object","description":"Optional compatible watermark structure.","properties":{"enabled":{"type":"boolean","description":"Boolean flag in the compatible watermark structure.","required":true}}}}},"example":{"callback_url":"","character_orientation":"","element_list":[],"external_task_id":"","image_url":"","keep_original_sound":"","mode":"","model_name":"","prompt":"","video_url":"","watermark_info":{}}}}}}},"/kling/v1/videos/multi-image2video":{"post":{"tags":["Kling"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/videos/multi-image2video"},"summary":"Create a Kling multi-image-to-video task","description":"Submit 2 to 4 images plus a motion prompt and receive a task id for later polling.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"aspect_ratio":{"type":"string","description":"Requested frame aspect ratio when the model needs an explicit frame shape.","enum":["16:9","9:16","1:1"]},"callback_url":{"type":"string","description":"Webhook URL to receive task status updates."},"duration":{"type":"string","description":"Output video length in seconds. Use `5` or `10`; omitted requests use `5`."},"external_task_id":{"type":"string","description":"Custom task id for your own tracking. Must be unique per account."},"image_list":{"type":"array","description":"Input image references. Provide 1 to 4 items that meet Kling pixel requirements; very small thumbnails are rejected.","required":true,"items":{"type":"object","properties":{"image":{"type":"string","description":"Image URL or base64 image string.","required":true}}}},"mode":{"type":"string","description":"Generation mode. Use `std` or `pro`; omitted requests use `std`.","enum":["std","pro"]},"model_name":{"type":"string","description":"Kling model variant for multi-image video. Omit to use `kling-v1-6`.","enum":["kling-v1-6"]},"negative_prompt":{"type":"string","description":"Elements to avoid in the generated video."},"prompt":{"type":"string","description":"Text prompt describing the desired motion and scene."}}},"example":{"aspect_ratio":"","callback_url":"","duration":"","external_task_id":"","image_list":[],"mode":"","model_name":"","negative_prompt":"","prompt":""}}}}}},"/kling/v1/videos/omni-video":{"post":{"tags":["Kling"],"parameters":[{"name":"Content-Type","in":"query","description":"Content type of the request body.","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/videos/omni-video"},"summary":"Omni Video (Beta)","description":"Omni Video (Beta)","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"aspect_ratio":{"type":"string","description":"Aspect ratio request for beta Kling Omni generation. The endpoint does not expose an exact size field; a 16:9 text-to-video request can render as 1920x1080.","enum":["16:9","9:16","1:1"]},"callback_url":{"type":"string","description":"Webhook URL for task status notifications. The server sends a callback when the task status changes."},"duration":{"type":"string","description":"Requested output length for text-to-video and first-frame image-reference workflows. Use `5` or `10` as a string.","enum":["5","10"]},"external_task_id":{"type":"string","description":"Optional user-defined task ID for your own tracking. Does not replace the system-generated task ID. Must be unique per account."},"image_list":{"type":"array","description":"Optional first-frame image reference for image-referenced Omni generation.","items":{"type":"object","properties":{"type":{"type":"string","description":"Reference role for this image. Use `first_frame` for the first video frame.","required":true,"enum":["first_frame"]},"image_url":{"type":"string","description":"Image URL or Base64 image string.","required":true}}}},"mode":{"type":"string","description":"Generation mode. Use `std` for standard generation or `pro` when the selected model supports the higher-quality mode.","enum":["std","pro"]},"model_name":{"type":"string","description":"Optional model ID for this Kling Omni video request. Omit this field to use the route default."},"prompt":{"type":"string","description":"Text prompt describing the desired video. Maximum length is 2,500 characters. When you send `image_list`, reference the image with `<<<image_1>>>`.","required":true},"sound":{"type":"string","description":"Whether to generate audio with the video. Use `on` or `off`.","enum":["on","off"]},"watermark_info":{"type":"object","description":"Watermark options. When `enabled` is `true`, the task can return watermarked result URLs in addition to original result URLs.","properties":{"enabled":{"type":"boolean","description":"Whether to request watermarked result URLs."}}}}},"example":{"aspect_ratio":"","callback_url":"","duration":"","external_task_id":"","image_list":[],"mode":"","model_name":"","prompt":"","sound":"","watermark_info":{}}}}}}},"/kling/v1/audio/text-to-audio":{"post":{"tags":["Kling"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/audio/text-to-audio"},"summary":"Create a Kling text-to-audio task","description":"Submit a text prompt and duration, then poll the returned task id through the generic Kling query route.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"callback_url":{"type":"string","description":"Webhook URL for task status notifications. The server sends a callback when the task status changes."},"duration":{"type":"number","description":"Duration of the generated audio in seconds. Range: 3.0–10.0, supports one decimal place.","required":true},"external_task_id":{"type":"string","description":"Optional user-defined task ID for your own tracking. Does not replace the system-generated task ID. Must be unique per account."},"prompt":{"type":"string","description":"Text prompt describing the audio to generate. Max 200 characters.","required":true}}},"example":{"callback_url":"","duration":"","external_task_id":"","prompt":""}}}}}},"/kling/v1/videos/text2video":{"post":{"tags":["Kling"],"parameters":[{"name":"Content-Type","in":"query","description":"Must be `application/json`.","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/videos/text2video"},"summary":"Text to Video","description":"Text to Video","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"aspect_ratio":{"type":"string","description":"Aspect ratio request. Typical rendered sizes are 1280x720 for 16:9, 720x1280 for 9:16, and 960x960 for 1:1. This endpoint does not expose an exact size field.","enum":["16:9","9:16","1:1"]},"callback_url":{"type":"string","description":"Webhook URL to receive task status updates when the task completes."},"camera_control":{"type":"object","description":"Camera motion preset or manual configuration. Omit for automatic camera movement.","properties":{"type":{"type":"string","description":"Preset camera motion type.","enum":["simple","down_back","forward_up","right_turn_forward","left_turn_forward"]},"config":{"type":"object","description":"Manual camera movement axes. Each value ranges from -10 to 10."}}},"cfg_scale":{"type":"number","description":"Prompt adherence strength. Higher values follow the prompt more closely. Range: 0–1."},"duration":{"type":"string","description":"Output video length in seconds. Use `5` or `10`; omit to use `5`."},"external_task_id":{"type":"string","description":"Custom task id for your own tracking. Does not replace the system-generated task id but can be used to query tasks. Must be unique per user."},"mode":{"type":"string","description":"Generation mode. `std` for standard (faster), `pro` for professional (higher quality). The default is `std`.","enum":["std","pro"]},"model_name":{"type":"string","description":"Model ID for this text-to-video request. Use an ordinary Kling video model ID; use Omni model IDs only with the Omni Video endpoint.","enum":["kling-v1","kling-v1-6","kling-v2-master","kling-v2-1-master","kling-v2-5-turbo","kling-v2-6","kling-v3"]},"negative_prompt":{"type":"string","description":"Elements to exclude from the video. Maximum 200 characters."},"prompt":{"type":"string","description":"Text prompt describing the video to generate. Maximum 500 characters.","required":true},"sound":{"type":"string","description":"Optional generated-audio switch for models that support video sound. Use `on` or `off`, or omit the field for the model default.","enum":["on","off"]}}},"example":{"aspect_ratio":"","callback_url":"","camera_control":{},"cfg_scale":"","duration":"","external_task_id":"","mode":"","model_name":"","negative_prompt":"","prompt":"","sound":""}}}}}},"/kling/v1/audio/tts":{"post":{"tags":["Kling"],"parameters":[{"name":"Content-Type","in":"query","description":"Content type of the request body.","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/audio/tts"},"summary":"TTS","description":"TTS","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"text":{"type":"string","description":"Text to synthesize into speech. Max 1000 characters.","required":true},"voice_id":{"type":"string","description":"Voice preset ID. Determines the speaker voice used for synthesis. See the Kling documentation for available voice IDs and their supported languages.","required":true},"voice_language":{"type":"string","description":"Language of the selected voice. Must match the language supported by the chosen `voice_id`. Values: `zh` (Chinese) or `en` (English).","required":true},"voice_speed":{"type":"number","description":"Speech rate multiplier. Range 0.8–2.0 (one decimal place). Values outside this range are clamped automatically."}}},"example":{"text":"","voice_id":"","voice_language":"","voice_speed":""}}}}}},"/kling/v1/videos/effects":{"post":{"tags":["Kling"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/videos/effects"},"summary":"Create a Kling video-effects task","description":"Submit an `effect_scene` plus a provider-specific `input` object. `callback_url` and `external_task_id` are optional.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"callback_url":{"type":"string","description":"Webhook URL for task status notifications. The server sends a callback when the task status changes."},"effect_scene":{"type":"string","description":"Kling preset effect scene. Single-image effects use `input.image`; two-person interaction effects use `input.images` with exactly two images.","required":true},"external_task_id":{"type":"string","description":"Optional user-defined task ID for your own tracking. Does not replace the system-generated task ID. Must be unique per account."},"input":{"type":"object","description":"Effect-specific input payload. Single-image scenes require `image` and `duration`; two-person interaction scenes require exactly two `images` and `duration`.","required":true,"properties":{"duration":{"type":"string","description":"Effect video length in seconds. Use `5` or `10` when the selected scene supports both."},"image":{"type":"string","description":"Image URL or base64 image string for single-image effects. Use an image that meets Kling pixel requirements."},"images":{"type":"array","description":"Exactly two image URLs or base64 image strings for two-person interaction effects. Each image must meet Kling pixel requirements."},"mode":{"type":"string","description":"Generation mode for effects that support it. Use `std` or `pro`.","enum":["std","pro"]},"model_name":{"type":"string","description":"Model variant for two-person interaction effects. Omit to use the route default."}}}}},"example":{"callback_url":"","effect_scene":"","external_task_id":"","input":{}}}}}}},"/kling/v1/videos/video-extend":{"post":{"tags":["Kling"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/videos/video-extend"},"summary":"Video Extension","description":"Only videos from supported generation types can be extended.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"callback_url":{"type":"string","description":"Webhook URL to receive task status updates when the task completes."},"cfg_scale":{"type":"number","description":"Prompt adherence strength for the extension. Range: 0-1."},"negative_prompt":{"type":"string","description":"Elements to avoid in the extension."},"prompt":{"type":"string","description":"Text prompt describing the desired motion for the extended segment. Maximum 500 characters."},"task_id":{"type":"string","description":"Parent Kling task id for the extension-compatible video being extended.","required":true},"video_id":{"type":"string","description":"Video id from a parent task result. The source video must be extension-compatible; unsupported videos return HTTP 400.","required":true}}},"example":{"callback_url":"","cfg_scale":"","negative_prompt":"","prompt":"","task_id":"","video_id":""}}}}}},"/kling/v1/audio/video-to-audio":{"post":{"tags":["Kling"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/kling/v1/audio/video-to-audio"},"summary":"Create a Kling video-to-audio task","description":"Submit either a Kling `video_id` or an accessible `video_url`, then poll the returned task id through the generic Kling query route.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"callback_url":{"type":"string","description":"Webhook URL for task status notifications. The server sends a callback when the task status changes."},"external_task_id":{"type":"string","description":"Optional user-defined task ID for your own tracking. Does not replace the system-generated task ID. Must be unique per account."},"video_id":{"type":"string","description":"ID of a Kling-generated video. Only videos created within the last 30 days with a duration of 3–20 seconds are supported. Mutually exclusive with `video_url` — exactly one must be provided."},"video_url":{"type":"string","description":"Accessible URL of the source video. Accepted formats: MP4, MOV. Max 100 MB, 720p or 1080p resolution, duration 3–20 seconds. Mutually exclusive with `video_id` — exactly one must be provided."}}},"example":{"callback_url":"","external_task_id":"","video_id":"","video_url":""}}}}}},"/v1/files/retrieve":{"get":{"tags":["Files"],"parameters":[{"name":"file_id","in":"query","description":"MiniMax file id from the query response.","required":true,"schema":{"type":"string","example":""}},{"name":"task_id","in":"query","description":"Related task id when your workflow tracks the task instead of the file id. Required.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/v1/files/retrieve"},"summary":"Retrieve MiniMax file metadata","description":"Call this endpoint after the query endpoint shows a real file id or download URL. Keep the returned URL as a delivery URL and mirror the asset to your own storage if you need long retention.","security":[{"bearerAuth":[]}]}},"/v1/query/video_generation":{"get":{"tags":["Video"],"parameters":[{"name":"task_id","in":"query","description":"Task id returned by the create endpoint.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/v1/query/video_generation"},"summary":"Query a MiniMax video task","description":"Use the task id returned by POST /v1/video_generation. The outer response reports CometAPI task state and the nested data block mirrors the MiniMax provider payload.","security":[{"bearerAuth":[]}]}},"/v1/video_generation":{"post":{"tags":["Video"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/v1/video_generation"},"summary":"Create a MiniMax video task","description":"Start a MiniMax video generation job. The API returns a task id immediately. Query the task until a file id or download URL becomes available.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"duration":{"type":"number","description":"Video length in seconds, such as `6`."},"first_frame_image":{"type":"string","description":"Optional first-frame image as a public URL or base64 data URI."},"model":{"type":"string","description":"MiniMax video model id. `minimax-hailuo-02` is the currently validated CometAPI example model.","required":true},"prompt":{"type":"string","description":"Prompt text. MiniMax allows long prompts, but short direct prompts are best for first-time integration tests.","required":true},"resolution":{"type":"string","description":"Output resolution tier, such as `768P`. `512P` is only available when `first_frame_image` is provided; text-only requests must use a higher tier."}}},"example":{"duration":"","first_frame_image":"","model":"","prompt":"","resolution":""}}}}}},"/runway/pro/act_one":{"post":{"tags":["Runway"],"parameters":[{"name":"X-Runway-Version","in":"query","description":"Optional Runway version header, for example `2024-11-06`.","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/runway/pro/act_one"},"summary":"Act-one Expression Migration","description":"Act-one Expression Migration","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"callback_url":{"type":"string","description":"Webhook URL that receives a POST request with the result when the task completes.","required":true},"image":{"type":"string","description":"URL of the target image whose character will receive the expression.","required":true},"video":{"type":"string","description":"URL of the 16:9 source video containing the performance to transfer. Plan source and output assets around a landscape 1280x720 frame target, and keep the source clip short and stable for best results.","required":true}}},"example":{"callback_url":"","image":"","video":""}}}}}},"/runway/feed":{"post":{"tags":["Runway"],"parameters":[{"name":"X-Runway-Version","in":"query","description":"Optional Runway version header, for example `2024-11-06`.","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/runway/feed"},"summary":"Poll a Runway compatibility-format task","description":"Use the task id returned by a compatibility-format Runway create endpoint. Fresh task ids can briefly return `task_not_exist` before the system begins returning task state.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"task_id":{"type":"string","description":"Runway task id returned by the create endpoint.","required":true}}},"example":{"task_id":""}}}}}},"/runway/pro/generate":{"post":{"tags":["Runway"],"parameters":[{"name":"X-Runway-Version","in":"query","description":"Optional Runway API version header, for example `2024-11-06`.","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/runway/pro/generate"},"summary":"generate(text)","description":"generate(text)","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"callback_url":{"type":"string","description":"Webhook URL that receives a POST request with the result when the task completes.","required":true},"model":{"type":"string","description":"Model version to use, e.g. `gen4`.","required":true},"options":{"type":"object","description":"Advanced generation options including duration and camera motion.","required":true,"properties":{"motion_vector":{"type":"object","description":"Camera motion control parameters.","required":true},"seconds":{"type":"number","description":"Duration of the generated video in seconds. Use 5 or 10 for standard Runway video generations.","required":true}}},"prompt":{"type":"string","description":"Text prompt describing the video content to generate.","required":true},"ratio":{"type":"string","description":"Frame ratio for the generated video. Use colon-separated WxH ratio values such as 1280:720, 720:1280, or 960:960 when you need predictable Runway frames; some workflows also accept aspect-ratio labels such as 16:9, 9:16, and 1:1.","required":true},"style":{"type":"string","description":"Artistic style for the generated video, e.g. `cinematic`.","required":true}}},"example":{"callback_url":"","model":"","options":{},"prompt":"","ratio":"","style":""}}}}}},"/runway/pro/video2video":{"post":{"tags":["Runway"],"parameters":[{"name":"X-Runway-Version","in":"query","description":"Optional Runway version header, for example `2024-11-06`.","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/runway/pro/video2video"},"summary":"Video to Video Style Redraw","description":"Video to Video Style Redraw","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"callback_url":{"type":"string","description":"Webhook URL that receives a POST request with the result when the task completes.","required":true},"model":{"type":"string","description":"Model version to use, e.g. `gen4`.","required":true},"options":{"type":"object","description":"Additional processing options.","required":true,"properties":{"flip":{"type":"boolean","description":"Set `true` for landscape output, usually a 1280x720 target; set `false` for portrait output, usually a 720x1280 target.","required":true},"seconds":{"type":"number","description":"Output duration in seconds. Use 5 or 10 for standard Runway video generations.","required":true},"structure_transformation":{"type":"number","description":"How much of the original video structure to preserve. Range: 0.0 (fully creative) to 1.0 (preserve structure).","required":true}}},"prompt":{"type":"string","description":"Text prompt describing the target style for the redraw.","required":true},"video":{"type":"string","description":"URL of the source video to restyle.","required":true}}},"example":{"callback_url":"","model":"","options":{},"prompt":"","video":""}}}}}},"/runwayml/v1/tasks/{id}":{"get":{"tags":["Runway"],"parameters":[{"name":"id","in":"path","description":"Runway task id returned by the create endpoint.","required":true,"schema":{"type":"string","example":""}},{"name":"X-Runway-Version","in":"query","description":"Optional Runway version header, for example `2024-11-06`.","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/runwayml/v1/tasks/{id}"},"summary":"Poll a Runway official-format task","description":"Use the task id returned by an official-format Runway create endpoint. Fresh task ids can briefly return `task_not_exist` before the system begins returning task state. Output URLs are time-limited; download promptly and mirror to your own storage.","security":[{"bearerAuth":[]}]}},"/runwayml/v1/character_performance":{"post":{"tags":["Runway"],"parameters":[{"name":"X-Runway-Version","in":"query","description":"Runway version header, for example `2024-11-06`.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/runwayml/v1/character_performance"},"summary":"Create a Runway character-performance task","description":"Submit a character asset plus a reference performance clip and receive a task id for later polling.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"bodyControl":{"type":"boolean","description":"Enable body control.","required":true},"character":{"type":"object","description":"The character to control. You can either provide a video or an image.","required":true,"properties":{"type":{"type":"string","description":"Value","required":true},"uri":{"type":"string","description":"Value","required":true}}},"contentModeration":{"type":"object","description":"Value","required":true,"properties":{"publicFigureThreshold":{"type":"string","description":"Threshold for public-figure detection. Use `auto` for default behavior.","required":true}}},"expressionIntensity":{"type":"number","description":"Intensity of the expression transfer. Higher values produce more exaggerated expressions.","required":true},"model":{"type":"string","description":"The model variant to use. Must be act_two.","required":true},"ratio":{"type":"string","description":"Requested output frame shape, for example 1280:720 or 720:1280. Keep the character and reference assets close to the requested frame shape.","required":true},"reference":{"type":"object","description":"Reference performance clip. Provide `type` (`video`) and `uri` (HTTPS URL).","required":true,"properties":{"type":{"type":"string","description":"Value","required":true},"uri":{"type":"string","description":"Value","required":true}}},"seed":{"type":"number","description":"Random seed for reproducible results.","required":true}}},"example":{"bodyControl":"","character":{},"contentModeration":{},"expressionIntensity":"","model":"","ratio":"","reference":{},"seed":""}}}}}},"/runwayml/v1/video_to_video":{"post":{"tags":["Runway"],"parameters":[{"name":"X-Runway-Version","in":"query","description":"Runway API version header, for example `2024-11-06`.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/runwayml/v1/video_to_video"},"summary":"Generate a video from a video","description":"Generate a video from a video","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"contentModeration":{"type":"object","description":"Value","required":true,"properties":{"publicFigureThreshold":{"type":"string","description":"Threshold for public-figure detection. Use `auto` for default behavior.","required":true}}},"model":{"type":"string","description":"Model variant to use.","required":true},"promptText":{"type":"string","description":"Text prompt describing the desired output. Maximum 1000 characters.","required":true},"ratio":{"type":"string","description":"Requested output frame shape. Use colon-separated values such as 1280:720 or 720:1280; read them as 1280x720 and 720x1280 targets. Do not assume every Runway video-to-video route accepts 1280x720 with an x separator.","required":true},"references":{"type":"array","description":"Optional reference images to guide generation. Each item must include `type` (e.g. `image`) and `uri` (HTTPS URL).","required":true,"items":{"type":"object","properties":{"type":{"type":"string","description":"Value"},"uri":{"type":"string","description":"Value"}}}},"seed":{"type":"number","description":"Random seed for reproducible results. Range: 0–4294967295.","required":true},"videoUri":{"type":"string","description":"HTTPS URL of the source video, or a base64 data URI containing the video.","required":true}}},"example":{"contentModeration":{},"model":"","promptText":"","ratio":"","references":[],"seed":"","videoUri":""}}}}}},"/runwayml/v1/text_to_image":{"post":{"tags":["Runway"],"parameters":[{"name":"X-Runway-Version","in":"query","description":"Runway version header, for example `2024-11-06`.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/runwayml/v1/text_to_image"},"summary":"Create a Runway image-generation task","description":"Submit the prompt, ratio, model, and at least one `referenceImages` object.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"contentModeration":{"type":"object","description":"Value","required":true,"properties":{"publicFigureThreshold":{"type":"string","description":"Threshold for public-figure detection. Use `auto` for default behavior.","required":true}}},"model":{"type":"string","description":"The model variant to use.","required":true},"promptText":{"type":"string","description":"A non-empty string up to 1000 characters.","required":true},"ratio":{"type":"string","description":"Aspect ratio of the output image, e.g. `1280:720`.","required":true},"referenceImages":{"type":"array","description":"An array of up to three images to be used as references. At least one item is required. `referenceImages` is required.","required":true,"items":{"type":"object","properties":{"tag":{"type":"string","description":"Value"},"uri":{"type":"string","description":"Value"}}}},"seed":{"type":"number","description":"Random seed for reproducible results.","required":true}}},"example":{"contentModeration":{},"model":"","promptText":"","ratio":"","referenceImages":[],"seed":""}}}}}},"/runwayml/v1/image_to_video":{"post":{"tags":["Runway"],"parameters":[{"name":"X-Runway-Version","in":"query","description":"Runway version header, for example `2024-11-06`.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/runwayml/v1/image_to_video"},"summary":"Create a Runway image-to-video task","description":"Submit a source image plus optional motion prompt and receive a task id for later polling.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"duration":{"type":"number","description":"Video duration in seconds. Runway support is model/version dependent; use 5 or 10 for the broadest compatibility. CometAPI forwards this value to Runway."},"model":{"type":"string","description":"Runway image-to-video model ID. Choose an available model from the [Models page](/overview/models).","required":true},"promptImage":{"type":"string","description":"Source image URL.","required":true},"promptText":{"type":"string","description":"Text prompt describing the desired motion or scene. Maximum 512 characters."},"ratio":{"type":"string","description":"Requested output ratio. Accepted values are Runway model/version dependent. With X-Runway-Version 2024-11-06, use a resolution-style value accepted by the selected model, such as 1280:768, 768:1280, 1280:720, or 720:1280. Read these as WxH targets, but completed media may normalize, so inspect the returned file before relying on exact pixels."},"seed":{"type":"number","description":"Random seed for reproducible results. Range: 0–999999999."},"watermark":{"type":"boolean","description":"Whether to add a watermark to the output video."}}},"example":{"duration":"","model":"","promptImage":"","promptText":"","ratio":"","seed":"","watermark":""}}}}}},"/runwayml/v1/video_upscale":{"post":{"tags":["Runway"],"parameters":[{"name":"X-Runway-Version","in":"query","description":"Runway version header, for example `2024-11-06`.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/runwayml/v1/video_upscale"},"summary":"Create a Runway video-upscale task","description":"Submit a source video URL and receive a task id for later polling.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"model":{"type":"string","description":"The model variant to use. Must be upscale_v1.","required":true},"videoUri":{"type":"string","description":"A HTTPS URL pointing to a video or a data URI containing a video.","required":true}}},"example":{"model":"","videoUri":""}}}}}},"/v1/videos/{id}":{"get":{"tags":["Video"],"parameters":[{"name":"id","in":"path","description":"Task id returned by POST /v1/videos.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/v1/videos/{id}"},"summary":"Retrieve a Seedance video task","description":"Read the latest state of a video task that was created through POST /v1/videos. Works for every Seedance model family. Poll every 10 to 20 seconds until status reaches a terminal value (`completed`, `failed`, or `error`). `video_url` is returned on `completed` responses.","security":[{"bearerAuth":[]}]}},"/v1/videos/{video_id}/content":{"get":{"tags":["Video"],"parameters":[{"name":"video_id","in":"path","description":"Completed video id.","required":true,"schema":{"type":"string","example":""}},{"name":"variant","in":"query","description":"Optional content variant such as the main video, thumbnail, or spritesheet when supported by the provider.","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/v1/videos/{video_id}/content"},"summary":"Download finished Sora video content","description":"Call this endpoint only after GET /v1/videos/{video_id} reports a completed job. Before completion, CometAPI returns a JSON error response instead of a file. Shortly after completion the file can still be propagating; a transient `502` from this endpoint resolves on retry.","security":[{"bearerAuth":[]}]}},"/v1/videos/{video_id}":{"get":{"tags":["Video"],"parameters":[{"name":"video_id","in":"path","description":"Video id returned by the create or remix endpoint.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/v1/videos/{video_id}"},"summary":"Retrieve a Sora video job","description":"Poll a previously created Sora video job until it is completed or failed.","security":[{"bearerAuth":[]}]}},"/v1/videos/{video_id}/remix":{"post":{"tags":["Video"],"parameters":[{"name":"video_id","in":"path","description":"Completed source video id.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/v1/videos/{video_id}/remix"},"summary":"Create a Sora remix job","description":"Start a new async job that remixes a completed source video. Poll the retrieve endpoint with the returned id just like a fresh create call.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"prompt":{"type":"string","description":"Describe the change you want to make to the existing video.","required":true}}},"example":{"prompt":""}}}}}},"/grok/v1/videos/{request_id}":{"get":{"tags":["Grok"],"parameters":[{"name":"request_id","in":"path","description":"The deferred request ID returned by the create or edit endpoint.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/grok/v1/videos/{request_id}"},"summary":"Query a Grok video job","description":"Use the `request_id` from a generation or edit request to query the top-level task status. The final video URL is temporary.","security":[{"bearerAuth":[]}]}},"/grok/v1/videos/edits":{"post":{"tags":["Grok"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/grok/v1/videos/edits"},"summary":"Create an xAI video edit job","description":"Start a Grok video editing job from a source MP4 and a natural-language edit instruction. Poll the same query endpoint used by video generation.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"model":{"type":"string","description":"xAI video model id."},"output":{"type":"object","description":"Optional output delivery configuration.","properties":{}},"prompt":{"type":"string","description":"Edit instruction describing the change you want.","required":true},"user":{"type":"string","description":"Optional end-user identifier."},"video":{"type":"object","description":"Source video to edit. xAI documents an input limit of about 8.7 seconds.","required":true,"properties":{"url":{"type":"string","description":"Reachable source MP4 URL.","required":true}}}}},"example":{"model":"","output":{},"prompt":"","user":"","video":{}}}}}}},"/grok/v1/videos/generations":{"post":{"tags":["Grok"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/","api_endpoint":"https://api.cometapi.com/grok/v1/videos/generations"},"summary":"Create a Grok video generation job","description":"Start a Grok Imagine Video 1.5 job. Save the returned `request_id`, then poll the result endpoint until the top-level status reaches a terminal state.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"aspect_ratio":{"type":"string","description":"The output aspect ratio. Text-to-video uses `16:9` when omitted. Image-to-video uses the source image's aspect ratio when omitted.","enum":["1:1","16:9","9:16","4:3","3:4","3:2","2:3"]},"duration":{"type":"number","description":"The output duration in seconds. Use an integer from 1 through 15."},"image":{"type":"object","description":"The source image for image-to-video. Do not combine this field with `reference_images` or `reference_audios`.","properties":{"url":{"type":"string","description":"A public image URL or an image data URI such as `data:image/png;base64,<BASE64_IMAGE_DATA>`.","required":true}}},"model":{"type":"string","description":"The Grok video model ID. Send this field explicitly so the request uses Grok Imagine Video 1.5.","required":true,"enum":["grok-imagine-video-1.5"]},"prompt":{"type":"string","description":"A description of the scene, motion, and audio. Reference-to-video prompts can identify inputs with tags such as `<IMAGE_0>` and `<AUDIO_0>`.","required":true},"reference_audios":{"type":"array","description":"Preset voice references for reference-to-video. Do not combine this field with `image`.","items":{"type":"object","properties":{"voice_id":{"type":"string","description":"The preset voice ID, such as `eve`.","required":true}}}},"reference_images":{"type":"array","description":"Visual references for reference-to-video. Each item accepts a public image URL or image data URI. Do not combine this field with `image`.","items":{"type":"object","properties":{"url":{"type":"string","description":"A public image URL or an image data URI.","required":true}}}},"resolution":{"type":"string","description":"The output resolution. Reference-to-video requests support `480p` and `720p`; text-to-video and image-to-video also support `1080p`.","enum":["480p","720p","1080p"]}}},"example":{"aspect_ratio":"","duration":"","image":{},"model":"","prompt":"","reference_audios":[],"reference_images":[],"resolution":""}}}}}},"/v1/models":{"get":{"tags":["Models"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://apidoc.cometapi.com/guides/how-to-list-available-models","api_endpoint":"https://api.cometapi.com/v1/models"},"summary":"List Models","description":"List the models available to your CometAPI key (OpenAI-compatible model-list shape).","security":[{"bearerAuth":[]}]}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"security":[{"bearerAuth":[]}]}