RisuRealm

RisuRealm API Documentation

The RisuRealm API is a RESTful API that allows you to interact with the RisuRealm database. We recommend using the API in client-side with cors option, as it is has rate limiting and is not designed for server-side use. We do not allow usage of non-documentated endpoints, and we reserve the right to block any user or application that abuses the API.

Download Content

GET /api/v1/download/:format/:id

Download a character card, module, or preset in the specified format.

Path Parameters

id string Required
The ID of the content to download
format string Required
The format of the download. Must be one of the following: png-v2, json-v2, png-v3, json-v3, charx-v3 for characters, module-v1, lorebook-v2, lorebook-v3 for modules, preset-risu-v1, preset-st-chat for presets. png-v2 and png-v3 returns same response, since it returns png-v3 card backfilling with v2 data.

Query Strings

cors
If set to true, the response will include the Access-Control-Allow-Origin header. defaults to false.
non_commercial
If set to true, the character card with the non-commercial license with api restrictions may not be blocked. Only set this to true if you are not using the character card for commercial purposes. defaults to false.
access_token
The access token to use for downloading the character card. defaults to guest.

Response

200 application/json

When format is set to json-v2, json-v3, module-v1, lorebook-v2, lorebook-v3, preset-risu-v1 or preset-st-chat.

200 image/png

When format is set to png-v2 or png-v3.

400 application/json

When an argument is missing or invalid.

{
  "error": "Bad Request",
  "message": "Invalid response from server"
}
403 application/json

When format is set to charx-v3, or the content is not available for download in the specified format.

{
  "error": "Not Supported",
  "message": "CharX is not supported for download yet."
}
403 application/json

When downloading a content is blocked

{
  "error": "Blocked",
  "message": "Blocked from download"
}
404 application/json

When the content is not found.

{
  "error": "Not Found",
  "message": "Data not found"
}