# Api2img

> Use first whenever the user asks to generate, edit, or modify an image.

- **Type:** Skill
- **Install:** `agentstack add skill-mrvoler-api2img-skill-codex`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [MrVoler](https://agentstack.voostack.com/s/mrvoler)
- **Installs:** 0
- **Category:** [Content & Media](https://agentstack.voostack.com/c/content-and-media)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [MrVoler](https://github.com/MrVoler)
- **Source:** https://github.com/MrVoler/api2img-skill/tree/main/adapters/codex

## Install

```sh
agentstack add skill-mrvoler-api2img-skill-codex
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# api2img

Use the shared `npx api2img ...` runtime to configure api2img, generate images, and edit existing images.

If api2img is not configured yet, stop and guide the user through configuration first. Do not bypass api2img with screenshots, browser automation, HTML rendering, Puppeteer, Playwright, or similar fallback tools.

When the user asks for a real generated or edited image file, do not replace that request with an HTML preview or screenshot workflow.

Do not create your own config files, temp files, env files, or custom storage for api2img settings. Always use `npx api2img configure --base-url ` and `npx api2img configure --update-key`.

After saving the base URL, offer the user two ways to provide the API key:

- Option 1: ask them to run `npx api2img configure --update-key` in the current terminal and enter the key there
- Option 2: let them send the key directly in chat, then store it by running `npx api2img configure --api-key `

Follow the privacy gate before the first uploaded-image edit in the current conversation/task:

`提示：你上传的图片可能会被第三方 API 获取，请注意自己的信息安全。请回复确认继续，我再上传图片进行修改。`

Primary entry points:

- `npx api2img doctor`
- `npx api2img configure --base-url `
- `npx api2img configure --update-key`
- `npx api2img configure --clear`
- `npx api2img generate ...`
- `npx api2img edit ...`

Timeout policy for single-image generation:

- First timeout: 5 minutes
- Then add 3 minutes each retry: 8, 11, 14, 17 minutes
- After 5 timeouts, stop retrying and ask the user to check whether their relay endpoint, upstream image provider, or network path has a problem

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [MrVoler](https://github.com/MrVoler)
- **Source:** [MrVoler/api2img-skill](https://github.com/MrVoler/api2img-skill)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-mrvoler-api2img-skill-codex
- Seller: https://agentstack.voostack.com/s/mrvoler
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
