Loading...
Loading...
Generate and edit images using TensorsLab's AI models. Supports text-to-image, image-to-image generation, plus advanced editing: avatar generation, watermark removal, object erasure, face replacement, and general image editing. Features automatic prompt enhancement, progress tracking, and local file saving. Requires TENSORSLAB_API_KEY environment variable.
npx skill4agent add tensorslab/skills tensorslab-image# Check if API key is set
echo $TENSORSLAB_API_KEY您好!要生成高质量的内容,您需要先进行简单的配置:
1. 访问 https://test.tensorai.tensorslab.com/ 登录并订阅。
2. 在控制台中获取您的专属 API Key。
3. 将其保存为环境变量:
- Windows (PowerShell): $env:TENSORSLAB_API_KEY="您的Key"
- Mac/Linux: export TENSORSLAB_API_KEY="您的Key"| Model | Description | Best For |
|---|---|---|
| seedreamv45 | Latest enhanced model | General purpose, highest quality |
| seedreamv4 | Standard model | Fast generation, good quality |
| zimage | Alternative model | Specific artistic styles |
seedreamv4./tensorslab_output/An astronaut sitting on the lunar surface, eating a hot dog with mustard,
cinematic lighting, Earth visible in the background, highly detailed,
photorealistic, 8k quality, dramatic shadows from the low sun anglesourceImageimageUrlprompt./tensorslab_output/Change the sky to sunset colors with warm orange and pink gradients,
matching the existing lighting conditions and atmospheric perspective,
seamless blend at the horizon line9:1616:93:44:31:12:33:22K4KWxH2048x20481920x1080# Text-to-image
python scripts/tensorslab_image.py "a cat on the moon"
# With specific resolution
python scripts/tensorslab_image.py "sunset over mountains" --resolution 16:9
# Image-to-image
python scripts/tensorslab_image.py "watercolor style" --source cat.png
# Specify model
python scripts/tensorslab_image.py "cyberpunk city" --model seedreamv45
# Custom output directory
python scripts/tensorslab_image.py "a beautiful landscape" --output-dir ./my_images| Status | Code | Meaning |
|---|---|---|
| Queued | 1 | Task waiting in queue |
| Processing | 2 | Currently generating |
| Completed | 3 | Done, images ready |
| Failed | 4 | Error occurred |
| Error Code | Meaning | User Message |
|---|---|---|
| 9000 | Insufficient credits | "亲,积分用完啦,请前往 https://test.tensorai.tensorslab.com"/ 充值" |
| 9999 | General error | Show the specific error message |
./tensorslab_output/--output-dir-o{task_id}_{index}.{ext}abcd_1234567890_0.png🎉 您的图片处理完毕!已存放于 ./tensorslab_output/{filename}