Code Image
Render a syntax-highlighted code snippet as an image.
Part of the OG Image API.
Call it
The first response is 402 with the exact price and every rail you can
pay with. Pay, repeat the request with the proof, and you get the result.
curl -X POST https://api.glianalabs.com/v1/tools/code-image \
-H 'content-type: application/json' \
-d '{"code":"const x = 42;","title":"app.js"}'When to use it
Use when an agent shares code somewhere that cannot display a code block. Inputs: code (required, up to 400 lines), title (filename shown in the window bar), language (for highlighting, e.g. ts, py, go, sql, sh), theme ("dark" default or "light"), lineNumbers (true to number the lines). The image is as wide as the longest line. Returns url and contentType of the PNG.
What it costs
$0.0200 per successful call — flat, with no plan, minimum or monthly fee. A call that fails validation is refused before it runs, so it is never charged.
Not sure this is the right endpoint? GET /v1/consult?intent=… is
free and answers that.