canonical: https://jentic.com/apis/imgur.com/imgur

# Imgur API

Jentic publishes the only available OpenAPI specification for Imgur API, keeping it validated and agent-ready. The Imgur API gives programmatic access to the Imgur image hosting platform - upload, manage, and share images and albums. It supports OAuth 2.0 for user-authenticated actions like favouriting and album management plus a client ID for anonymous uploads. The 24-endpoint surface covers the common image and album CRUD plus comment and gallery interactions used by community apps and content tools.

## For AI agents

Upload, retrieve, edit, and delete images and albums on Imgur, including favourites, comments, and gallery interactions through OAuth or anonymous client ID.

## Scope

Does not handle image transformation, content moderation, or CDN delivery - use for image and album hosting and management on Imgur only.

## Capabilities

- Upload an image anonymously with the client ID or as an authenticated user
- Retrieve, update, or delete an image by its hash
- Favourite and unfavourite an image on the authenticated user's account
- Create, update, and delete albums and manage their image membership
- Add or remove specific images from an existing album
- Read image metadata such as title, description, and view count
- Authenticate user-scoped actions via OAuth 2.0

## Use cases

### Anonymous Screenshot Sharing

Bug-report tools and chat apps often want a quick way to host a screenshot without asking the user to sign in. Posting an image to /image with the client ID returns a public URL that can be pasted into a ticket. The same flow can later delete the image with the returned deletehash if the user changes their mind.

Example prompt: POST /image with the screenshot bytes and the Authorization: Client-ID header, then surface the returned link to the user.

### Community Album Management

Forum and community apps that bundle uploads into albums use the album endpoints to keep submissions tidy. POST /album creates the container, POST `/album/{albumHash}/add` adds new images, and POST `/album/{albumHash}/remove_images` prunes ones that fail moderation. The album hash becomes the canonical link for the submission.

Example prompt: POST /album with title and description, then POST `/album/{albumHash}/add` with the image hashes that belong to the submission.

### User-Authenticated Image Library

Apps that let users sign in with Imgur and curate their own gallery use the OAuth 2.0 flow to call `/image/{imageHash}/favorite` and the album endpoints on the user's behalf. This lets the app render a true mirror of the user's Imgur account inside its own UI without re-implementing the gallery.

Example prompt: Complete the Imgur OAuth flow, then POST `/image/{imageHash}/favorite` when the user clicks the heart icon in the app.

### Agent-Driven Image Hosting

An AI agent that produces an image (a chart, a generated visual, a screenshot of a page) often needs to host it before linking to it from a Slack or email message. Jentic surfaces the Imgur upload operation with the right auth scheme so the agent runs a single execute call and gets back a shareable URL.

Example prompt: Search Jentic for 'upload an image to Imgur', execute /image with the agent's image bytes, and embed the returned URL in the next message.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/image` | Upload an image |
| GET | `/image/{imageHash}` | Retrieve an image by hash |
| DELETE | `/image/{imageHash}` | Delete an image |
| POST | `/image/{imageHash}/favorite` | Favourite or unfavourite an image |
| POST | `/album` | Create an album |
| GET | `/album/{albumHash}` | Retrieve an album |
| POST | `/album/{albumHash}/add` | Add images to an album |
| POST | `/album/{albumHash}/remove_images` | Remove images from an album |

## Key resources

- **Image** — Upload, retrieve, update, delete, and favourite images.
- **Album** — Create, retrieve, update, and delete albums and manage image membership.

## Why Jentic

- **Setup:** Wiring Imgur by hand means choosing between a Client-ID and an OAuth token, sending the right one per call against api.imgur.com, and handling token refresh yourself. Through Jentic you install once, import the Imgur API from the API Directory, store the client ID and OAuth token once, and your agent calls it.
- **Permission scoping:** Imgur puts the image and album hash in the URL path (`/image/{imageHash}`, `/album/{albumHash}/add`), so a rule can pin your agent to one image or album. You choose the operations it may call, so destructive ones like deleting an image or removing album images are not included unless you add them.
- **Credential handling:** Your Imgur client ID and OAuth token are stored once, encrypted, by your own Jentic One instance and injected at execution time. Refresh tokens never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'upload an image to Imgur' or 'add an image to an album', and Jentic returns the matching operation with its input schema and the correct auth scheme attached so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Cloudinary Upload API** — Cloudinary offers image hosting plus on-the-fly transformations and CDN delivery.
- **Flickr** — Flickr is a long-running photo hosting and community platform with a stable API.
- **Imagga** — Imagga adds tagging, moderation, and OCR on the same images Imgur hosts.

## FAQ

### Why is there no official OpenAPI spec for Imgur API?

Imgur publishes API documentation but no canonical OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Imgur via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Imgur API use?

Imgur supports two schemes: a client ID passed as Authorization: Client-ID for anonymous uploads, and OAuth 2.0 for user-authenticated actions like favouriting or managing the user's account. Through Jentic both flows are vaulted - the client ID and the OAuth token never enter the agent context.

### Can I upload an image anonymously?

Yes. POST /image with the Authorization: Client-ID header. The response returns the public link plus a deletehash that can later be used to remove the image without OAuth.

### How do I add an image to an existing album?

POST `/album/{albumHash}/add` with the image hashes that should be added. Use POST `/album/{albumHash}/remove_images` to take them out again. Both calls require OAuth when the album belongs to a signed-in user.

### How do I upload an image through Jentic?

Run pip install jentic, search for 'upload an image to Imgur', load the /image POST schema, and execute with the image bytes. Jentic supplies the client ID or OAuth token from the vault depending on which is configured.

### What are the rate limits for the Imgur API?

Imgur enforces per-IP and per-application credit limits documented on their developer site. The OpenAPI spec does not encode these limits directly; back off on HTTP 429 responses and check the X-RateLimit headers on each response.

### Can I limit what my agent is allowed to do with the Imgur API?

Yes. Because you run Jentic One yourself, your own rules decide which Imgur operations the agent may call, so you can grant uploads and reads while leaving out destructive ones like deleting an image or removing images from an album. Imgur puts the image and album hash directly in the URL path, such as `/image/{imageHash}` and `/album/{albumHash}/add`, so a rule can pin the agent to a single image or album. Your Imgur client ID and OAuth token are held by your own instance and injected only for the operations you have allowed.
