## Basic tool info Model name: klingai/kling image v4 long Model description: Generate long-form webpage or product detail page mockups from a written brief, with optional reference images. Choose 1K or 2K output for crisp layout previews. Model cover: https://cdn.wiro.ai/uploads/models/klingai-kling-image-v4-long-cover.webp Model categories: - tool - klingai - partner - nogpu-pipeline - quick-showcase - hero-showcase - text-to-image - image-to-image Run Task Endpoint (POST): https://api.wiro.ai/v1/Run/klingai/kling-image-v4-long Get Task Detail Endpoint (POST): https://api.wiro.ai/v1/Task/Detail ## Model Inputs: - name: productImages label: Product Images help: Optional. Ecommerce only, where 1 to 3 product photos are required. Refer to them in the prompt as @image_1, @image_2 and @image_3. Not used for webpage designs. type: combinefileinput default: - name: styleImage label: Style Image help: Optional. Webpage only. A design whose visual and layout style the page follows. Refer to it in the prompt as @image_1. Not used for ecommerce pages. type: combinefileinput default: - name: subjectImage label: Subject Image help: Optional. Webpage only. A subject such as a product or person that the page keeps and is designed around. Refer to it in the prompt as @image_2, or @image_1 without a style image. Not used for ecommerce pages. type: combinefileinput default: - name: prompt label: Prompt help: Required. Describe the page: the brand, the sections in order, the headline text and the colors. Writing "all text in English" keeps the page text in English. type: textarea default: An English landing page for a yoga and wellness studio called Still Point. Sections: a hero with a calm sunlit yoga room photo and the headline "Find Your Balance" with a Book a Class button, a weekly class schedule table, four class types with photos, three instructor profiles, three membership plans with prices in dollars, a contact form, and a footer. Soft sage green and beige colors. All text on the page is in English. Every word is complete and fully visible inside the page with wide side margins; no oversized display typography, no words cropped by the edges or by images. Headlines are short, 2 to 4 words, centered. The page starts with a full-width hero section. Clean modern website design, realistic photos, crisp legible text. - name: skill label: Skill help: Required. Webpage makes a website design from the prompt. Ecommerce makes a product detail page from 1 to 3 product images. type: select default: webpage options: - value: "webpage" label: webpage - value: "ecommerce" label: ecommerce - name: resolution label: Resolution help: Required. Output resolution. type: select default: 1k options: - value: "1k" label: 1k - value: "2k" label: 2k - name: length label: Length help: Optional. Default short. Ecommerce only. Short has about 2 to 5 sections, medium 6 to 10 and long 11 to 18. Not used for webpage designs. type: select default: short options: - value: "short" label: short - value: "medium" label: medium - value: "long" label: long ## Model Parameter Inspires: - skill: webpage - prompt: An English landing page for a yoga and wellness studio called Still Point. Sections: a hero with a calm sunlit yoga room photo and the headline "Find Your Balance" with a Book a Class button, a weekly class schedule table, four class types with photos, three instructor profiles, three membership plans with prices in dollars, a contact form, and a footer. Soft sage green and beige colors. All text on the page is in English. Every word is complete and fully visible inside the page with wide side margins; no oversized display typography, no words cropped by the edges or by images. Headlines are short, 2 to 4 words, centered. The page starts with a full-width hero section. Clean modern website design, realistic photos, crisp legible text. - skill: webpage - prompt: An English landing page for a neighborhood specialty coffee shop called Morning Grain. Sections: a hero with a latte photo and the headline "Fresh Every Morning" with an Order Now button, a menu grid of six drinks with names and prices in dollars, an about section on roasting beans in house, three customer reviews, a FAQ list, opening hours and location, and a footer. Warm cream and brown colors. Every piece of text on the page is in English only, with no Chinese or other languages anywhere. Every word is complete and fully visible inside the page with wide side margins; no oversized display typography, no text placed over busy parts of photos, no words cropped by the edges or by images. Headlines are short, 2 to 4 words. Clean modern website design with light backgrounds, realistic photos, crisp legible text. - skill: webpage - prompt: An English landing page for a travel agency called Wanderline. The hero is a full-width photo of a turquoise coastal bay with the headline "Explore The World" in white on a soft dark overlay, and a search bar for destination and dates below it. Then a grid of six featured destinations with real landscape photos (a tropical beach, snowy mountains, a European old town, a desert, a rainforest, a Japanese temple), city names and prices per person in dollars, a why-book-with-us section with three icons, three traveler testimonials with portraits, a newsletter signup, and a footer. Fresh blue and white colors. No phones, tablets or screens in any photo. Every piece of text on the page is in English only, with no Chinese or other languages anywhere. Every word is complete and fully visible inside the page with wide side margins; no oversized display typography, no text placed over busy parts of photos, no words cropped by the edges or by images. Headlines are short, 2 to 4 words. Clean modern website design with light backgrounds, realistic photos, crisp legible text. - skill: webpage - prompt: An English landing page for a smash burger restaurant called Stack House, with three sections: 1) a hero split in two, the headline "Smashed Fresh Daily" in dark text with an Order Now button on the left and a juicy double cheeseburger photo on the right; 2) a menu grid of six items (burgers, fries, shakes) with photos, names and prices in dollars; 3) a footer with opening hours, address and delivery app buttons. Red, mustard yellow and cream colors. The page has exactly three sections and nothing else. Every piece of text on the page is in English only, with no Chinese or other languages anywhere. Every word is complete and fully visible inside the page with wide side margins; no oversized display typography, no text placed over busy parts of photos, no words cropped by the edges or by images. Headlines are short, 2 to 4 words. Clean modern website design with light backgrounds, realistic photos, crisp legible text. ## Integration Header Prepare ```bash # Sign up Wiro dashboard and create project export YOUR_API_KEY="YOUR_WIRO_API_KEY"; export YOUR_API_SECRET="XXXXXXXXX"; # unix time or any random integer value export NONCE=$(date +%s); # hmac-SHA256 (YOUR_API_SECRET+Nonce) with YOUR_API_KEY export SIGNATURE="$(echo -n "${YOUR_API_SECRET}${NONCE}" | openssl dgst -sha256 -hmac "${YOUR_API_KEY}" | awk '{print $NF}')"; ``` ## Run Command - Make HTTP Post Request ```bash curl -X POST "https://api.wiro.ai/v1/Run/klingai/kling-image-v4-long" \ -H "Content-Type: application/json" \ -H "x-api-key: ${YOUR_API_KEY}" \ -H "x-nonce: ${NONCE}" \ -H "x-signature: ${SIGNATURE}" \ --data-binary @- <<'JSON' { "productImages": "", "styleImage": "", "subjectImage": "", "prompt": "An English landing page for a yoga and wellness studio called Still Point. Sections: a hero with a calm sunlit yoga room photo and the headline \"Find Your Balance\" with a Book a Class button, a weekly class schedule table, four class types with photos, three instructor profiles, three membership plans with prices in dollars, a contact form, and a footer. Soft sage green and beige colors. All text on the page is in English. Every word is complete and fully visible inside the page with wide side margins; no oversized display typography, no words cropped by the edges or by images. Headlines are short, 2 to 4 words, centered. The page starts with a full-width hero section. Clean modern website design, realistic photos, crisp legible text.", "skill": "webpage", "resolution": "1k", "length": "short", "callbackUrl": "You can provide a callback URL; Wiro will send a POST request to it when the task is completed." } JSON ``` ## Run Command - Response ```json { "errors": [], "taskid": "2221", "socketaccesstoken": "eDcCm5yyUfIvMFspTwww49OUfgXkQt", "result": true } ``` ## Get Task Detail - Make HTTP Post Request with Task ID ```bash curl -X POST "https://api.wiro.ai/v1/Task/Detail" \ -H "Content-Type: application/json" \ -H "x-api-key: ${YOUR_API_KEY}" \ -H "x-nonce: ${NONCE}" \ -H "x-signature: ${SIGNATURE}" \ -d '{ "taskid": "2221" }'; ``` ## Get Task Detail - Make HTTP Post Request with Socket Access Token ```bash curl -X POST "https://api.wiro.ai/v1/Task/Detail" \ -H "Content-Type: application/json" \ -H "x-api-key: ${YOUR_API_KEY}" \ -H "x-nonce: ${NONCE}" \ -H "x-signature: ${SIGNATURE}" \ -d '{ "tasktoken": "eDcCm5yyUfIvMFspTwww49OUfgXkQt" }'; ``` ## Get Task Detail - Response ```json { "total": "1", "errors": [], "tasklist": [ { "id": "2221", "uuid": "15bce51f-442f-4f44-a71d-13c6374a62bd", "socketaccesstoken": "eDcCm5yyUfIvMFspTwww49OUfgXkQt", "parameters": {}, "debugoutput": "", "debugerror": "", "starttime": "1734513809", "endtime": "1734513813", "elapsedseconds": "6.0000", "status": "task_postprocess_end", "createtime": "1734513807", "canceltime": "0", "assigntime": "1734513807", "accepttime": "1734513807", "preprocessstarttime": "1734513807", "preprocessendtime": "1734513807", "postprocessstarttime": "1734513813", "postprocessendtime": "1734513814", "totalcost": "0.003510000000", "chargedcost": "0.002808000000", "discountamount": "0.000702000000", "outputs": [ { "id": "6bc392c93856dfce3a7d1b4261e15af3", "name": "0.png", "contenttype": "image/png", "parentid": "6c1833f39da71e6175bf292b18779baf", "uuid": "15bce51f-442f-4f44-a71d-13c6374a62bd", "size": "202472", "addedtime": "1734513812", "modifiedtime": "1734513812", "accesskey": "dFKlMApaSgMeHKsJyaDeKrefcHahUK", "url": "https://cdn1.wiro.ai/6a6af820-c5050aee-40bd7b83-a2e186c6-7f61f7da-3894e49c-fc0eeb66-9b500fe2/0.png" } ], "size": "202472" } ], "result": true } ``` totalcost is the list price. chargedcost is the amount actually billed after any discount (a store fee is included on store runs); discountamount is the discount. chargedcost is null until the charge is recorded (shortly after task_postprocess_end) and "0" for a failed or cancelled task. ## Kill Task - Make HTTP Post Request with Task ID ```bash curl -X POST "https://api.wiro.ai/v1/Task/Kill" \ -H "Content-Type: application/json" \ -H "x-api-key: ${YOUR_API_KEY}" \ -H "x-nonce: ${NONCE}" \ -H "x-signature: ${SIGNATURE}" \ -d '{ "taskid": "534574" }'; ``` ## Kill Task - Make HTTP Post Request with Socket Access Token ```bash curl -X POST "https://api.wiro.ai/v1/Task/Kill" \ -H "Content-Type: application/json" \ -H "x-api-key: ${YOUR_API_KEY}" \ -H "x-nonce: ${NONCE}" \ -H "x-signature: ${SIGNATURE}" \ -d '{ "socketaccesstoken": "ZpYote30on42O4jjHXNiKmrWAZqbRE" }'; ``` ## Kill Task - Response ```json { "errors": [], "tasklist": [ { "id": "534574", "uuid": "15bce51f-442f-4f44-a71d-13c6374a62bd", "name": "", "socketaccesstoken": "ZpYote30on42O4jjHXNiKmrWAZqbRE", "parameters": { "inputImage": "https://api.wiro.ai/v1/File/mCmUXgZLG1FNjjjwmbtPFr2LVJA112/inputImage-6060136.png" }, "debugoutput": "", "debugerror": "", "starttime": "1734513809", "endtime": "1734513813", "elapsedseconds": "6.0000", "status": "task_cancel", "cps": "0.000585000000", "totalcost": "0.003510000000", "guestid": null, "projectid": "699", "modelid": "598", "description": "", "basemodelid": "0", "runtype": "model", "modelfolderid": "", "modelfileid": "", "callbackurl": "", "marketplaceid": null, "createtime": "1734513807", "canceltime": "0", "assigntime": "1734513807", "accepttime": "1734513807", "preprocessstarttime": "1734513807", "preprocessendtime": "1734513807", "postprocessstarttime": "1734513813", "postprocessendtime": "1734513814", "pexit": "0", "categories": "["tool","image-to-image","quick-showcase","compare-landscape"]", "outputs": [ { "id": "6bc392c93856dfce3a7d1b4261e15af3", "name": "0.png", "contenttype": "image/png", "parentid": "6c1833f39da71e6175bf292b18779baf", "uuid": "15bce51f-442f-4f44-a71d-13c6374a62bd", "size": "202472", "addedtime": "1734513812", "modifiedtime": "1734513812", "accesskey": "dFKlMApaSgMeHKsJyaDeKrefcHahUK", "foldercount": "0", "filecount": "0", "ispublic": 0, "expiretime": null, "url": "https://cdn1.wiro.ai/6a6af820-c5050aee-40bd7b83-a2e186c6-7f61f7da-3894e49c-fc0eeb66-9b500fe2/0.png" } ], "size": "202472" } ], "result": true } ``` ## Cancel Task - Make HTTP Post Request (For tasks on queue) ```bash curl -X POST "https://api.wiro.ai/v1/Task/Cancel" \ -H "Content-Type: application/json" \ -H "x-api-key: ${YOUR_API_KEY}" \ -H "x-nonce: ${NONCE}" \ -H "x-signature: ${SIGNATURE}" \ -d '{ "taskid": "634574" }'; ``` ## Cancel Task - Response ```json { "errors": [], "tasklist": [ { "id": "634574", "uuid": "15bce51f-442f-4f44-a71d-13c6374a62bd", "name": "", "socketaccesstoken": "ZpYote30on42O4jjHXNiKmrWAZqbRE", "parameters": { "inputImage": "https://api.wiro.ai/v1/File/mCmUXgZLG1FNjjjwmbtPFr2LVJA112/inputImage-6060136.png" }, "debugoutput": "", "debugerror": "", "starttime": "1734513809", "endtime": "1734513813", "elapsedseconds": "6.0000", "status": "task_cancel", "cps": "0.000585000000", "totalcost": "0.003510000000", "guestid": null, "projectid": "699", "modelid": "598", "description": "", "basemodelid": "0", "runtype": "model", "modelfolderid": "", "modelfileid": "", "callbackurl": "", "marketplaceid": null, "createtime": "1734513807", "canceltime": "0", "assigntime": "1734513807", "accepttime": "1734513807", "preprocessstarttime": "1734513807", "preprocessendtime": "1734513807", "postprocessstarttime": "1734513813", "postprocessendtime": "1734513814", "pexit": "0", "categories": "["tool","image-to-image","quick-showcase","compare-landscape"]", "outputs": [ { "id": "6bc392c93856dfce3a7d1b4261e15af3", "name": "0.png", "contenttype": "image/png", "parentid": "6c1833f39da71e6175bf292b18779baf", "uuid": "15bce51f-442f-4f44-a71d-13c6374a62bd", "size": "202472", "addedtime": "1734513812", "modifiedtime": "1734513812", "accesskey": "dFKlMApaSgMeHKsJyaDeKrefcHahUK", "foldercount": "0", "filecount": "0", "ispublic": 0, "expiretime": null, "url": "https://cdn1.wiro.ai/6a6af820-c5050aee-40bd7b83-a2e186c6-7f61f7da-3894e49c-fc0eeb66-9b500fe2/0.png" } ], "size": "202472" } ], "result": true } ``` ## Task Status Information This section defines the possible task status values returned by the API when polling for task completion. ### Completed Task Statuses (Polling can stop) These indicate that the task has reached a terminal state — either success or failure. Once any of these is received, polling should stop. - task_postprocess_end : Task completed successfully and post-processing is done. - task_cancel : Task was cancelled by the user or system. ### Running Task Statuses (Continue polling) These statuses indicate that the task is still in progress. Polling should continue if one of these is returned. - task_queue : Task is waiting in the queue. - task_accept : Task has been accepted for processing. - task_assign : Task is being assigned to a worker. - task_preprocess_start : Preprocessing is starting. - task_preprocess_end : Preprocessing is complete. - task_start : Task execution has started. - task_output : Output is being generated.