### Example API Key Input Source: https://www.runninghub.cn/runninghub-api-doc-cn/doc-8287339 An example of the format for the API key input. ```text a0fa3e****************345171 ``` -------------------------------- ### Task Running Response Example Source: https://www.runninghub.cn/runninghub-api-doc-cn/api-450573662 Example response when a task is currently running. ```APIDOC ## Task Running Response Example ### Description This is an example of a response indicating that a task is currently in progress. ### Response #### Success Response (200) - **taskId** (string) - The unique identifier for the task. - **status** (string) - The current status of the task (e.g., RUNNING). - **errorCode** (string) - Error code, if any. - **errorMessage** (string) - Error message, if any. - **results** (any) - Results of the task, if available (null if running). - **clientId** (string) - The client identifier. - **promptTips** (string) - Tips or additional information related to the prompt. ### Response Example ```json { "taskId": "2013508786110730241", "status": "RUNNING", "errorCode": "", "errorMessage": "", "results": null, "clientId": "f828b9af25161bc066ef152db7b29ccc", "promptTips": "{\"result\": true, \"error\": null, \"outputs_to_execute\": [\"4\"], \"node_errors\": {}}" } ``` ``` -------------------------------- ### Submit Task Response Example Source: https://www.runninghub.cn/runninghub-api-doc-cn/api-448183156 Example of a response when a task is submitted. ```APIDOC ## POST /tasks/submit ### Description Submits a task for processing and returns a task ID. ### Method POST ### Endpoint /tasks/submit ### Request Body - **prompt** (string) - Required - The prompt for the task. - **model** (string) - Required - The model to use for the task. ### Request Example ```json { "prompt": "Create a video of a cat playing piano", "model": "text-to-video/全能视频S" } ``` ### Response #### Success Response (200) - **taskId** (string) - The ID of the submitted task. - **status** (string) - The current status of the task (e.g., RUNNING). - **errorCode** (string) - Error code if an error occurred. - **errorMessage** (string) - Error message if an error occurred. - **results** (array) - Results of the task, if available. - **clientId** (string) - Client identifier. - **promptTips** (string) - Tips related to the prompt. #### Response Example ```json { "taskId": "2013508786110730241", "status": "RUNNING", "errorCode": "", "errorMessage": "", "results": null, "clientId": "f828b9af25161bc066ef152db7b29ccc", "promptTips": "{\"result\": true, \"error\": null, \"outputs_to_execute\": [\"4\"], \"node_errors\": {}}" } ``` ``` -------------------------------- ### Example Node ID Input Source: https://www.runninghub.cn/runninghub-api-doc-cn/doc-8287339 An example of entering a nodeId to select a specific node for modification. ```text 39 ``` -------------------------------- ### Submit Task Response Example Source: https://www.runninghub.cn/runninghub-api-doc-cn/api-448183108 This example shows the structure of the response when a task is submitted. ```APIDOC ## Submit Task Response ### Description This endpoint is used to submit a task for processing. ### Method POST ### Endpoint /v1/image-to-video/wanxiang/2.7 ### Response #### Success Response (200) - **taskId** (string) - The unique identifier for the submitted task. - **status** (string) - The current status of the task (e.g., RUNNING). - **errorCode** (string) - Error code if the task failed. - **errorMessage** (string) - Error message if the task failed. - **results** (null) - Results of the task, null if not yet completed. - **clientId** (string) - Client identifier. - **promptTips** (string) - Additional tips or information related to the prompt. #### Response Example ```json { "taskId": "2013508786110730241", "status": "RUNNING", "errorCode": "", "errorMessage": "", "results": null, "clientId": "f828b9af25161bc066ef152db7b29ccc", "promptTips": "{\"result\": true, \"error\": null, \"outputs_to_execute\": [\"4\"], \"node_errors\": {}}" } ``` ``` -------------------------------- ### Get AI Application API Call Example Source: https://www.runninghub.cn/runninghub-api-doc-cn/api-448183270 Retrieves an example of an AI application API call. This is a GET request. ```APIDOC ## GET /AI 应用/获取AI应用API调用示例 ### Description Retrieves an example of an AI application API call. ### Method GET ### Endpoint /AI 应用/获取AI应用API调用示例 ``` -------------------------------- ### Example of instanceType Usage Source: https://www.runninghub.cn/runninghub-api-doc-cn/api-425749013 Shows how to specify the instance type for task execution, such as using 'plus' for a 48GB GPU. ```json "instanceType": "plus" ``` -------------------------------- ### Request Body Example for Get Account Information Source: https://www.runninghub.cn/runninghub-api-doc-cn/api-425748943 This is an example of the JSON request body required to call the Get Account Information API. It includes the API key. ```json { "apikey": "{{apiKey}}" } ``` -------------------------------- ### OpenAPI Request Example Source: https://www.runninghub.cn/runninghub-api-doc-cn/api-448183133 Example of parameters for submitting a task, including prompt, aspect ratio, duration, resolution, audio generation, and camera settings. ```yaml prompt: >- 一段电影级高速追踪镜头,跟拍一架流线型银色无人机在夜晚穿梭于生物发光森林。空气中漂浮着霓虹孢子,随着无人机的气流扰动产生真实的旋动反馈。无人机的推进器发出柔和的青色光芒,照亮下方鲜艳的紫色植物和苔藓地面。高保真动态,稳定的电影级光影,全程纹理清晰。 音频: 无人机的高频机械嗡鸣声、树叶的轻微沙沙声以及空灵的合成器环境音乐。 aspectRatio: '16:9' duration: '5' resolution: 720p generateAudio: 'true' cameraFixed: 'false' ``` -------------------------------- ### Response Example for Get Account Information Source: https://www.runninghub.cn/runninghub-api-doc-cn/api-425748943 This is an example of a successful JSON response from the Get Account Information API. It includes the account status details like RH coins, task counts, and wallet balance. ```json { "code": 0, "msg": "success", "data": { "remainCoins": "99999", "currentTaskCounts": "0", "remainMoney": "999", "currency": "CNY", "apiType": "NORMAL" } } ``` -------------------------------- ### AI Application - Get API Call Example Source: https://www.runninghub.cn/runninghub-api-doc-cn/api-448183152 Retrieves an example of an AI application API call. ```APIDOC ## GET /ai-app/api-call-example ### Description Retrieves an example of an AI application API call. ### Method GET ### Endpoint /ai-app/api-call-example ``` -------------------------------- ### Example Local IMAGE File Path Input Source: https://www.runninghub.cn/runninghub-api-doc-cn/doc-8287339 An example of the file path format for local images on a Windows system. ```text D:\R.jpg ``` -------------------------------- ### AI Application - Get AI Application API Call Example Source: https://www.runninghub.cn/runninghub-api-doc-cn/api-448969293 Retrieves an example of an API call for a specific AI application. ```APIDOC ## GET /ai-app/api-example/{model_id} ### Description Retrieves an example of an API call for a specific AI application. ### Method GET ### Endpoint /ai-app/api-example/{model_id} ### Parameters #### Path Parameters - **model_id** (string) - Required - The ID of the AI model. ### Response #### Success Response (200) - **example_request** (object) - An example request body for the AI application. - **example_response** (object) - An example response body from the AI application. #### Response Example ```json { "example_request": { "prompt": "A sample prompt", "model_id": "sample-model-id", "width": 512, "height": 512 }, "example_response": { "output_url": "http://example.com/output.png", "status": "completed" } } ``` ``` -------------------------------- ### Task Submitted Response Example Source: https://www.runninghub.cn/runninghub-api-doc-cn/api-448183059 This example shows the response structure when a task is submitted and is in a RUNNING state. It includes task ID, status, client ID, and prompt tips. ```json { "taskId": "2013508786110730241", "status": "RUNNING", "errorCode": "", "errorMessage": "", "results": null, "clientId": "f828b9af25161bc066ef152db7b29ccc", "promptTips": "{\"result\": true, \"error\": null, \"outputs_to_execute\": [\"4\"], \"node_errors\": {}}" } ``` -------------------------------- ### Text-to-Speech API Request Example Source: https://www.runninghub.cn/runninghub-api-doc-cn/api-448183274 This example demonstrates how to make a request to the text-to-speech API. It includes parameters for audio input, custom voice ID, text content, noise reduction, volume normalization, and model selection. Ensure all required fields are provided for successful processing. ```json { "audio": ">-\n https://www.runninghub.cn/view?filename=8ff07bf7a789afcbe91a8da77a07d2ef8d8137a65a6e60bb956a1d0fcbf319b7.wav&type=input&subfolder=&Rh-Comfy-Auth=eyJ1c2VySWQiOiIzZjY1MTNlNWEwNjY1N2I4OGYyNjU5NTEzYmU3ZDM0YyIsInNpZ25FeHBpcmUiOjE3NzE0MDg4OTQ3MjksInRzIjoxNzcwODA0MDk0NzI5LCJzaWduIjoiZGI3MmMwZTgxYjM5ZmNkYzMxNzlkNDBmYTczNDE0ZWEifQ==&Rh-Identify=3f6513e5a06657b88f2659513be7d34c&rand=0.06611614675835809", "custom_voice_id": "Elegant_Man", "text": ">-\n 基于 Speech-02 与最新 Speech 2.6 HD/Turbo\n 系列打造的尖端声纹克隆引擎。它仅需数秒音频样本即可实现高保真的零样本(Zero-shot)克隆,精准复刻目标说话人的音色、口音与独特的叙事风格。", "accuracy": 0.7, "need_noise_reduction": false, "need_volume_normalization": false, "model": "speech-02-hd" } ``` -------------------------------- ### 获取AI应用API调用示例 Source: https://www.runninghub.cn/runninghub-api-doc-cn/api-448183187 Retrieves example API calls for AI applications. This is a GET request. ```APIDOC ## 获取AI应用API调用示例 ### Description Retrieves example API calls for AI applications. ### Method GET ### Endpoint /ai-app/example ``` -------------------------------- ### Example Field Name Input Source: https://www.runninghub.cn/runninghub-api-doc-cn/doc-8287339 An example of entering a fieldName to target a specific property of the selected node. ```text image ``` -------------------------------- ### Get LoRA Upload URL Request Example Source: https://www.runninghub.cn/runninghub-api-doc-cn/api-425749009 This is an example of the request body to obtain the LoRA upload URL. Ensure you provide the correct apiKey, loraName, and md5Hex. ```json { "apiKey": "{{apiKey}}", "loraName": "my-lora-name", "md5Hex": "f8d958506e6c8044f79ccd7c814c6179" } ``` -------------------------------- ### AI Application APIs Source: https://www.runninghub.cn/runninghub-api-doc-cn/api-448183149 APIs for interacting with AI applications, including starting tasks and retrieving examples. ```APIDOC ## 发起AI应用任务 ### Description Initiates an AI application task. ### Method POST ### Endpoint /ai-app/start-task ### Parameters #### Request Body - **model_id** (string) - Required - The ID of the model to use. - **prompt** (string) - Required - The prompt for the AI application. - **negative_prompt** (string) - Optional - The negative prompt. - **params** (object) - Optional - Additional parameters for the task. ``` ```APIDOC ## 获取AI应用API调用示例 ### Description Retrieves an example of an AI application API call. ### Method GET ### Endpoint /ai-app/get-example ### Parameters #### Query Parameters - **model_id** (string) - Required - The ID of the model to get an example for. ``` ```APIDOC ## 获取公共模型列表 ### Description Retrieves a list of available public models. ### Method GET ### Endpoint /ai-app/public-models ``` -------------------------------- ### Example of retainSeconds Usage Source: https://www.runninghub.cn/runninghub-api-doc-cn/api-425749013 Demonstrates the usage of the `retainSeconds` parameter, which is applicable for enterprise shared API keys to reduce cold start times by reusing instances. ```json "retainSeconds": 60 ``` -------------------------------- ### Video Generation with Image Integration Source: https://www.runninghub.cn/runninghub-api-doc-cn/api-448183125 Use this example to integrate an image into a video, specifying aspect ratio, duration, and sound settings. Ensure the videoUrl and imageUrls are correctly formatted. ```yaml prompt: 把图中的人物融入到视频里 videoUrl: >- https://www.runninghub.cn/view?filename=27441819c3a0aac4150ade4eb4d2e1aa1ce34fda0580839fc6bee4240954aa5d.mp4&type=input&subfolder=&Rh-Comfy-Auth=eyJ1c2VySWQiOiIzZjY1MTNlNWEwNjY1N2I4OGYyNjU5NTEzYmU3ZDM0YyIsInNpZ25FeHBpcmUiOjE3NzEwNTE3NDYyMDcsInRzIjoxNzcwNDQ2OTQ2MjA3LCJzaWduIjoiM2Q0NTczNTUzMmUyNGJmNjczMzk5NjBmNDliNGJkYTMifQ==&Rh-Identify=3f6513e5a06657b88f2659513be7d34c&rand=0.8032385821652667 imageUrls: - >- https://www.runninghub.cn/view?filename=2ddabe87fbbc255fbfd176c49c7660eb45adf61b38f6e554cfe5944192bd2f86.jpg&type=input&subfolder=&Rh-Comfy-Auth=eyJ1c2VySWQiOiIzZjY1MTNlNWEwNjY1N2I4OGYyNjU5NTEzYmU3ZDM0YyIsInNpZ25FeHBpcmUiOjE3NzEwNTE3NDYyMDcsInRzIjoxNzcwNDQ2OTQ2MjA3LCJzaWduIjoiM2Q0NTczNTUzMmUyNGJmNjczMzk5NjBmNDliNGJkYTMifQ==&Rh-Identify=3f6513e5a06657b88f2659513be7d34c&rand=0.4817534481980411 keepOriginalSound: true sound: false aspectRatio: '16:9' duration: 5 multiShot: false ``` -------------------------------- ### OpenAPI 3.0.1 Specification for Workflow JSON Request Source: https://www.runninghub.cn/runninghub-api-doc-cn/schema-252329709 Defines the structure for a JSON request to get workflow details. Requires 'workflowId' and 'apiKey'. Includes mock data examples. ```yaml openapi: 3.0.1 info: title: '' description: '' version: 1.0.0 paths: {} components: schemas: 获取工作流Json Request: type: object properties: apiKey: type: string x-apifox-mock: '{{apiKey}}' description: '' examples: - '{{apiKey}}' workflowId: type: string x-apifox-mock: '1904136902449209346' examples: - '1904136902449209346' x-apifox-orders: - apiKey - workflowId required: - workflowId - apiKey x-apifox-folder: '' securitySchemes: {} servers: - url: https://www.runninghub.cn description: runninghub.cn security: [] ``` -------------------------------- ### Run AI Application - POST Request Source: https://www.runninghub.cn/runninghub-api-doc-cn/api-425749011 Example of how to make a POST request to the AI application run endpoint. Ensure to replace '{{apikey}}' with your actual API key and provide the necessary node information. ```bash curl --location --request POST \ 'https://www.runninghub.cn/task/openapi/ai-app/run' \ --header 'Host: www.runninghub.cn' \ --header 'Content-Type: application/json' \ --data-raw '{ \ "webappId": "null", \ "apiKey": "{{apikey}}", \ "nodeInfoList": [ \ { \ "nodeId": "39", \ "fieldName": "image", \ "fieldValue": "a293d89506f9c484f4ea5695f93024a80cd62ef98f4ee4543faba357536b37ec.jpg", \ "description": "上传图像" \ }, \ { \ "nodeId": "37", \ "fieldName": "model", \ "fieldData": "[{\"name\":\"flux-kontext-pro\",\"index\":\"flux-kontext-pro\",\"description\":\"flux-kontext-pro 模型(默认)\"},{\"name\":\"flux-kontext-max\",\"index\":\"flux-kontext-max\",\"description\":\"flux-kontext-maX 模型\"},{\"default\":\"flux-kontext-pro\",\"description\":\"忽略\"}]", \ "fieldValue": "flux-kontext-pro", \ "description": "模型切换" \ }, \ { \ "nodeId": "37", \ "fieldName": "aspect_ratio", \ "fieldData": "[{\"name\":\"match_input_image\",\"index\":\"match_input_image\",\"description\":\"匹配上传图像比例\"},{\"name\":\"1:1\",\"index\":\"1:1\",\"description\":\"1:1 正方形,适配社交媒体图文 (Instagram/小红书)\"},{\"name\":\"16:9\",\"index\":\"16:9\",\"description\":\"16:9 横版宽屏,主流视频平台(电视 / YouTube)\"},{\"name\":\"9:16\",\"index\":\"9:16\",\"description\":\"9:16 竖版长屏,适配抖音等短视频竖屏\"},{\"name\":\"4:3\",\"index\":\"4:3\",\"description\":\"4:3 传统比例,老式屏幕 / 教育课件\"},{\"name\":\"3:4\",\"index\":\"3:4\",\"description\":\"3:4 竖版构图,人像摄影 / 竖版海报\"},{\"name\":\"3:2\",\"index\":\"3:2\",\"description\":\"3:2 胶片经典比例,人文风景摄影\"},{\"name\":\"2:3\",\"index\":\"2:3\",\"description\":\"2:3 纵向延伸,书籍封面 / 长图设计\"},{\"name\":\"4:5\",\"index\":\"4:5\",\"description\":\"4:5 手机竖屏适配,移动端拍摄 / 广告\"},{\"name\":\"5:4\",\"index\":\"5:4\",\"description\":\"5:4 横向拓展,艺术摄影 / 杂志封面\"},{\"name\":\"21:9\",\"index\":\"21:9\",\"description\":\"21:9 超宽屏,电影 / 游戏全景场景\"},{\"name\":\"9:21\",\"index\":\"9:21\",\"description\":\"9:21 极端竖版,短视频创意分镜\"},{\"name\":\"2:1\",\"index\":\"2:1\",\"description\":\"2:1 横向长条,横幅海报 / 网页 Banner\"},{\"name\":\"1:2\",\"index\":\"1:2\",\"description\":\"1:2 纵向长条,垂直网页 / 手机长图\"},{\"default\":\"match_input_image\",\"description\":\"忽略\"}]", \ "fieldValue": "match_input_image", \ "description": "比例切换" \ } ] \ }' ```