← Back to Skills Marketplace
jacobmaldonado

Image Hosting for agents

by Jacob Maldonado · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ Security Clean
214
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install agent-image-hosting
Description
AgentImgHost REST API for uploading, listing, and deleting images. Returns direct public CDN URLs.
README (SKILL.md)

SKILL.md — AgentImgHost Image Upload Guide

This document teaches AI agents, bots, and scripts how to upload images to AgentImgHost and use the returned public URL.


Overview

AgentImgHost provides a REST API for uploading images. After a successful upload, the service returns the direct public URL — no intermediate proxying. The image is immediately accessible worldwide via CDN.


Authentication

All API requests require a Bearer token in the Authorization header.

Authorization: Bearer aih_your_token_here

You can find your token in the Account section of the web dashboard at https://agent-img.com/account.


Upload an Image

POST https://agent-img.com/api/upload
Parameter Type Description
file multipart/form-data The image file to upload
curl -X POST https://agent-img.com/api/upload \
  -H "Authorization: Bearer aih_your_token_here" \
  -F "file=@/path/to/image.png"

Response (201 Created)

{
  "url": "https://agent-img.com/a1b2c3def456/7f8e9a0b1c2d.png",
  "id": "7f8e9a0b1c2d",
  "filename": "screenshot.png",
  "size_bytes": 48291,
  "expires_at": null
}
Field Description
url Direct public CDN URL — use this in your responses/messages
id Unique image ID (UUID hex)
filename Original filename
size_bytes File size in bytes
expires_at ISO 8601 expiry date, or null if no expiry

Delete an Image

curl -X DELETE https://agent-img.com/api/images/{image_id} \
  -H "Authorization: Bearer aih_your_token_here"

Response:

{ "deleted": "7f8e9a0b1c2d" }

Resizing Images Before Upload

If your image exceeds the file-size limit for your plan (Free: 1 MB, Pro: 2 MB, Business: 5 MB), resize it before uploading.

  1. Get the image — use an existing file, or generate/download one.
  2. Check the file size — it must be under your plan's limit.
  3. If too large, resize it using the commands below.
  4. Upload the resized image.

macOS (built-in sips)

# Scale the longest edge to 1600px (preserves aspect ratio)
sips -Z 1600 /path/to/image.png

# Upload
curl -s -X POST https://agent-img.com/api/upload \
  -H "Authorization: Bearer aih_your_token_here" \
  -F "file=@/path/to/image.png"

Linux (ImageMagick convert / magick)

# Scale the longest edge to 1600px (preserves aspect ratio)
convert /path/to/image.png -resize 1600x1600 /path/to/image.png
# or with ImageMagick 7+
magick /path/to/image.png -resize 1600x1600 /path/to/image.png

# Upload
curl -s -X POST https://agent-img.com/api/upload \
  -H "Authorization: Bearer aih_your_token_here" \
  -F "file=@/path/to/image.png"

Reducing quality (JPEG)

If resizing dimensions alone isn't enough, reduce JPEG quality:

# macOS — lower quality to 80%
sips -s formatOptions 80 /path/to/image.jpg

# Linux (ImageMagick)
convert /path/to/image.jpg -quality 80 /path/to/image.jpg

Converting PNG → JPEG for smaller size

PNG files are often much larger than JPEG. Convert when transparency isn't needed:

# macOS
sips -s format jpeg /path/to/image.png --out /path/to/image.jpg

# Linux (ImageMagick)
convert /path/to/image.png -quality 85 /path/to/image.jpg

One-liner: resize + upload

# macOS — resize to 1600px max, then upload in one line
sips -Z 1600 /tmp/shot.png && curl -s -X POST https://agent-img.com/api/upload \
  -H "Authorization: Bearer aih_your_token_here" \
  -F "file=@/tmp/shot.png"

# Linux — same with ImageMagick
convert /tmp/shot.png -resize 1600x1600 /tmp/shot.png && curl -s -X POST https://agent-img.com/api/upload \
  -H "Authorization: Bearer aih_your_token_here" \
  -F "file=@/tmp/shot.png"

Tip: Start with 1600px max dimension. If still over the limit, try 1200px or 800px, or reduce JPEG quality to 70–80%.


Error Codes

Status Meaning
401 Invalid or missing API token
413 File too large for your plan
415 Unsupported file type (must be an image)
429 Image limit reached and circular overwrite is disabled
500 Server error — try again

Supported Image Formats

JPEG, PNG, GIF, WebP, AVIF, SVG, BMP, TIFF


Plan Limits

