Skip to content

接続Agents · MCP

Every agent, one URL.

AnimeAPI is a remote MCP server. Add it to any agent that speaks MCP and it can draw images with generate_anime_image and make short clips with generate_anime_video. Sign in with OAuth when the agent asks, or send your API key as a header.
https://animeapi.ai/mcp
  • Transport: streamable HTTP (stateless). No local install.
  • Auth: OAuth 2.1 with PKCE and dynamic client registration, or Authorization: Bearer ank_….
  • Billing is the same as the REST API: every image and video is charged to the connected account’s balance.

01Claude

Claude Code

terminal
claude mcp add --transport http animeapi https://animeapi.ai/mcp

Then run /mcp in Claude Code and choose AnimeAPI to sign in. To use a key instead of OAuth:

terminal
claude mcp add --transport http animeapi https://animeapi.ai/mcp \
  --header "Authorization: Bearer $ANIMEAPI_KEY"

Claude apps

Add a custom connector with the URL above and sign in when prompted.

02ChatGPT

With developer mode on, create an app (connector) with the URL above and choose OAuth. ChatGPT registers itself, sends you to the AnimeAPI consent page, and receives a key for your account.

03Cursor

~/.cursor/mcp.json
{
  "mcpServers": {
    "animeapi": { "url": "https://animeapi.ai/mcp" }
  }
}

Cursor signs you in on first use. For a key instead, add "headers": { "Authorization": "Bearer ank_your_key" }.

04OpenAI Codex

~/.codex/config.toml
[mcp_servers.animeapi]
url = "https://animeapi.ai/mcp"
bearer_token_env_var = "ANIMEAPI_KEY"

Export ANIMEAPI_KEY in the shell you start Codex from.

05OpenClaw

~/.openclaw/openclaw.json
{
  mcp: {
    servers: {
      animeapi: {
        url: "https://animeapi.ai/mcp",
        transport: "streamable-http",
        headers: { Authorization: "Bearer ank_your_key" }
      }
    }
  }
}

06Hermes Agent

~/.hermes/config.yaml
mcp_servers:
  animeapi:
    url: "https://animeapi.ai/mcp"
    headers:
      Authorization: "Bearer ank_your_key"

07Grok (xAI API)

Pass AnimeAPI as a remote MCP tool in a Responses API request:

terminal
curl https://api.x.ai/v1/responses \
  -H "Authorization: Bearer $XAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-4.7",
    "input": [{"role": "user", "content": "Draw a knight cat drinking tea in a sunflower field."}],
    "tools": [{
      "type": "mcp",
      "server_url": "https://animeapi.ai/mcp",
      "server_label": "animeapi",
      "headers": {"Authorization": "Bearer '"$ANIMEAPI_KEY"'"}
    }]
  }'

08The tools

generate_anime_image

generate_anime_image returns a markdown image, the image URL, what the model read, the cost and your remaining balance, plus the same fields as structured output.

generate_anime_image arguments
FieldTypeDefaultDescription
promptstringrequiredWhat to draw. Up to 1,000 characters.
model"anime" | "ultra" | "ultra-max""anime"Quality tier. See the API reference for prices.
orientation"portrait" | "square" | "landscape""portrait"Aspect ratio.
enhancebooleantrueanime only: rewrite the prompt into Danbooru tags.
allowNSFWbooleanfalseanime only. Off by default for agents.

generate_anime_video

Starts a video and waits for it for up to a few minutes. When it’s done, the tool returns the MP4 URL (also as a video/mp4 resource link), what the model read and the cost. If it’s still rendering, it returns the video id instead, and the agent picks the result up later with get_anime_video. Priced per second: 480p $0.016, 768p $0.04.

generate_anime_video arguments
FieldTypeDefaultDescription
promptstringrequiredWhat happens in the clip. Up to 1,000 characters.
resolution"480p" | "768p""768p"Priced per second.
durationinteger5Seconds, 5 to 15.
orientation"portrait" | "square" | "landscape""landscape"Aspect ratio. A first frame sets the shape instead.
first_frame_urlstringnonePublic image URL the clip starts on.
last_frame_urlstringnonePublic image URL the clip ends on.

get_anime_video

Takes the id from generate_anime_video and returns the video’s status, plus the MP4 URL once it has succeeded. Free to call.