Upload the file of a preview

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
POST /pictures/preview-files/{instance_id}

Upload the file of a preview. Send the file in a multipart form. For a picture, the route makes a square thumbnail, a rectangle thumbnail and a preview picture. For a movie, the route normalizes the movie and makes the thumbnails. Use normalize=false to keep the movie as it is. You cannot upload a file again for a preview that already has a file. You must be able to do actions on the task. A client of the project cannot use this route.

Path parameters

  • instance_id string(uuid) Required

    Unique identifier of the preview file

Query parameters

  • normalize boolean

    Normalize the movie

    Default value is true.

  • no_job boolean

    Process the file in the request instead of the job queue

    Default value is false.

multipart/form-data

Body Required

  • file string(binary) Required

    Preview file to upload

Responses

  • 201 application/json

    The preview file

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

      Preview file unique identifier

    • extension string

      File extension

    • file_size integer

      File size in bytes

  • 400

    The file is missing, its format is not valid, or the preview already has a file

  • 403

    You cannot do actions on this task

  • 404

    The preview file does not exist

  • 500

    The processing of the movie failed

POST /pictures/preview-files/{instance_id}
curl -X POST "http://api.example.com/pictures/preview-files/a24a6ea4-ce75-4665-a070-57453082c25" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
import requests

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

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

response.raise_for_status()

if response.content:
    print(response.json())
Response examples (201)
{
  "id": "a24a6ea4-ce75-4665-a070-57453082c250",
  "extension": "png",
  "file_size": 1024000
}