canonical: https://jentic.com/apis/donmai.us/danbooru

# Donmai Danbooru Anime API

Jentic publishes the only available OpenAPI specification for Danbooru Anime API, keeping it validated and agent-ready. The Danbooru Anime API gives programmatic access to the Danbooru image board's tagging system, exposing posts, tags, artists, and comments. The curated specification covers 12 endpoints: list and CRUD operations on posts, list and create operations on tags, artists, and comments, plus a random-post endpoint. Authentication is supported via an api_key query parameter or HTTP Basic. The API is suited to image search, dataset curation, and content tools that rely on Danbooru's deep tag taxonomy.

## For AI agents

List, create, update, and delete Danbooru posts, tags, artists, and comments using either an api_key query parameter or HTTP Basic credentials.

## Scope

Does not handle hosted file storage outside posts, account billing, or moderator actions beyond tag and comment creation - use for Danbooru post, tag, artist, and comment operations only.

## Capabilities

- List, create, update, and delete posts via /posts.json endpoints
- Fetch a random post with GET `/posts/random.json`
- List and create tags through /tags.json
- List and create artists through /artists.json
- List and create comments through /comments.json
- Authenticate with either an api_key query parameter or HTTP Basic

## Use cases

### Tag-Based Image Search

Power a tag-driven image discovery feature by calling GET /posts.json with tag query strings. Danbooru's strict tag taxonomy means a single GET returns precisely scoped results, suitable for moodboards, reference search, and dataset curation. Pair with /tags.json to autocomplete tag inputs.

Example prompt: GET /posts.json?tags=cherry_blossoms+sky and return the top 20 posts with their image URLs and tag lists.

### Random Post Feed

Drive a daily random art feed using GET `/posts/random.json`, which returns a single post chosen at random. This is useful for screensavers, dashboards, and discovery widgets without managing pagination state on the client.

Example prompt: GET `/posts/random.json` once a day and post the returned image and source link to a Slack channel.

### Tag and Artist Curation

Manage Danbooru taxonomy entries by listing and creating tags via /tags.json and artists via /artists.json. This supports community-moderation tooling and dataset prep where consistent tags and artist records must be maintained alongside posts.

Example prompt: POST /tags.json to create a new tag, then GET /tags.json filtered by name to confirm it appears in the list.

### AI Agent Image Discovery via Jentic

An AI agent uses Jentic to find Danbooru endpoints, run tag searches, and surface posts to a user. Credentials (api_key or Basic) stay in your Jentic One instance, so the agent never embeds secrets while iterating over /posts.json results.

Example prompt: Search Jentic for 'list danbooru posts by tag', execute GET /posts.json with the user's tag, and return the top results.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/posts.json` | List posts with tag filtering |
| GET | `/posts/{id}.json` | Get a single post by ID |
| GET | `/posts/random.json` | Get a random post |
| POST | `/posts.json` | Create a post |
| GET | `/tags.json` | List tags |
| POST | `/comments.json` | Create a comment |

## Key resources

- **Posts** — List, create, update, delete, and fetch random posts
- **Tags** — List and create tag entries
- **Artists** — List and create artist entries
- **Comments** — List and create comments on posts

## Why Jentic

- **Setup:** Wiring the Danbooru Anime API by hand means choosing between an api_key query parameter and Basic auth, pointing calls at the live or test host, and mapping the .json routes before you list or post. Through Jentic you install once, import the Danbooru Anime API from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Danbooru takes new posts, tags, and comments in the request body rather than a resource-owning path, so scope by operation: limit the agent to the operations it needs, such as listing posts by tag or creating a comment, and leave post creation or moderator-style actions out of its set. You decide which operations are in that set.
- **Credential handling:** Your Danbooru api_key or Basic credentials are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'list danbooru posts by tag', and Jentic returns the matching Danbooru operation with its parameter schema so the agent calls the right endpoint without parsing the spec.

## Related APIs

- **AniAPI** — Anime metadata and tracking API
- **Kitsu** — Anime and manga catalogue with library tracking
- **RAWG** — Cross-platform game database with media

## FAQ

### What authentication does the Danbooru API use?

Two schemes are supported: an api_key query parameter and HTTP Basic auth (username plus key). Through Jentic, the credential is stored encrypted in the vault and applied at execution time so the agent never handles the raw key.

### Can I search Danbooru posts by tag?

Yes. GET /posts.json accepts a tags query string with space- or plus-separated tags. The response is a JSON list of posts with image URLs, tag arrays, ratings, and source links.

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

The specification declares no rate-limit figures; its only rate-limit artifact is the 429 response on GET /posts.json. Danbooru's own implementation applies token-bucket limits keyed to the account, the IP subnet, and the session, and it applies them per action, so the ceiling depends on which call you make and on the account's standing rather than on one global figure. Read the X-Rate-Limit response header, cache results, and back off when a call returns 429.

### How do I get a random Danbooru post via Jentic?

Search Jentic for 'get a random danbooru post' and it returns GET `/posts/random.json.` Execute it and your self-hosted Jentic One instance injects the api_key at call time, returning a single post you can render or relay.

### Can I create a new tag through the Danbooru API?

Yes. POST /tags.json creates a tag entry with the supplied name and category. Verify the tag appears with GET /tags.json filtered by name afterwards.

### Does the Danbooru API support comments?

Yes. GET /comments.json lists comments and POST /comments.json creates a new comment on a post. Each comment is tied to a post id and the authenticated user.

### Is there a Danbooru MCP server?

You do not need an MCP server to give your agent the Danbooru API. Jentic connects it directly from the API Directory: import the API, store your api_key or Basic credentials once in your self-hosted Jentic One instance, and your agent calls all 12 endpoints. Operations are discovered on demand, so no extra server's tool definitions sit in the agent's context.

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

Yes. Because Danbooru creates posts, tags, and comments from the request body rather than a resource-owning path, you scope by operation: your self-hosted Jentic One instance runs on your own rules, so you decide which Danbooru operations the agent may call. You can grant read-only actions like listing posts by tag with GET /posts.json or fetching a random post, while leaving out write operations such as POST /posts.json or POST /comments.json. The agent can only invoke the operations and credentials you have allowed.

### Why is there no official OpenAPI spec for the Danbooru API?

Danbooru documents its API in prose on its own wiki rather than publishing a machine-readable specification: its open-source codebase carries no OpenAPI or Swagger document, and the usual specification paths on its own host return not-found. Jentic derived this specification from that documentation and keeps it validated and agent-ready, which is why it is labelled jentic-generated here.
