Install
openclaw skills install tomoviee-reference-to-imageGenerate images from a reference image using Tomoviee Image-to-Image API (`tm_reference_img2img`) through Wondershare OpenAPI gateway (`https://openapi.wondershare.cc`). Use when users request image-to-image editing, style transfer, or subject-preserving transformations.
openclaw skills install tomoviee-reference-to-imageGenerate new images from a reference image and prompt.
tm_reference_img2imghttps://openapi.wondershare.cc/v1/open/capacity/application/tm_reference_img2imghttps://openapi.wondershare.cc/v1/open/pub/taskUse this mapping to verify provider identity and runtime endpoint provenance:
https://www.tomoviee.ai and https://www.tomoviee.cnhttps://openapi.wondershare.ccopenapi.wondershare.ccapp_key and app_secret are only used to build Authorization: Basic <base64(app_key:app_secret)>.pip install -r requirements.txt
python scripts/generate_auth_token.py YOUR_APP_KEY YOUR_APP_SECRET
from scripts.tomoviee_img2img_client import TomovieeImg2ImgClient
client = TomovieeImg2ImgClient("app_key", "app_secret")
task_id = client.image_to_image(
prompt="Keep subject identity and posture, transform scene to modern office, photorealistic lighting",
reference_image="https://example.com/reference.jpg",
control_type="2",
init_image="https://example.com/reference.jpg",
width=1024,
height=1024,
batch_size=1,
control_intensity=0.5,
)
result = client.poll_until_complete(task_id)
import json
image_url = json.loads(result["result"])["images_path"][0]
print(image_url)
prompt (required): Text prompt for preservation and transformation instructions.reference_image (required): Input reference image URL.control_type (required): Control mode. Supported values: "0", "1", "2", "3".width (required): Output width in pixels, range 512-2048.height (required): Output height in pixels, range 512-2048.batch_size (required): Number of generated images, range 1-4.control_intensity (required): Control strength, range 0-1.init_image (optional): Required by backend when control_type="2".callback (optional): Callback URL.params (optional): Transparent callback passthrough parameter.task_idpoll_until_complete(task_id)resultStatus codes:
1 queued2 processing3 success4 failed5 cancelled6 timeoutscripts/tomoviee_img2img_client.py - main API clientscripts/tomoviee_image_to_image_client.py - compatibility import shimscripts/generate_auth_token.py - auth token helperreferences/image_apis.md - API reference and constraintsreferences/prompt_guide.md - prompt writing guidancehttps://www.tomoviee.ai/developers.htmlhttps://www.tomoviee.ai/doc/ai-image/image-to-image.htmlhttps://www.tomoviee.cn/developers.htmlhttps://www.tomoviee.cn/doc/ai-image/image-to-image.html