Set the main preview of an entity

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://api-docs.kitsu.cloud/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Kitsu API MCP server": {
    "url": "https://api-docs.kitsu.cloud/mcp"
  }
}

Close
PUT /actions/preview-files/{preview_file_id}/set-main-preview

Use a preview as the picture of its entity. For a movie, give frame_number to use this frame as the picture. Clients cannot use this route.

Path parameters

  • preview_file_id string(uuid) Required

    Unique identifier of the preview file

Query parameters

  • no_job boolean

    Extract the frame in the request instead of the job queue

    Default value is false.

application/json

Body

  • frame_number integer

    Frame of the movie to use as the picture. You can also give it as a query parameter when the request has no JSON body.

Responses

  • 200 application/json

    The entity

    Hide response attributes Show response attributes object
    • id string(uuid)

      Entity unique identifier

    • preview_file_id string(uuid)

      Preview file unique identifier

    • preview_file_status string

      Status of the preview file. Its pictures can be read once it is ready.

      Values are processing, ready, broken, or missing.

  • 400

    frame_number is given for a preview that is not a movie

  • 403

    You do not have access to this entity, or you are a client

  • 404

    The preview file does not exist

PUT /actions/preview-files/{preview_file_id}/set-main-preview
curl -X PUT "http://api.example.com/actions/preview-files/a24a6ea4-ce75-4665-a070-57453082c25/set-main-preview?frame_number=120" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
import requests

url = "http://api.example.com/actions/preview-files/a24a6ea4-ce75-4665-a070-57453082c25/set-main-preview"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json"
}
params = {
    "frame_number": 120
}
payload = None

response = requests.put(
    url,
    headers=headers,
    params=params,
    json=payload
)

response.raise_for_status()

if response.content:
    print(response.json())
Request examples
{
  "frame_number": 120
}
Response examples (200)
{
  "id": "a24a6ea4-ce75-4665-a070-57453082c250",
  "preview_file_id": "b35b7fb5-df86-5776-b181-68564193d360",
  "preview_file_status": "processing"
}