{
  "schemaVersion": "1.0",
  "item": {
    "slug": "grok-imagine-image-pro",
    "name": "Grok Imagine Image Pro",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/NixeiFoit/grok-imagine-image-pro",
    "canonicalUrl": "https://clawhub.ai/NixeiFoit/grok-imagine-image-pro",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/grok-imagine-image-pro",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=grok-imagine-image-pro",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/grok-imagine-image-pro"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/grok-imagine-image-pro",
    "agentPageUrl": "https://openagent3.xyz/skills/grok-imagine-image-pro/agent",
    "manifestUrl": "https://openagent3.xyz/skills/grok-imagine-image-pro/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/grok-imagine-image-pro/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Grok Imagine Image Pro",
        "body": "API Key: $XAI_API_KEY (already configured)\nSave dir: ~/.openclaw/media/ (resolves to /data/.openclaw/media/ — allowed for Telegram sending)"
      },
      {
        "title": "Available Models",
        "body": "grok-imagine-image — standard quality, faster\ngrok-imagine-image-pro — higher quality (default for generation)"
      },
      {
        "title": "1. Image Generation",
        "body": "curl -s https://api.x.ai/v1/images/generations \\\n  -H \"Authorization: Bearer $XAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  --data '{\n    \"model\": \"grok-imagine-image-pro\",\n    \"prompt\": \"<PROMPT>\",\n    \"n\": 1,\n    \"response_format\": \"b64_json\"\n  }' | python3 -c \"\nimport json, sys, base64, os, time\nos.makedirs(os.path.expanduser('~/.openclaw/media'), exist_ok=True)\nr = json.load(sys.stdin)\nts = int(time.time())\nfor i, img in enumerate(r['data']):\n    img_data = base64.b64decode(img['b64_json'])\n    fpath = os.path.expanduser(f'~/.openclaw/media/generated_{ts}_{i}.png')\n    with open(fpath, 'wb') as f:\n        f.write(img_data)\n    print(fpath)\n\""
      },
      {
        "title": "Aspect Ratios",
        "body": "Add \"aspect_ratio\": \"<ratio>\" to the JSON body. Supported values:\n\nRatioUse case1:1Social media, thumbnails16:9 / 9:16Widescreen, mobile stories4:3 / 3:4Presentations, portraits3:2 / 2:3Photography2:1 / 1:2Banners, headersautoModel picks best ratio (default)"
      },
      {
        "title": "Batch Generation",
        "body": "Set \"n\": <count> (1-10) to generate multiple images in one request."
      },
      {
        "title": "2. Image Editing / Style Transfer",
        "body": "Edit an existing image by providing a source image plus an edit prompt.\nUses the same /v1/images/generations endpoint with an added image_url field.\n\nDo NOT use /v1/images/edits with multipart — xAI requires JSON.\n\nIMPORTANT: For local files, use Python to build the payload JSON file, then curl with @file.\nInline base64 in curl args causes \"Argument list too long\" for images >~100KB.\n\nNOTE: This is NOT true image editing — the API generates a new image inspired by the source.\nIt cannot make pixel-precise edits (e.g. changing only a car's color while keeping everything else identical)."
      },
      {
        "title": "Edit from local file (recommended approach):",
        "body": "python3 -c \"\nimport json, base64\nwith open('<SOURCE_PATH>', 'rb') as f:\n    b64 = base64.b64encode(f.read()).decode()\npayload = {\n    'model': 'grok-imagine-image',\n    'prompt': '<EDIT_PROMPT>',\n    'image_url': f'data:image/png;base64,{b64}',\n    'n': 1,\n    'response_format': 'b64_json'\n}\nwith open('/tmp/img_edit_payload.json', 'w') as f:\n    json.dump(payload, f)\nprint('Payload ready')\n\" && \\\ncurl -s https://api.x.ai/v1/images/generations \\\n  -H \"Authorization: Bearer $XAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d @/tmp/img_edit_payload.json | python3 -c \"\nimport json, sys, base64, os, time\nos.makedirs(os.path.expanduser('~/.openclaw/media'), exist_ok=True)\nr = json.load(sys.stdin)\nimg_data = base64.b64decode(r['data'][0]['b64_json'])\nfpath = os.path.expanduser(f'~/.openclaw/media/edited_{int(time.time())}.png')\nwith open(fpath, 'wb') as f:\n    f.write(img_data)\nprint(fpath)\n\""
      },
      {
        "title": "Edit from URL:",
        "body": "curl -s https://api.x.ai/v1/images/generations \\\n  -H \"Authorization: Bearer $XAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  --data '{\n    \"model\": \"grok-imagine-image\",\n    \"prompt\": \"<EDIT_PROMPT>\",\n    \"image_url\": \"<PUBLIC_IMAGE_URL>\",\n    \"n\": 1,\n    \"response_format\": \"b64_json\"\n  }' | python3 -c \"\nimport json, sys, base64, os, time\nos.makedirs(os.path.expanduser('~/.openclaw/media'), exist_ok=True)\nr = json.load(sys.stdin)\nimg_data = base64.b64decode(r['data'][0]['b64_json'])\nfpath = os.path.expanduser(f'~/.openclaw/media/edited_{int(time.time())}.png')\nwith open(fpath, 'wb') as f:\n    f.write(img_data)\nprint(fpath)\n\""
      },
      {
        "title": "Style Transfer Examples",
        "body": "Use editing with a style prompt, e.g.:\n\n\"Render this as an oil painting in impressionist style\"\n\"Make this a pencil sketch with detailed shading\"\n\"Convert to pop art with bold colors\"\n\"Watercolor painting with soft edges\""
      },
      {
        "title": "3. Sending to Telegram",
        "body": "message tool: action=send, channel=telegram, target=<id>,\n  message=\"<caption>\", filePath=~/.openclaw/media/<file>.png\n\nAlways include message field (required even for media-only sends)\nAllowed media paths: /tmp/, ~/.openclaw/media/, ~/.openclaw/agents/"
      },
      {
        "title": "Notes",
        "body": "Do NOT pass size parameter — returns 400\nAspect ratio: pass aspect_ratio in JSON body (not size)\nEditing: use image_url field in the generations endpoint (NOT the edits endpoint with multipart)\nAlways use \"response_format\": \"b64_json\" — URL format returns temporary URLs that often 403\nFor large images: build payload with Python → save to /tmp/ → curl with @file syntax\nMax 10 images per request\nImages are subject to content moderation\nEditing is style-transfer/reimagination, NOT pixel-precise inpainting"
      }
    ],
    "body": "Grok Imagine Image Pro\n\nAPI Key: $XAI_API_KEY (already configured) Save dir: ~/.openclaw/media/ (resolves to /data/.openclaw/media/ — allowed for Telegram sending)\n\nAvailable Models\ngrok-imagine-image — standard quality, faster\ngrok-imagine-image-pro — higher quality (default for generation)\n1. Image Generation\ncurl -s https://api.x.ai/v1/images/generations \\\n  -H \"Authorization: Bearer $XAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  --data '{\n    \"model\": \"grok-imagine-image-pro\",\n    \"prompt\": \"<PROMPT>\",\n    \"n\": 1,\n    \"response_format\": \"b64_json\"\n  }' | python3 -c \"\nimport json, sys, base64, os, time\nos.makedirs(os.path.expanduser('~/.openclaw/media'), exist_ok=True)\nr = json.load(sys.stdin)\nts = int(time.time())\nfor i, img in enumerate(r['data']):\n    img_data = base64.b64decode(img['b64_json'])\n    fpath = os.path.expanduser(f'~/.openclaw/media/generated_{ts}_{i}.png')\n    with open(fpath, 'wb') as f:\n        f.write(img_data)\n    print(fpath)\n\"\n\nAspect Ratios\n\nAdd \"aspect_ratio\": \"<ratio>\" to the JSON body. Supported values:\n\nRatio\tUse case\n1:1\tSocial media, thumbnails\n16:9 / 9:16\tWidescreen, mobile stories\n4:3 / 3:4\tPresentations, portraits\n3:2 / 2:3\tPhotography\n2:1 / 1:2\tBanners, headers\nauto\tModel picks best ratio (default)\nBatch Generation\n\nSet \"n\": <count> (1-10) to generate multiple images in one request.\n\n2. Image Editing / Style Transfer\n\nEdit an existing image by providing a source image plus an edit prompt. Uses the same /v1/images/generations endpoint with an added image_url field.\n\nDo NOT use /v1/images/edits with multipart — xAI requires JSON.\n\nIMPORTANT: For local files, use Python to build the payload JSON file, then curl with @file. Inline base64 in curl args causes \"Argument list too long\" for images >~100KB.\n\nNOTE: This is NOT true image editing — the API generates a new image inspired by the source. It cannot make pixel-precise edits (e.g. changing only a car's color while keeping everything else identical).\n\nEdit from local file (recommended approach):\npython3 -c \"\nimport json, base64\nwith open('<SOURCE_PATH>', 'rb') as f:\n    b64 = base64.b64encode(f.read()).decode()\npayload = {\n    'model': 'grok-imagine-image',\n    'prompt': '<EDIT_PROMPT>',\n    'image_url': f'data:image/png;base64,{b64}',\n    'n': 1,\n    'response_format': 'b64_json'\n}\nwith open('/tmp/img_edit_payload.json', 'w') as f:\n    json.dump(payload, f)\nprint('Payload ready')\n\" && \\\ncurl -s https://api.x.ai/v1/images/generations \\\n  -H \"Authorization: Bearer $XAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d @/tmp/img_edit_payload.json | python3 -c \"\nimport json, sys, base64, os, time\nos.makedirs(os.path.expanduser('~/.openclaw/media'), exist_ok=True)\nr = json.load(sys.stdin)\nimg_data = base64.b64decode(r['data'][0]['b64_json'])\nfpath = os.path.expanduser(f'~/.openclaw/media/edited_{int(time.time())}.png')\nwith open(fpath, 'wb') as f:\n    f.write(img_data)\nprint(fpath)\n\"\n\nEdit from URL:\ncurl -s https://api.x.ai/v1/images/generations \\\n  -H \"Authorization: Bearer $XAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  --data '{\n    \"model\": \"grok-imagine-image\",\n    \"prompt\": \"<EDIT_PROMPT>\",\n    \"image_url\": \"<PUBLIC_IMAGE_URL>\",\n    \"n\": 1,\n    \"response_format\": \"b64_json\"\n  }' | python3 -c \"\nimport json, sys, base64, os, time\nos.makedirs(os.path.expanduser('~/.openclaw/media'), exist_ok=True)\nr = json.load(sys.stdin)\nimg_data = base64.b64decode(r['data'][0]['b64_json'])\nfpath = os.path.expanduser(f'~/.openclaw/media/edited_{int(time.time())}.png')\nwith open(fpath, 'wb') as f:\n    f.write(img_data)\nprint(fpath)\n\"\n\nStyle Transfer Examples\n\nUse editing with a style prompt, e.g.:\n\n\"Render this as an oil painting in impressionist style\"\n\"Make this a pencil sketch with detailed shading\"\n\"Convert to pop art with bold colors\"\n\"Watercolor painting with soft edges\"\n3. Sending to Telegram\nmessage tool: action=send, channel=telegram, target=<id>,\n  message=\"<caption>\", filePath=~/.openclaw/media/<file>.png\n\nAlways include message field (required even for media-only sends)\nAllowed media paths: /tmp/, ~/.openclaw/media/, ~/.openclaw/agents/\nNotes\nDo NOT pass size parameter — returns 400\nAspect ratio: pass aspect_ratio in JSON body (not size)\nEditing: use image_url field in the generations endpoint (NOT the edits endpoint with multipart)\nAlways use \"response_format\": \"b64_json\" — URL format returns temporary URLs that often 403\nFor large images: build payload with Python → save to /tmp/ → curl with @file syntax\nMax 10 images per request\nImages are subject to content moderation\nEditing is style-transfer/reimagination, NOT pixel-precise inpainting"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/NixeiFoit/grok-imagine-image-pro",
    "publisherUrl": "https://clawhub.ai/NixeiFoit/grok-imagine-image-pro",
    "owner": "NixeiFoit",
    "version": "1.0.2",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/grok-imagine-image-pro",
    "downloadUrl": "https://openagent3.xyz/downloads/grok-imagine-image-pro",
    "agentUrl": "https://openagent3.xyz/skills/grok-imagine-image-pro/agent",
    "manifestUrl": "https://openagent3.xyz/skills/grok-imagine-image-pro/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/grok-imagine-image-pro/agent.md"
  }
}