API Reference
This section contains the full API reference for Waifu.Docs, auto-generated from the OpenAPI specification [https://waifu-api-031n.onrender.com/openapi/v1.json].
Base URL
https://waifu-api-031n.onrender.com
Service index
GET / returns a small JSON index: the build this instance is running, followed
by links to the public reads. It needs no authentication and touches no database,
so it answers on an instance that is serving from a CDN with no API behind it.
{
"software": "waifu-im",
"version": "8.0.0",
"commit": "9544404",
"builtAt": "2026-10-16T09:12:44Z",
"links": {
"images": "/images",
"tags": "/tags",
"artists": "/artists",
"banner": "/banner",
"stats": "/stats/public",
"instances": "/instances",
"version": "/version"
}
}
software, version, commit and builtAt are the same values GET /version
reports — one build, one answer. Every link is a path on this instance and is
served without credentials. Paths that match no endpoint still return 404.
This endpoint is not part of the generated reference below. Those pages come from the checked-in OpenAPI document, which predates it.
Interactive Documentation
An interactive API explorer powered by Scalar is available directly on the API at https://waifu-api-031n.onrender.com/scalar/v1. You can use it to test endpoints and view request/response examples.
Authentication
The API supports two authentication methods:
- JWT Token -- Obtained via Discord OAuth2 (
POST /auth/discord). Passed asAuthorization: Bearer <token>. - API Key -- Passed in the
X-Api-Keyheader.
Some endpoints require authentication. Check the endpoint details below or the Authentication page for more information.
Response Format
All responses are JSON. Paginated endpoints return:
{
"items": [],
"pageNumber": 1,
"totalPages": 10,
"totalCount": 100,
"hasPreviousPage": false,
"hasNextPage": true,
"maxPageSize": -1,
"defaultPageSize": 30
}
maxPageSize: The maximum allowed page size for this endpoint. A value of-1means unlimited.defaultPageSize: The default page size used when noPageSizeparameter is provided.
Error Handling
Errors follow the RFC 9457 Problem Details format:
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "Bad Request",
"status": 400,
"detail": "One or more validation errors occurred.",
"errors": {
"fieldName": ["Error message"]
}
}