# Send Microsoft Foundry image generation to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- 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.
## Suggested prompts
### New install

```text
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.
```
### Upgrade existing

```text
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.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "ms-foundry-image-gen",
    "name": "Microsoft Foundry image generation",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/jacqueskang/ms-foundry-image-gen",
    "canonicalUrl": "https://clawhub.ai/jacqueskang/ms-foundry-image-gen",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/ms-foundry-image-gen",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=ms-foundry-image-gen",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "ms-foundry-image-gen",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-02T11:01:54.707Z",
      "expiresAt": "2026-05-09T11:01:54.707Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=ms-foundry-image-gen",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=ms-foundry-image-gen",
        "contentDisposition": "attachment; filename=\"ms-foundry-image-gen-1.0.6.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "ms-foundry-image-gen"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/ms-foundry-image-gen"
    },
    "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."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/ms-foundry-image-gen",
    "downloadUrl": "https://openagent3.xyz/downloads/ms-foundry-image-gen",
    "agentUrl": "https://openagent3.xyz/skills/ms-foundry-image-gen/agent",
    "manifestUrl": "https://openagent3.xyz/skills/ms-foundry-image-gen/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/ms-foundry-image-gen/agent.md"
  }
}
```
## Documentation

### Azure Foundry Image Generation

AI image generation using an Azure Foundry (Cognitive Services / OpenAI) images deployment. Returns raw image bytes (PNG/JPEG) or a URL depending on the deployment response.

### Overview

Requires network access to your Foundry endpoint and a valid API key.

### Usage

Set environment variables (example):

export FOUNDRY_ENDPOINT="https://aif-sbxe2e-ai-agent-02.cognitiveservices.azure.com/"
export FOUNDRY_API_KEY="<your_api_key>"
export FOUNDRY_DEPLOYMENT="FLUX-1.1-pro"
export FOUNDRY_API_VERSION="2025-04-01-preview"

Generate an image (safe example using jq to build JSON):

# Basic validation (reject obviously malformed endpoints)
if ! printf '%s' "${FOUNDRY_ENDPOINT:-}" | grep -Eq '^https?://[A-Za-z0-9._:-]+/?$'; then
  echo "FOUNDRY_ENDPOINT looks unsafe or is not set" >&2
  exit 1
fi

url="${FOUNDRY_ENDPOINT%/}/openai/deployments/${FOUNDRY_DEPLOYMENT}/images/generations?api-version=${FOUNDRY_API_VERSION:-2025-04-01-preview}"

PROMPT="a red fox"
jq -n --arg prompt "$PROMPT" '{prompt:$prompt, n:1, size:"1024x1024", output_format:"png"}' | \\
  curl --fail --show-error --silent \\
    --url "$url" \\
    -H 'Content-Type: application/json' \\
    -H "api-key: ${FOUNDRY_API_KEY}" \\
    --data-binary @- -o /tmp/generation_result.json
  
# Stream base64 payload to avoid storing large values in shell variables
jq -r '.data[0].b64_json' /tmp/generation_result.json | base64 --decode > /tmp/generated_image.png
echo "Image saved to: /tmp/generated_image.png"

### Options

FOUNDRY_ENDPOINT (required): Azure base URI for Foundry (include scheme, e.g. https://<name>.cognitiveservices.azure.com/)
FOUNDRY_API_KEY (required): API key (primary credential)
FOUNDRY_DEPLOYMENT (required): Deployment name to call
FOUNDRY_API_VERSION (optional): API version (default: 2025-04-01-preview)

### Notes

The skill manifest (src/manifest.json) declares the required environment variables and marks FOUNDRY_API_KEY as the primary credential.
This document provides a safe example using jq --arg and streaming to prevent shell interpolation and command-injection risks.

### Troubleshooting

If you see authentication errors, verify FOUNDRY_API_KEY permissions for the deployment.
If jq or base64 are missing, install them via your package manager (e.g., apt install jq coreutils on Debian/Ubuntu).

### License / Attribution

This skill is a minimal wrapper around the Foundry images generation REST endpoint for use in OpenClaw workflows.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: jacqueskang
- Version: 1.0.6
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-02T11:01:54.707Z
- Expires at: 2026-05-09T11:01:54.707Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/ms-foundry-image-gen)
- [Send to Agent page](https://openagent3.xyz/skills/ms-foundry-image-gen/agent)
- [JSON manifest](https://openagent3.xyz/skills/ms-foundry-image-gen/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/ms-foundry-image-gen/agent.md)
- [Download page](https://openagent3.xyz/downloads/ms-foundry-image-gen)