图像生成

keevx-image-generate

by baidu-xiling

Use the Keevx API to generate images from prompts and reference images. Supports standard and professional modes, multiple quality levels (1K/2K/4K), various aspect ratios, and batch generation. Use this skill when the user needs to: (1) Generate images from text prompts (2) Create AI images with reference images (3) Batch image generation (4) Query image generation task status. Keywords: image generate, Keevx, AI image, text to image.

4.5k内容与创意未扫描2026年3月23日

安装

claude skill add --url github.com/openclaw/skills/tree/main/skills/baidu-xiling/keevx-image-generate

文档

Keevx Image Generate Skill

Generate high-quality AI images via the Keevx API using text prompts and optional reference images. Each request generates one or more images with configurable quality, ratio, and mode.

Prerequisites

Set the environment variable KEEVX_API_KEY, obtained from https://www.keevx.com/main/home. Documentation: https://docs.keevx.com

bash
export KEEVX_API_KEY="your_api_key_here"

API Endpoints

  • Base URL: https://api.keevx.com/v1
  • Upload image: POST /figure-resource/upload/file (Content-Type: multipart/form-data)
  • Create task: POST /image_generate (Content-Type: application/json)
  • Query status: GET /image_generate/{task_id}
  • Auth: All endpoints use Authorization: Bearer $KEEVX_API_KEY
  • Source identifier: All endpoints require the source: skill Header

Request Parameters

  • prompt (required): Generation prompt, max 1000 characters
  • reference_images (optional): Array of reference image URLs, max 5 images, each under 20MB. Supported formats: JPG/JPEG/PNG/BMP/WebP/GIF
  • module (optional): Generation mode, std (standard, default) or pro (professional)
  • generate_count (optional): Number of images to generate, 1-8, default 1. Each image produces a separate task ID
  • image_quality (optional): Output quality: 1K, 2K (default), 4K
  • image_ratio (optional): Aspect ratio, default 9:16. Valid values: 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9
  • callback_url (optional): Callback URL for task completion notification

Image Input Handling

User-provided images may be URLs or local file paths, handle accordingly:

  • URL (starts with http:// or https://): Use directly in reference_images
  • Local file path: Upload via the upload endpoint first, then use the returned URL

Upload Local File

bash
curl --location 'https://api.keevx.com/v1/figure-resource/upload/file' \
  --header 'Authorization: Bearer $KEEVX_API_KEY' \
  --header 'source: skill' \
  --form 'file=@"/path/to/local/image.png"'

Response:

json
{
  "code": 0,
  "success": true,
  "message": { "global": "success" },
  "result": {
    "url": "https://storage.googleapis.com/.../image.png",
    "fileId": "c5a4676a-...",
    "fileName": "image.png"
  }
}

Extract the image URL from result.url for use in reference_images. For multiple local files, upload each one and collect all URLs.

Quick Examples

Basic Generation (Prompt Only)

bash
curl -X POST "https://api.keevx.com/v1/image_generate" \
  -H "Authorization: Bearer $KEEVX_API_KEY" \
  -H "source: skill" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A serene mountain lake at sunset with golden light reflecting on the water",
    "image_quality": "2K",
    "image_ratio": "16:9"
  }'

Generation with Reference Images

bash
curl -X POST "https://api.keevx.com/v1/image_generate" \
  -H "Authorization: Bearer $KEEVX_API_KEY" \
  -H "source: skill" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Product shot on white background with soft lighting",
    "reference_images": ["https://example.com/product.jpg"],
    "module": "pro",
    "generate_count": 4,
    "image_quality": "4K",
    "image_ratio": "1:1"
  }'

Query Task Status

bash
curl -X GET "https://api.keevx.com/v1/image_generate/i2is-xxxxxxxx" \
  -H "Authorization: Bearer $KEEVX_API_KEY" \
  -H "source: skill"

Response Format

Task Created Successfully

json
{
  "code": 0,
  "msg": "ok",
  "data": {
    "task_ids": ["i2is-a1b2c3d4e5f6", "i2is-g7h8i9j0k1l2"]
  }
}

The task_ids array contains one ID per generated image (count equals generate_count). Query each ID individually.

Task Query - Generating

json
{
  "code": 0,
  "msg": "ok",
  "data": {
    "task_id": "i2is-a1b2c3d4e5f6",
    "status": "GENERATING",
    "image_url": "",
    "thumbnail_url": "",
    "error_message": ""
  }
}

Task Query - Succeeded

json
{
  "code": 0,
  "msg": "ok",
  "data": {
    "task_id": "i2is-a1b2c3d4e5f6",
    "status": "SUCCEEDED",
    "image_url": "https://storage.googleapis.com/.../image.png",
    "thumbnail_url": "https://storage.googleapis.com/.../thumb.webp",
    "error_message": ""
  }
}

Task Query - Failed

