Alethia - Docs

Configuration

Configure your source's metadata and capabilities

Source Configuration

When Alethia requests GET /:source, your host must return a JSON object describing the source's metadata and capabilities. This tells Alethia what your source can do.

Full Example

{
  "name": "MangaDex",
  "slug": "mangadex",
  "icon": "https://example.com/mangadex-icon.png",
  "languages": ["en", "ja"],
  "nsfw": false,
  "url": "https://mangadex.org",
  "referer": "https://mangadex.org",
  "auth": {
    "type": "none",
    "required": false
  },
  "search": {
    "sort": ["relevance", "latest", "popularity", "rating"],
    "filters": ["status", "contentRating", "includeTag", "excludeTag"],
    "tags": [
      { "slug": "action", "name": "Action", "nsfw": false },
      { "slug": "romance", "name": "Romance", "nsfw": false },
      { "slug": "adult", "name": "Adult", "nsfw": true }
    ]
  },
  "presets": [
    {
      "name": "Latest Updates",
      "description": "Recently updated manga",
      "request": {
        "query": "",
        "page": 1,
        "limit": 20,
        "sort": "latest",
        "direction": "desc"
      }
    }
  ],
  "version": "1.0.0",
  "hash": "abc123def456",
  "updatedAt": "2025-01-01T00:00:00Z"
}

Field Reference

Identity

FieldTypeRequiredDescription
namestringYesDisplay name (2-50 characters)
slugstringYesUnique identifier, lowercase letters only (a-z). See Slugs.
iconstringYesURL to source icon image
urlstringYesBase URL of the upstream source
refererstringNoReferer header for image requests (defaults to empty)

Content

FieldTypeRequiredDescription
languagesstring[]YesArray of supported language codes (e.g., ["en", "ja"])
nsfwbooleanNoWhether source contains NSFW content by default (defaults to false)

Authentication

"auth": {
  "type": "none",
  "required": false
}
FieldTypeValuesDescription
typestringnone, basic, session, api_key, bearer, cookieAuthentication method
requiredbooleanWhether auth is required to use the source
fieldsstring[]Field names required for auth (e.g., ["username", "password"])

Authentication Types:

TypeFieldsDescription
noneNo authentication required
basicusername, passwordUsername/password returning Authorization header
sessionusername, passwordUsername/password returning session cookies
api_keyapiKeySingle API key authentication
bearertokenPre-obtained bearer token
cookiecookieRaw cookie values (fallback for complex auth)

If type is "none", the source doesn't require authentication. See Endpoints > Authentication for detailed examples.

Search Capabilities

"search": {
  "sort": ["relevance", "latest", "popularity"],
  "filters": ["status", "contentRating"],
  "tags": []
}

Sort Options

Declare which sort options your source supports:

ValueDescription
relevanceSearch relevance
latestRecently updated
titleAlphabetical by title
popularityMost popular
ratingHighest rated
chaptersNumber of chapters
yearPublication year
viewsView count
followsFollower/subscriber count
createdAtDate added to source
updatedAtLast updated

Filter Options

Declare which filters your source supports:

ValueValue TypeDescription
genrestring[]Filter by genre slugs
statusstring[]Filter by publication status values
contentRatingstring[]Filter by classification values
yearnumberPublication year
originalLanguagestring[]Filter by original language codes
translatedLanguagestring[]Filter by available translation languages
authorstringFilter by author name
artiststringFilter by artist name
includeTagstring[]Include manga with these tag slugs
excludeTagstring[]Exclude manga with these tag slugs
demographicstring[]Filter by demographic (shounen, seinen, etc.)
publisherstringFilter by publisher name
minChaptersnumberMinimum number of chapters

Tags

If your source supports tag filtering (includeTag or excludeTag), you must provide a tags array:

"tags": [
  { "slug": "action", "name": "Action", "nsfw": false },
  { "slug": "romance", "name": "Romance", "nsfw": false },
  { "slug": "adult", "name": "Adult", "nsfw": true }
]

Required

If you include includeTag or excludeTag in filters, you must provide a non-empty tags array.

Presets

Presets are predefined searches configurations that users will by default have available when browsing on this particular source.

Mainly useful for showing initial content like the "Latest Updates" or "Popular This Week" at a glance. Users themselves can configure, remove or add new presets themselves on the actual client.

Request Translation

The preset request object uses the same standardized format that Alethia sends to your host's search endpoint. Your adapter is responsible for translating these fields into whatever format your upstream source expects — REST query parameters, different JSON structures, GraphQL queries, or custom headers. This abstraction allows Alethia to work with any source regardless of the upstream API design.

"presets": [
  {
    "name": "Popular This Week",
    "description": "Most popular manga this week",
    "request": {
      "query": "",
      "page": 1,
      "limit": 20,
      "sort": "popularity",
      "direction": "desc"
    }
  }
]

Versioning

FieldTypeDescription
versionstringSemantic version (e.g., 1.0.0)
hashstringContent hash for change detection
updatedAtstringISO 8601 timestamp of last update

Alethia uses version and hash to detect when sources have been updated and prompt users to refresh.

On this page