AI Agent Hub
Back to skills
Image2 Image Task Creation and Query icon

Image2 Image Task Creation and Query

Design & Media Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please install @user_4bd21536/image2-kancyai following https://skillhub.cn/install/skillhub.md

About this skill

Problem

image2-kancyai addresses operational details in asynchronous image generation APIs: a create call often returns only a task ID, so the caller must keep polling; inconsistent parameters can cause duplicate submissions and unnecessary credit consumption; key reuse can also be awkward. It turns text-to-image and image-to-image requests into a repeatable flow covering parameter collection, credential lookup, task creation, and final result extraction.

How It Works

The skill first validates prompt, modelType, and size, and in img2img mode confirms that urls contains one to eight usable addresses. Credentials are read from an explicitly provided x-api-key first, then from the session-level X_API_KEY; local configuration is used only when explicitly allowed. Before the create call, it emits a request summary and credit reminder, records the task ID after success, then keeps querying the status endpoint until the task is success, failed, or timed out. It returns imgUrls when available and reports failReason on failure.

Boundaries

The skill is for text2img and img2img image generation only, not video, audio, OCR, or non-generative editing. By default it creates at most one task per turn and does not auto-retry without confirmation; rate limits, invalid keys, or service errors should be decided by the user.

Use Cases

  • Create a 3:4 Image2 text-to-image task from a product brief and retrieve the final image URL.
  • Given reference images, validate URL count, create an img2img task, and poll until success or failure.
  • Pick 16:9 or 9:16 for social covers, confirm the credit reminder, and create the task without duplicates.
  • Reuse the session key with X_API_KEY or an explicit key and keep only masked key details in logs.

Best For

  • Design assistants creating ecommerce hero images need to turn reference pictures into usable image URLs.
  • Engineers automating marketing assets need reliable Image2 async task creation and final-status polling.
  • Product engineers integrating Kexiang AI image APIs need fixed text2img and img2img task payloads.
  • Operations owners producing cover images need 16:9 or 3:4 outputs and clear failure reasons.