Plan Max Images Max File Size Price
Free 100 1 MB Free
Pro 1,000 2 MB $1/month
Business 10,000 5 MB $5/month
Custom Unlimited Custom Contact us

Manage your plan at https://agent-img.com/account.


Circular Overwrite

By default, when you reach your image limit, the oldest image is automatically deleted to make room for the new upload. You can disable this in Settings (https://agent-img.com/config) to get a 429 error instead.


URL Structure

All image URLs follow this pattern:

https://agent-img.com/{user_folder}/{image_uuid}.{ext}
  • user_folder — your unique folder (UUID hex, assigned at registration)
  • image_uuid — UUID hex assigned to each upload
  • ext — file extension based on content type

URLs are permanent while your plan is active. After plan cancellation, images are retained for the grace period defined by your plan before being deleted.

Usage Guidance
This instruction-only skill appears coherent for an image-hosting integration. Before installing: (1) only provide an API key scoped to the minimum needed (if the service supports scoped or read-only tokens); avoid giving a token that grants account-wide or billing access. (2) Be aware the skill uploads local files and returns permanent public CDN URLs — do not allow it to run autonomously if you might have sensitive images on the host. (3) Review account settings (circular overwrite, retention/grace periods) and consider using short-lived tokens or an account dedicated to the agent. (4) If you enable autonomous invocation, add policy or prompts that prevent the agent from uploading files unless explicitly authorized by the user for that session.
Capability Analysis
Type: OpenClaw Skill Name: agent-image-hosting Version: 1.0.1 The skill bundle provides standard documentation and command-line examples (curl, sips, ImageMagick) for interacting with the AgentImgHost REST API. It functions as a legitimate utility for uploading and managing images on a remote CDN (agent-img.com) and contains no evidence of malicious intent, obfuscation, or prompt injection attacks.
Capability Assessment
Purpose & Capability
Name, description, and declared requirement (AGENTIMGHOST_API_KEY) align with the SKILL.md content which documents a REST API at agent-img.com for upload/list/delete and returning public CDN URLs. No unrelated credentials, binaries, or config paths are requested.
Instruction Scope
Instructions are focused on using the AgentImgHost REST API (curl examples, Authorization header) and on resizing images using standard local tools (sips, ImageMagick). This is within scope, but the instructions explicitly upload local files (paths like /path/to/image.png and /tmp), so an agent with this skill could upload any accessible local image — potentially exposing sensitive local content if not constrained.
Install Mechanism
No install spec and no code files — instruction-only skill. This minimizes on-disk footprint and installation risk.
Credentials
Only AGENTIMGHOST_API_KEY is required and declared as the primary credential. The SKILL.md uses a bearer token in examples and does not reference other environment variables or unrelated secrets.
Persistence & Privilege
always is false (normal). disable-model-invocation is false (agent may call the skill autonomously), which is standard — but because uploads produce publicly accessible CDN URLs, autonomous use increases the risk of inadvertent public disclosure of images. Consider limiting autonomous invocation or using scoped/rotating tokens.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install agent-image-hosting
  3. After installation, invoke the skill by name or use /agent-image-hosting
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
- Documentation streamlined to focus on the REST API; MCP server details and some advanced usage examples removed. - Overview, authentication, upload, and delete instructions clarified and simplified. - Non-essential example code (Python, Node.js) omitted for brevity; only curl/bash workflows remain. - Descriptions now more concise; API response field descriptions and error codes retained. - No code or feature changes—documentation updates only.
v1.0.0
agentimghost 1.0.0 — Initial Release - Provides REST API and MCP server for uploading, listing, and deleting images. - Returns direct public CDN URLs for uploaded images, instantly accessible worldwide. - Supports authentication via Bearer API token. - Includes upload and deletion endpoints, error codes, and usage examples in Bash, Python, and Node.js. - Details supported image formats, plan limits, and CDN URL structure. - Documents best practices for resizing and compressing images before upload.
Metadata
Slug agent-image-hosting
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is Image Hosting for agents?

AgentImgHost REST API for uploading, listing, and deleting images. Returns direct public CDN URLs. It is an AI Agent Skill for Claude Code / OpenClaw, with 214 downloads so far.

How do I install Image Hosting for agents?

Run "/install agent-image-hosting" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Image Hosting for agents free?

Yes, Image Hosting for agents is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Image Hosting for agents support?

Image Hosting for agents is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Image Hosting for agents?

It is built and maintained by Jacob Maldonado (@jacobmaldonado); the current version is v1.0.1.

💬 Comments