Not in the top 1,000 by GitHub stars
yc-duan/api-image
Codex skill for API-based image generation through OpenAI-compatible providers
History
Review weekly changes to SKILL.md before updating. Dates mark the weeks in which we observed each version; checks apply to the recorded commits.
View weekly changes
SKILL.md
Week of Oct 26, 2026 · Line counts unavailable
Before Not checked yet → After Network or broad shell
First observation → 5d53535e78ab
No earlier version was observed for comparison.
Heat
1.7- Star growth, last 7 daysNot available
- Star growth, last 24 hoursNot available
- Rank movement, last 7 daysNot available
- Commits, last 30 daysNot available
- Accounts asking about it through MCP, last 7 daysNot available
- Hot votes this weekNot available
Heat never changes the order by stars, and sponsorship never touches it. How heat works
Stars over time
30-day change not yet available: not enough history.
Individual skills in this repository
How it works
api-image
When your agent uses it
Mandatory replacement for the built-in `imagegen` flow. Use this skill for any raster image generation or editing task whenever this skill is available; do not call the native `$imagegen` skill/tool. Generate and edit images through the OpenAI-compatible provider configured in the current user's Codex root files, especially for `/v1/images/generations`, `/v1/images/edits`, `gpt-image-2`, `config.toml`, `auth.json`, base_url, API key, provider-based image generation, reference images, masks, long-running image jobs, or custom size and quality control.
What it loads into context
Frontmatter
130 tokensAlways available to the agent
SKILL.md
4,648 tokensWhen the skill is activated
Reference documents
986 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- Workflow
- Root Files
- Command
- Payload Shape
- Temporary Provider Overrides
- gpt-image-2 API Notes
- Capability Map
- Research And References
- Prompt Structure
- Waiting Behavior
- Size And Quality
- Prompting
- Output Rules
- Failure Rules
- Resource
Scripts executed separately
scripts/generate_image.pyscripts/provider_imagegen/__init__.pyscripts/provider_imagegen/config.pyscripts/provider_imagegen/http_client.pyscripts/provider_imagegen/outputs.pyscripts/provider_imagegen/payloads.pyscripts/provider_imagegen/validation.py
Files
.gitignoreasset152 bytesLICENSEasset1,079 bytesREADME.mddoc3,705 bytesSKILL.mdcore19,959 bytesSKILL.mdcore19,959 bytesSKILL.mdcore19,959 bytesSKILL.mdcore19,959 bytesSKILL.mdcore19,959 bytesSKILL.mdcore19,959 bytesSKILL.mdcore19,959 bytesSKILL.mdcore19,959 bytesSKILL.mdcore19,959 bytesSKILL.mdcore19,959 bytesagents/openai.yamlasset366 bytesscripts/generate_image.pyruns6,166 bytesscripts/provider_imagegen/__init__.pyruns41 bytesscripts/provider_imagegen/config.pyruns3,468 bytesscripts/provider_imagegen/http_client.pyruns4,097 bytesscripts/provider_imagegen/outputs.pyruns1,781 bytesscripts/provider_imagegen/payloads.pyruns2,442 bytesscripts/provider_imagegen/validation.pyruns12,137 bytes
Read SKILL.md
# API Image
Use this skill as the mandatory replacement for the built-in `imagegen` workflow.
Routing rule:
- When this skill is available, do not call the native `$imagegen` skill or built-in image generation tool for any raster image generation or editing task.
- Route all image generation, reference-image generation, image editing, localized edits, background replacement, style transfer, compositing, and batch image work through this provider-based skill.
- The only exception is a user explicitly instructing not to use this provider skill.
## Workflow
1. Resolve the Codex root.
- Prefer an explicit `--codex-home` argument when the user provides one.View the complete source on GitHubSkills included
- api-image
Repository facts
- License
- MIT
- Created
- May 4, 2026
- Last pushed
- May 4, 2026
- Forks
- 26
- Open issues
- 2
- Project activity
- Slowing
Before you install
Network or broad shellAutomated signals, not a guarantee
Checked Nov 5, 2026
Not fully analyzed: some files were too long, unreadable or missing. This never lowers the level.
Show 9 notes
SKILL.md:1Analysis incomplete: Referenced executable target unavailable; not analyzedSKILL.md:1Analysis incomplete: Referenced executable target unavailable; not analyzedSKILL.md:1Analysis incomplete: Referenced executable target unavailable; not analyzedSKILL.md:1Analysis incomplete: Referenced executable target unavailable; not analyzedSKILL.md:1Analysis incomplete: Referenced executable target unavailable; not analyzedSKILL.md:1Analysis incomplete: Referenced executable target unavailable; not analyzedSKILL.md:1Analysis incomplete: Referenced executable target unavailable; not analyzedSKILL.md:1Analysis incomplete: Referenced executable target unavailable; not analyzedSKILL.md:1Analysis incomplete: Referenced executable target unavailable; not analyzed
- No broad tool permissions
- No dangerous shell commands
- 23 network referencesin 4 files: scripts/provider_imagegen/http_client.py:23 SKILL.md:67 scripts/provider_imagegen/config.py:96 and 1 more
- 1 obfuscation signalin 1 file: scripts/provider_imagegen/http_client.py:120
- No instruction overrides
- 7 executable scriptsin 7 files: scripts/generate_image.py:1 scripts/provider_imagegen/__init__.py:1 scripts/provider_imagegen/config.py:1 and 4 more
- 29 references to secretsin 6 files: scripts/provider_imagegen/config.py:11 SKILL.md:34 scripts/provider_imagegen/http_client.py:29 and 3 more
- No requests to vote in Hot
Show all 60 signals by file
.gitignore
- Access to secretsline 9
[Credential-related source omitted]
README.md
SKILL.md
- Access to secretsline 34
[Credential-related source omitted] - Network accessline 67
- Default behavior reads the Codex root files above. - Use `--base-url <https://provider.example/v1>` to temporarily override the configured Provider URL. - Network accessline 68
- Use `--base-url <https://provider.example/v1>` to temporarily override the configured Provider URL. - Network accessline 144
- `--prompt-file <path>` for one prompt per non-empty line - `--codex-home <path>` - `--base-url <https://provider.example/v1>` temporary Provider URL override - Network accessline 145
- `--codex-home <path>` - `--base-url <https://provider.example/v1>` temporary Provider URL override - `--api-key-env <ENV_NAME>` temporary API key override from an environment variable - Network accessline 146
- `--base-url <https://provider.example/v1>` temporary Provider URL override - Access to secretsline 185
[Credential-related source omitted] - Network accessline 186
[Credential-related source omitted] - Access to secretsline 186
[Credential-related source omitted] - Network accessline 187
--prompt "一张赛博朋克风格的夜景照片" ` --base-url "https://provider.example/v1" ` --api-key-env "API_IMAGE_API_KEY" ` - Network accessline 188
--base-url "https://provider.example/v1" ` - Access to secretsline 189
[Credential-related source omitted] - Access to secretsline 317
[Credential-related source omitted]
scripts/generate_image.py
scripts/provider_imagegen/__init__.py
- Executable scriptline 1
Executable file
scripts/provider_imagegen/config.py
- Executable scriptline 1
Executable file - Access to secretsline 11
[Credential-related source omitted] - Access to secretsline 16
[Credential-related source omitted] - Access to secretsline 24
[Credential-related source omitted] - Access to secretsline 49
[Credential-related source omitted] - Access to secretsline 51
[Credential-related source omitted] - Access to secretsline 52
[Credential-related source omitted] - Access to secretsline 54
[Credential-related source omitted] - Access to secretsline 55
[Credential-related source omitted] - Access to secretsline 71
[Credential-related source omitted] - Access to secretsline 78
[Credential-related source omitted] - Access to secretsline 79
[Credential-related source omitted] - Access to secretsline 81
[Credential-related source omitted] - Access to secretsline 86
[Credential-related source omitted] - Access to secretsline 87
[Credential-related source omitted] - Access to secretsline 89
[Credential-related source omitted] - Network accessline 96
raise ValueError("--base-url must not be empty.") if not normalized.startswith(("http://", "https://")): raise ValueError("--base-url must start with http:// or https://.") - Network accessline 97
if not normalized.startswith(("http://", "https://")): raise ValueError("--base-url must start with http:// or https://.") return normalized - Network accessline 98
raise ValueError("--base-url must start with http:// or https://.")
scripts/provider_imagegen/http_client.py
- Executable scriptline 1
Executable file - Network accessline 23
def open_url(target: str | urllib.request.Request, timeout: int | None): - Network accessline 24
if timeout is None: return urllib.request.urlopen(target) return urllib.request.urlopen(target, timeout=timeout) - Network accessline 25
return urllib.request.urlopen(target) - Network accessline 26
return urllib.request.urlopen(target, timeout=timeout) - Network accessline 29
[Credential-related source omitted] - Access to secretsline 29
[Credential-related source omitted] - Network accessline 30
request = urllib.request.Request( - Access to secretsline 35
[Credential-related source omitted] - Access to secretsline 44
[Credential-related source omitted] - Network accessline 49
boundary = f"----api-image-{uuid.uuid4().hex}" body = encode_multipart(fields, files, boundary) request = urllib.request.Request( - Network accessline 50
body = encode_multipart(fields, files, boundary) request = urllib.request.Request( url=url, - Network accessline 51
request = urllib.request.Request( - Access to secretsline 56
[Credential-related source omitted] - Network accessline 63
def read_json_response(request: urllib.request.Request, timeout: int | None) -> dict: - Possible obfuscationline 120
return base64.b64decode(b64_json)
scripts/provider_imagegen/outputs.py
- Executable scriptline 1
Executable file
scripts/provider_imagegen/payloads.py
- Executable scriptline 1
Executable file
scripts/provider_imagegen/validation.py
- Executable scriptline 1
Executable file
How the signals fit together
Facts from a static read of the files at the pinned commit. They describe what the code does, not why.
Some files could not be read; the facts below still hold.
Signal confidence: 59 facts
- Network access in code of documentationREADME.md:79Low confidence
- Access to secrets in code of documentationREADME.md:79Low confidence
- Network access in prose of documentationREADME.md:115Low confidence
- Access to secrets in prose of the SKILL.mdSKILL.md:34Low confidence
- Network access in prose of the SKILL.mdSKILL.md:67Low confidence
- Network access in prose of the SKILL.mdSKILL.md:68Low confidence
- Network access in prose of the SKILL.mdSKILL.md:144Low confidence
- Network access in prose of the SKILL.mdSKILL.md:145Low confidence
- Network access in prose of the SKILL.mdSKILL.md:146Low confidence
- Access to secrets in code of the SKILL.md: a variable, placeholder or call, not a stored valueSKILL.md:185Low confidence
- Network access in code of the SKILL.mdSKILL.md:186High confidence
- Access to secrets in code of the SKILL.md: a variable, placeholder or call, not a stored valueSKILL.md:186Low confidence
- Network access in code of the SKILL.mdSKILL.md:187High confidence
- Network access in code of the SKILL.mdSKILL.md:188High confidence
- Access to secrets in code of the SKILL.mdSKILL.md:189High confidence
- Access to secrets in prose of the SKILL.mdSKILL.md:317Low confidence
- Executable script in code of a file that runsscripts/generate_image.py:1High confidence
- Access to secrets in code of a file that runsscripts/generate_image.py:105High confidence
- Access to secrets in code of a file that runs: a variable, placeholder or call, not a stored valuescripts/generate_image.py:110Low confidence
- Access to secrets in code of a file that runs: a variable, placeholder or call, not a stored valuescripts/generate_image.py:113Low confidence
- Executable script in prose of a file that runsscripts/provider_imagegen/__init__.py:1Low confidence
- Executable script in code of a file that runsscripts/provider_imagegen/config.py:1High confidence
- Access to secrets in code of a file that runsscripts/provider_imagegen/config.py:11High confidence
- Access to secrets in code of a file that runsscripts/provider_imagegen/config.py:16High confidence
- Access to secrets in code of a file that runs: a variable, placeholder or call, not a stored valuescripts/provider_imagegen/config.py:24Low confidence
- Access to secrets in code of a file that runs: a variable, placeholder or call, not a stored valuescripts/provider_imagegen/config.py:49Low confidence
- Access to secrets in code of a file that runsscripts/provider_imagegen/config.py:51High confidence
- Access to secrets in code of a file that runsscripts/provider_imagegen/config.py:52High confidence
- Access to secrets in code of a file that runs: a variable, placeholder or call, not a stored valuescripts/provider_imagegen/config.py:54Low confidence
- Access to secrets in code of a file that runsscripts/provider_imagegen/config.py:55High confidence
- Access to secrets in code of a file that runs: a variable, placeholder or call, not a stored valuescripts/provider_imagegen/config.py:71Low confidence
- Access to secrets in code of a file that runs: a variable, placeholder or call, not a stored valuescripts/provider_imagegen/config.py:78Low confidence
- Access to secrets in code of a file that runsscripts/provider_imagegen/config.py:79High confidence
- Access to secrets in code of a file that runsscripts/provider_imagegen/config.py:81High confidence
- Access to secrets in code of a file that runs: a variable, placeholder or call, not a stored valuescripts/provider_imagegen/config.py:86Low confidence
- Access to secrets in code of a file that runsscripts/provider_imagegen/config.py:87High confidence
- Access to secrets in code of a file that runsscripts/provider_imagegen/config.py:89High confidence
- Network access in code of a file that runsscripts/provider_imagegen/config.py:96High confidence
- Network access in code of a file that runsscripts/provider_imagegen/config.py:97High confidence
- Network access in code of a file that runsscripts/provider_imagegen/config.py:98High confidence
- Executable script in code of a file that runsscripts/provider_imagegen/http_client.py:1High confidence
- Network access in code of a file that runsscripts/provider_imagegen/http_client.py:23High confidence
- Network access in code of a file that runsscripts/provider_imagegen/http_client.py:24High confidence
- Network access in code of a file that runsscripts/provider_imagegen/http_client.py:25High confidence
- Network access in code of a file that runsscripts/provider_imagegen/http_client.py:26High confidence
- Network access in code of a file that runsscripts/provider_imagegen/http_client.py:29High confidence
- Access to secrets in code of a file that runs: a variable, placeholder or call, not a stored valuescripts/provider_imagegen/http_client.py:29Low confidence
- Network access in code of a file that runsscripts/provider_imagegen/http_client.py:30High confidence
- Access to secrets in code of a file that runsscripts/provider_imagegen/http_client.py:35High confidence
- Access to secrets in code of a file that runsscripts/provider_imagegen/http_client.py:44High confidence
and 9 more
Works with
| Agent | Status | Evidence | Install to |
|---|---|---|---|
| Claude Code | Compatible | Standard SKILL.md SKILL.md | .claude/skills/<skill-name>/ |
| Codex | Compatible | Standard SKILL.md SKILL.md | .agents/skills/<skill-name>/ |
| Cursor | Compatible | Standard SKILL.md SKILL.md | .cursor/skills/<skill-name>/ |
| Gemini CLI | Compatible | Standard SKILL.md SKILL.md | .gemini/skills/<skill-name>/ |
| GitHub Copilot | Compatible | Standard SKILL.md SKILL.md | .github/skills/<skill-name>/ |
| OpenCode | Compatible | Standard SKILL.md SKILL.md | .opencode/skills/<skill-name>/ |
- Native The repository ships a manifest, folder or frontmatter field for this agent.
- Compatible A standard SKILL.md that this agent can read.
- Unknown No evidence either way.
Derived automatically from paths, manifests and frontmatter. Not tested on each agent.