THL Library

Programs, SDKs, and code you can pull straight into your own projects — pip-installable packages, embeddable engines, and open-source building blocks. Take what you need, wire it in, ship.

Packages in the THL Library

Browser · Python Live

Convert

Change an image between PNG, JPEG, WebP and AVIF without uploading it anywhere.

The same tool through three doors: a page that runs on a canvas, a plain-english request to the assistant, and thl convert in a terminal. One spec describes the arguments, so all three take the same ones and cannot drift apart.

format png, jpeg, webp or avif. Required.
quality 1-100 for the lossy formats. Defaults to 92.
Open Convert thl convert photo.jpg --format webp --quality 70
Python · Toolkit Live

thehallucinatedlab

Every tool in the lab, as an ordinary Python method — and as a page you can open in a browser.

One spec describes each tool: its arguments, their bounds, and the words that mean it. The website builds its convert and its argument table from that spec, the assistant parses plain english against it, and this package validates against it. There is no second copy to fall out of date.

Runs on your machine No API key, no account, no upload, no service to be up. In the browser it is a canvas; in Python it is Pillow.
Three doors, one tool Use the web page, ask the assistant, or import the method. Same arguments, same behaviour, same defaults.
Docs that cannot go stale The argument reference on each tool page is generated from the spec the code validates against.
Typed errors, not guesswork Bounds come from the spec, so a bad argument fails with a sentence naming the argument rather than a stack trace.
Plain english included thl "convert photo.jpg to png" works, and it is rules rather than a model — instant, offline, and tested.
First tool shipped convert handles PNG, JPEG, WebP and AVIF, flattening transparency onto a colour you choose.
Open Convert pip install thehallucinatedlab

More on the Shelf Soon

The Library grows as we extract the reusable parts of everything we build — packages, engines, and snippets designed to bolt straight onto your project.

Request a package