Skip to content

Create a free account to get an API key

imgly API for developers and bots

Upload images to imgly from scripts, apps and AI agents, then use the permanent links anywhere: in posts on other websites, in chats, in documents. Two ways to connect, one contract:

1. Get a key

Sign in, open Settings > API keys, and create a key. Pick its permissions:

Permission Allows
images:write Upload images
images:read Read and list your images
images:delete Delete your images
posts:write Create and delete posts
posts:read Read posts

Keys look like imk_ followed by 40 letters and digits. They are shown once. Send them as:

Authorization: Bearer imk_...

X-Api-Key: imk_... also works.

2. Limits

Adult or sexual content is never allowed. Every upload is scanned. Rejected uploads return blocked_content and add a strike to the key; three strikes revoke it.

3. Upload an image

POST /api/v1/images

Send exactly one of:

Optional fields: title (120 chars, also used as alt text), description (1000 chars), idempotency_key (retries with the same key return the first result instead of a duplicate).

# From a URL
curl -X POST https://imgly.top/api/v1/images \
  -H "Authorization: Bearer $IMGLY_KEY" \
  -H "Content-Type: application/json" \
  -d '{"source_url":"https://example.com/picture.jpg","title":"Example","idempotency_key":"offer-123-logo"}'

# A local file
curl -X POST https://imgly.top/api/v1/images \
  -H "Authorization: Bearer $IMGLY_KEY" \
  -F "[email protected]" -F "title=Example"

Response (201 Created, or 200 with "duplicate": true when you uploaded the same file before):

{
  "image": {
    "id": "aB3xK9q",
    "status": "ready",
    "title": "Example",
    "mime": "image/jpeg",
    "width": 1600,
    "height": 900,
    "size": 284113,
    "animated": false,
    "urls": {
      "direct": "https://i.imgly.top/aB3xK9q.jpg",
      "medium": "https://i.imgly.top/aB3xK9q_m.webp",
      "thumb": "https://i.imgly.top/aB3xK9q_t.webp",
      "page": "https://imgly.top/i/aB3xK9q"
    },
    "embed": {
      "markdown": "![Example](https://i.imgly.top/aB3xK9q.jpg)",
      "html": "<img src=\"https://i.imgly.top/aB3xK9q.jpg\" width=\"1600\" height=\"900\" alt=\"Example\">",
      "bbcode": "[img]https://i.imgly.top/aB3xK9q.jpg[/img]"
    }
  },
  "duplicate": false
}

Which URL to use:

If status is review, the filter was unsure and a moderator will check the image. Its URLs start working after approval; poll GET /api/v1/images/{id}.

4. Other endpoints

Method Path Permission Purpose
GET /api/v1/images/{id} images:read One of your images
GET /api/v1/images?limit=30&cursor=... images:read Your images, newest first. Pass next_cursor to page.
DELETE /api/v1/images/{id} images:delete Delete permanently. Links stop working.
POST /api/v1/posts posts:write Publish images as a post (see below)
GET /api/v1/posts/{id} posts:read A post
DELETE /api/v1/posts/{id} posts:write Delete your post (the images stay)
GET /api/v1/tags?limit=50 any Existing tags, featured and most used first
GET /api/v1/me any Daily quota, key permissions, account
GET /api/v1/docs none This guide as Markdown

Create a post

curl -X POST https://imgly.top/api/v1/posts \
  -H "Authorization: Bearer $IMGLY_KEY" -H "Content-Type: application/json" \
  -d '{"title":"Free cloud credits this week","image_ids":["aB3xK9q"],"tags":["deals","cloud"],"visibility":"public"}'

5. Errors

Every error has the same shape and a stable code:

{ "error": { "code": "quota_exceeded", "message": "Daily upload limit reached (1000 images). It resets at midnight UTC." } }
HTTP code Meaning
401 unauthenticated Missing or invalid key
403 forbidden The key lacks a permission
404 not_found Not one of your images or posts
413 too_large File or pixel count over the limit
415 unsupported_type Not JPEG, PNG, GIF or still WebP
422 blocked_content Rejected by the content filter
422 invalid_image, missing_image, invalid_base64, invalid_source_url, source_fetch_failed Fix the request
429 quota_exceeded, rate_limited Wait; see Retry-After or meta.resets_at

6. MCP for AI agents

Add imgly as a remote MCP server in Claude, ChatGPT, Grok, Cursor, VS Code, OpenClaw or any MCP client:

Tools (shown according to the key's permissions):

Tool Does
upload_image Upload from source_url or base64. Returns the same object as REST.
get_image, list_my_images, delete_image Manage your images
create_post, get_post, delete_post Publish to the feed
list_tags Existing tags
get_quota Remaining daily allowance

Tool errors come back as results with isError: true and the same error.code values, so agents can read and fix them.

Quick test with curl:

curl -s https://imgly.top/mcp -H "Authorization: Bearer $IMGLY_KEY" -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"upload_image","arguments":{"source_url":"https://example.com/a.png"}}}'

7. Recipe: images for another site (for example dealfinder.top)

  1. Your bot finds an image it wants to use (a product screenshot, a logo).
  2. It calls upload_image with source_url and an idempotency_key such as dealfinder-offer-<slug>.
  3. It takes urls.medium (or urls.direct) from the result and passes that URL to the other site.

The other site stores only the URL. imgly keeps the file, serves it from its CDN, and the link never changes.

Support

Questions about the API, higher quotas or a key that stopped working: email [email protected] with your username and the key prefix (never the full key).

Report