json
{
  "code": 0,
  "msg": "ok",
  "data": {
    "task_id": "i2is-a1b2c3d4e5f6",
    "status": "FAILED",
    "image_url": "",
    "thumbnail_url": "",
    "error_message": "Image generation failed due to content policy"
  }
}

Status Values

  • GENERATING: Task is in progress
  • SUCCEEDED: Image generated successfully
  • FAILED: Generation failed, check error_message

Error Response

json
{
  "code": 100001,
  "msg": "Parameter error: prompt is required"
}

Callback Notification

Provide callback_url when creating a task. The system will send a POST request to that URL upon task completion:

json
{
  "code": 0,
  "msg": "ok",
  "task_type": "image_generate",
  "data": {
    "task_id": "i2is-18e830d27ea041658e4accd576ea7008",
    "status": "SUCCEEDED",
    "image_url": "https://storage.googleapis.com/.../image.png",
    "error_message": ""
  }
}

Callback field descriptions:

  • code: Status code, 0 indicates success
  • task_type: Fixed as image_generate
  • data.task_id: Task ID
  • data.status: SUCCEEDED or FAILED
  • data.image_url: Generated image URL (on success)
  • data.error_message: Error message (on failure)

Polling Strategy

Image generation typically completes within a few minutes. Recommended: 10-second intervals, max 60 retries (up to 10 minutes). If timeout is reached, direct the user to https://www.keevx.com/main/meta/creations to retrieve the result.

bash
MAX_RETRIES=60
INTERVAL=10

for i in $(seq 1 $MAX_RETRIES); do
  status=$(curl -s -X GET "$API_BASE/image_generate/$TASK_ID" \
    -H "Authorization: Bearer $KEEVX_API_KEY" \
    -H "source: skill" | jq -r '.data.status')

  if [ "$status" = "SUCCEEDED" ]; then echo "Success"; break
  elif [ "$status" = "FAILED" ]; then echo "Failed"; break; fi

  sleep $INTERVAL
done

echo "Maximum wait time (10 minutes) reached. The task may still be processing."
echo "Please visit https://www.keevx.com/main/meta/creations to check and retrieve the result."

When generate_count > 1, poll each task_id from the response individually.

Error Codes

HTTP Status CodeDescription
200Success
400Parameter error
401Authentication failed
429Rate limit exceeded
500Internal server error
Business Error CodeDescriptionSolution
100001Parameter errorCheck parameter format and required fields
100002Validation failedVerify parameter values are within valid ranges
530002Image processing errorEnsure image URL is accessible, format supported, size under 20MB
530003Task creation failedRetry the request
110002Task not foundVerify task_id is correct

Notes

  • Generated image URLs are retained for 7 days only; download promptly
  • Max reference image size: 20MB per image, supported formats: JPG/JPEG/PNG/BMP/WebP/GIF
  • Max prompt length: 1000 characters
  • Reference images exceeding 5 will be silently truncated to 5
  • Images over 15MB are automatically compressed to WebP before processing
  • Prompt tips: describe subject, style, composition, lighting, mood, and color palette for best results

相关 Skills

文档共著

by anthropics

Universal
热门

围绕文档、提案、技术规格、决策记录等写作任务,按上下文收集、结构迭代、读者测试三步协作共创,减少信息遗漏,写出更清晰、经得起他人阅读的内容。

写文档、方案或技术规格时容易思路散、信息漏,它用结构化共著流程帮你高效传递上下文、反复打磨内容,还能从读者视角做验证。

内容与创意
未扫描139.0k

内部沟通

by anthropics

Universal
热门

按公司常用模板和语气快速起草内部沟通内容,覆盖 3P 更新、状态报告、领导汇报、项目进展、事故复盘、FAQ 与 newsletter,适合需要统一格式的团队沟通场景。

按公司偏好的模板快速产出状态汇报、领导更新和 FAQ,既省去反复改稿,也让内部沟通更统一、更专业。

内容与创意
未扫描139.0k

平面设计

by anthropics

Universal
热门

先生成视觉哲学,再落地成原创海报、艺术画面或其他静态设计,输出 .png/.pdf,强调构图、色彩与空间表达,适合需要高完成度视觉成品的场景。

做海报、插画或静态视觉稿时,用它能快速产出兼顾美感与版式的PNG/PDF成品,原创设计更省心,也更适合规避版权风险。

内容与创意
未扫描139.0k

相关 MCP 服务

免费的加密新闻聚合 MCP,汇集 Bitcoin、Ethereum、DeFi、Solana 与 altcoins 资讯源。

内容与创意
212

by ProfessionalWiki

热门

让 Large Language Model 客户端无缝连接任意 MediaWiki 站点,可创建、更新、搜索页面,并通过 OAuth 2.0 安全管理内容。

内容与创意16 个工具
94

by roomi-fields

热门

Automate Google NotebookLM — Q&A with citations, audio, video, content generation

内容与创意
79

评论