Skip to main content
Komga SDK 1.0 has two related references: the generated TypeScript surface in the package and the Komga server’s OpenAPI reference.

Generated SDK exports

The package root re-exports:
  • Generated operation functions such as getBooks, getBookById, getBookPages, getSeriesById, getLibraries, getLibraryById, getCollections, and getReadLists.
  • Generated DTO, search, page, operation response, and operation error types.
  • createKomgaClient, AuthConfig, and KomgaClientOptions.
  • KomgaResult, KomgaApiError, and unwrap.
  • The generated createClient function and GeneratedClientConfig type for advanced integrations.
Generated operations use flat parameter objects. For example, getBookById has the shape (parameters: { bookId: string }, options?: Options<never, ThrowOnError>); call it as follows:
The default result uses fields { data, error, request, response }. See Direct API functions for operation examples and Result handling for unwrap.

Read the generated operation contract

The generated function and type names make the transport mapping explicit:
Operation comments can include required roles such as ADMIN or FILE_DOWNLOAD, documented status codes, and whether a successful response is a DTO, page, blob, text value, or 204 No Content. Use those generated comments and types rather than assuming every endpoint returns JSON.

Komga server API

The API Reference tab uses the Komga 1.25.0 OpenAPI document: https://raw.githubusercontent.com/gotson/komga/1.25.0/komga/docs/openapi.json Use it to confirm endpoint parameters, authorization requirements, status codes, and server response schemas. The generated SDK operation names and types are produced from this API contract.

Version alignment

Keep the generated SDK surface and the server reference on the same API version when you document an operation. If you target another Komga server release, verify its OpenAPI document before relying on a parameter or response field; generated types do not validate a newer server response automatically. When upgrading Komga, compare operation signatures and response types, regenerate the client, and re-run application-owned runtime validation fixtures if your integration has them. Keep migration notes focused on actual changed operations rather than reintroducing removed service or schema layers.

TypeDoc and source navigation

The package’s generated declarations and TypeScript types are the authoritative SDK reference. TypeDoc can provide symbol-level details for the published source, while this page and the OpenAPI tab explain how to use the generated surface. The generated sdk.gen.ts file is intentionally mechanical; prefer the examples in Direct API and Quick reference for integration patterns.

Next steps