← 返回
未分类

github-image-hosting

Upload images to img402.dev for embedding in GitHub PRs, issues, and comments. Free tier (1MB, 7-day, no auth) is the default; paid tiers add 5MB max with 1-year ($0.01) or permanent ($1) retention via x402. Use when the agent needs to share an image in a GitHub context — screenshots, mockups, diagrams, or any visual. Triggers: "screenshot this", "attach an image", "add a screenshot to the PR", "upload this mockup", or any task producing an image for GitHub.
Upload images to img402.dev for embedding in GitHub PRs, issues, and comments. Free tier (1MB, 7-day, no auth) is the default; paid tiers add 5MB max with 1-year ($0.01) or permanent ($1) retention via x402. Use when the agent needs to share an image in a GitHub context — screenshots, mockups, diagrams, or any visual. Triggers: "screenshot this", "attach an image", "add a screenshot to the PR", "upload this mockup", or any task producing an image for GitHub.
yjkj999999
未分类 community v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 18
下载
💾 0
安装
1
版本
#latest

概述

Image Upload for GitHub

Upload an image to img402.dev and embed the returned URL in GitHub markdown.

Pick a tier

TierPriceMax sizeRetentionUse when
--------------------------------------------
Free$01 MB7 daysPR review screenshots, issue comments, draft mockups
1-year$0.01 USDC5 MB1 yearREADME diagrams, architecture docs
Permanent$1.00 USDC5 MBPermanent\*README hero images, public blog post visuals

\* Service-life retention with a 90-day on-site shutdown notice — see Terms § 2A.

Quick reference

# Upload (multipart)
curl -s -X POST https://img402.dev/api/free -F image=@/tmp/screenshot.png

# Response
# {"url":"https://i.img402.dev/aBcDeFgHiJ.png","id":"aBcDeFgHiJ","contentType":"image/png","sizeBytes":182400,"expiresAt":"2026-02-17T..."}

Workflow

  1. Get image: Use an existing file, or capture a screenshot:

```bash

screencapture -x /tmp/screenshot.png # macOS — full screen

screencapture -xw /tmp/screenshot.png # macOS — frontmost window

```

  1. Verify size: Must be under 1MB. If larger, resize:

```bash

sips -Z 1600 /tmp/screenshot.png # macOS — scale longest edge to 1600px

```

  1. Upload:

```bash

curl -s -X POST https://img402.dev/api/free -F image=@/tmp/screenshot.png

```

  1. Embed the returned url in GitHub markdown:

```markdown

!Screenshot description

```

GitHub integration

Use gh CLI to embed images in PRs and issues:

# Add to PR description
gh pr edit --body "$(gh pr view --json body -q .body)

![Screenshot](https://i.img402.dev/aBcDeFgHiJ.png)"

# Add as PR comment
gh pr comment --body "![Screenshot](https://i.img402.dev/aBcDeFgHiJ.png)"

# Add to issue
gh issue comment 123 --body "![Screenshot](https://i.img402.dev/aBcDeFgHiJ.png)"

Constraints

  • Max size: 1MB
  • Retention: 7 days
  • Formats: PNG, JPEG, GIF, WebP
  • Rate limit: 1,000 free uploads/day (global)
  • No auth required

Tips

  • Prefer PNG for UI screenshots (sharp text). Use JPEG for photos.
  • If a screenshot is too large, reduce dimensions with sips -Z 1600 before uploading.
  • When adding to a PR body or comment, use gh pr comment or gh pr edit with the image markdown.

Paid tiers

For larger or longer-lived images, pay via x402 for a token, then upload with the token:

# Step 1: Get an upload token
POST https://img402.dev/api/upload/token            # $0.01 USDC → 1-year retention
POST https://img402.dev/api/upload/token/permanent  # $1.00 USDC → permanent retention
# → {"token": "a1b2c3...", "expiresAt": "..."}

# Step 2: Upload with the token
curl -s -X POST https://img402.dev/api/upload \
  -H "X-Upload-Token: a1b2c3..." \
  -F image=@/tmp/screenshot.png
# → {"url":"...", "expiresAt":"..."|null}   # null = permanent

x402 payment is handled by an x402-capable client (the Payments MCP tool, @x402/client, or similar). See https://img402.dev/blog/paying-x402-apis.

版本历史

共 1 个版本

  • v1.0.0 从ClawHub迁移发布 当前
    2026-06-07 11:14 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 195 📥 67,814
design-media

agnes-image-gen

user_15292d5a
使用 Agnes AI 的图片生成模型生成图片,支持文生图(agnes-image-2.1-flash)和图生图(agnes-image-2.0-flash)。支持自定义 API Key,用户可使用自己的 Agnes Key。优化重点:降低
★ 0 📥 178
dev-programming

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 72 📥 182,177