AI Agent Hub
Back to skills
Tencent Cloud Hunyuan Text to Image icon

Tencent Cloud Hunyuan Text to Image

Design & Media Updated 2026.08.30

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

Follow https://skillhub.cn/install/skillhub.md to install @tencent-adm/tencentcloud-aiart-texttoimage.

About this skill

What problem it solves

When an agent needs to turn a user's text description into an AI-generated image, calling a cloud image API directly involves job submission, status polling, and result URL extraction. TencentCloud Aiart TextToImage wraps Tencent Cloud's Hunyuan text-to-image service into executable scripts, making it a tool for image generation rather than just describing the image.

How it works

  • Default entrypoint: use main.py to submit the job and poll for the result automatically. Prefer this mode when the user does not specify a workflow.
  • Step-by-step control: submit_job.py only submits the job and returns a JobId; query_job.py queries or polls by JobId, which fits asynchronous pipelines.
  • Key parameters: --images accepts up to 3 reference image URLs in jpg/jpeg/png/webp, with each base64 payload under 10MB; --resolution sets width and height between 512 and 2048 pixels, with total area no more than 1024×1024; --seed fixes reproducibility; --revise enables prompt revision by default and adds about 20 seconds.
  • Runtime setup: it requires Tencent Cloud API credentials and can install Python dependencies automatically; keep credentials in environment variables rather than hard-coding them.

Caveats

Generated image URLs expire after 1 hour, so save them promptly. Prompt revision increases latency. If the call fails, return a clear error instead of fabricating an image URL or describing the result.

Use Cases

  • Turn a character brief into a square reference image for concept reviews
  • Use two reference images to guide a product hero image style and generate 1024:768 candidates
  • Poll an async image generation job by JobId and archive the usable image URLs
  • Rerun the same prompt with a fixed seed to compare how reference images and prompt revision affect output

Best For

  • Product managers who need to turn product copy into quick visual sketches
  • Marketing designers who want to constrain style with reference images and generate poster candidates
  • Engineers who need to submit image generation jobs and poll results in automated workflows
  • Algorithm testers who want to compare model outputs using fixed seeds and controlled resolutions