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

# AniAPI

Jentic publishes the only available OpenAPI specification for AniAPI, keeping it validated and agent-ready. AniAPI is a community-run anime metadata and streaming-link service that exposes 17 endpoints covering anime titles, episodes, songs, streaming resources, and per-user watch history. It returns external IDs that line up with MyAnimeList, AniList, and Kitsu so that agents can join AniAPI data with other anime catalogues. Authentication uses JWT bearer tokens issued through the AniAPI OAuth flow for user-scoped operations.

## For AI agents

Look up anime titles, episodes, opening/ending songs, and streaming-resource links via AniAPI. Returns cross-platform IDs (MAL, AniList, Kitsu) so agents can stitch results into other anime catalogues.

## Scope

Does not handle video streaming itself, manga/light-novel data, or fan-art hosting - use for anime, episode, song, and streaming-link metadata only.

## Capabilities

- Search and retrieve anime titles with cross-platform IDs for MyAnimeList, AniList, and Kitsu
- List episodes for a given anime including release dates and stream availability
- Look up opening and ending theme songs tied to specific anime and episode ranges
- Resolve streaming resource links for an episode across supported providers
- Read and update a user's anime watch story (progress, status, score) with a JWT token
- Pull a random anime selection for discovery features and chat surfaces

## Use cases

### Anime Recommendation Chatbot

Power a Discord or web chatbot that recommends anime by genre, recency, or random pick using GET /anime and GET /random/anime/{count}. The bot returns titles, descriptions, and cross-platform IDs so users can add the recommendation to their MyAnimeList or AniList account in one step. Latency is suitable for interactive chat because each lookup is a single JSON response.

Example prompt: Call GET /random/anime/3 to fetch three random anime, then format the titles, MAL IDs, and synopses into a chat reply

### Cross-Platform Watch History Sync

Synchronise a user's watch progress between AniAPI and other tracker platforms by reading and writing to the /user_story endpoints. Agents can fetch a user's current status, episode count, and score, compare it against MyAnimeList or AniList, and push updates back to AniAPI when the user finishes new episodes. Authentication uses a JWT issued via the AniAPI auth flow.

Example prompt: Call GET /user_story for the authenticated user, identify entries where the local MAL count is higher, and POST updated progress back to /user_story

### Streaming Link Resolver

Resolve where a given episode can legally be watched by querying GET /resources for an anime or episode ID. The API returns provider links (Crunchyroll, Funimation, etc.) so agents can deep-link users to the correct stream rather than asking them to search manually. Useful for review surfaces, watch-party bots, or aggregator sites.

Example prompt: Look up the anime by title via GET /anime, then call GET /resources/{id} for the desired episode and return the matching provider URL

### AI Agent Anime Lookup via Jentic

An AI agent answering anime-related questions can use AniAPI through Jentic to fetch metadata, episodes, songs, and streaming links without managing JWTs directly. Jentic's intent search routes the agent to the correct AniAPI operation with its full input schema, and the JWT is loaded from the vault at execution time so it never enters the agent's context.

Example prompt: Search Jentic for 'find anime by title', load GET /anime, and execute with the user-supplied title to return MAL/AniList/Kitsu IDs and synopsis

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /anime | Search and list anime titles |
| GET | /anime/{id} | Retrieve a single anime by ID |
| GET | /episode | List episodes across anime |
| GET | /song | Search opening and ending songs |
| GET | /resources/{id} | Fetch streaming links for an episode |
| GET | /user_story | Retrieve a user's anime watch story |
| GET | /random/anime/{count} | Return random anime for discovery |
| GET | /auth/me | Return the authenticated user's profile |

## Key resources

- **anime** — Anime title metadata, descriptions, and cross-platform IDs
- **episode** — Per-episode metadata and release information
- **song** — Opening and ending theme song data tied to anime
- **resources** — Streaming provider links for episodes
- **user_story** — User watch progress, status, and score per anime
- **auth** — JWT-based user authentication endpoints
- **random** — Random anime sampling for discovery features

## Why Jentic

- **Setup:** Wiring AniAPI by hand means carrying its bearer JWT on each request and paging through the anime, episode, and song collections yourself. Through Jentic you install once, import AniAPI from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** AniAPI puts the resource id in the URL path (/anime/{id}, /resources/{id}), so a rule can pin your agent to reading a specific anime or resource. You choose the operations it may call, so user-story writes are not included unless you add them.
- **Credential handling:** Your AniAPI JWT is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'find anime by title' or 'get streaming links for an episode', and Jentic returns the matching AniAPI operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **MyAnimeList API** — MyAnimeList is the canonical anime tracker AniAPI cross-references in its IDs.
- **Kitsu API** — Kitsu is another anime catalogue API with social features that AniAPI cross-references.
- **Shikimori API** — Shikimori is a Russian-language anime database with overlapping metadata coverage.
- **Trakt.tv API** — Trakt tracks general TV and film history; AniAPI fills the anime-specific gap.

## FAQ

### Why is there no official OpenAPI spec for AniAPI?

AniAPI does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call AniAPI 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 AniAPI use?

AniAPI uses HTTP bearer authentication with a JWT issued through its OAuth flow. Public read operations on /anime, /episode, and /song typically work unauthenticated, but /user_story and /auth/me require a user-scoped JWT. Through Jentic the JWT is stored in the encrypted vault and is never injected into the agent's prompt context.

### Can I update a user's watch history with AniAPI?

Yes. The /user_story endpoint supports reading and updating watch progress, status, and score for a given anime, scoped to the authenticated user identified by the JWT.

### What are the rate limits for AniAPI?

The OpenAPI spec does not declare explicit rate limits. AniAPI is community-run, so treat it as best-effort: cache responses for catalogue lookups and back off on 429 or 5xx responses rather than retrying tightly.

### How do I look up an anime by title with AniAPI through Jentic?

Run pip install jentic, then search Jentic for 'find anime by title'. Jentic returns GET /anime with its query parameter schema. Execute the call with your title string and parse the returned MyAnimeList, AniList, and Kitsu IDs.

### Does AniAPI return streaming provider links?

Yes. GET /resources and GET /resources/{id} return streaming-resource entries for an anime or episode, including provider names and URLs where available. Coverage depends on what the AniAPI community has indexed for that title.

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

Yes. Because you run Jentic One yourself, your own rules decide which AniAPI operations and credentials the agent may use. You can grant read-only calls like GET /anime and GET /resources/{id} while leaving the /user_story write operations out, so the agent cannot change a user's watch progress or score unless you explicitly add those. Since AniAPI puts the resource id in the URL path, such as /anime/{id} and /resources/{id}, a rule can pin the agent to a specific anime or streaming resource.
