Agents and the API

An agent builds it. You stay in charge.

Alnitak’s API reaches every part of a page: its blocks, photos, files, styles, themes, fonts and forms. An AI agent can learn it in minutes, build pages, look at them, and save them. You review and edit the same pages in the editor, and nothing the agent did is hidden from you.

No SDK, no integration project

The API explains itself to whoever calls it.

Alnitak publishes its own API definition (OpenAPI 3.1) and a JSON Schema for every block type, with the CSS hooks each block renders. An agent reads them before it starts, so it knows every operation and every field. When Alnitak gains a new block or a new operation, every agent sees it on its next run, with nothing to install or update.

# the whole API, described
GET  /api/v1/openapi.json

# what a photo block accepts
GET  /api/v1/block-schemas/photo

# how a page would look
POST /api/v1/posts/preview.png

# publish it
POST /api/v1/posts
The first screen of Alnitak’s home page at phone width, as the API rendered it before it was saved.
What the agent saw before saving this site’s home page: the API’s render of it at phone width.

Look before you save

The agent sees the page before anyone else does.

Alnitak renders a page that has not been saved yet, as HTML or as a screenshot, at any width and in any of the site’s languages. An agent that can see images checks its own work at phone and desktop size, and fixes what looks wrong before it saves.

Mistakes point to themselves

An error says exactly where the problem is.

When something in a request is wrong, the answer names the spot, down to the block and the field, and says what is wrong in plain words. A slug that is already taken comes back with a free one to use instead. An agent corrects itself without guessing.

The second block’s second block: the photo inside the row.

POST /api/v1/posts/preview.html

422  ["body", "blocks", 1, "blocks", 1, "photo_id"]
     photo not found: no-such-photo
The Versions tab of a page: 48 versions, each saved through the API and labelled with the run that saved it.
48 versions of one page, each with the run that saved it.

Every change on the record

Nothing an agent does goes unrecorded.

Every save is a version of the page. Each version records whether it came through the API, and which run of the agent made it. The posts list marks the pages an agent created or changed. The audit log shows each run as one unit: every call, its timing and status, and the request and response bodies. Compare any two versions, block by block and word by word, and restore one with a click.

One agent run in the API audit log: it updated a page, listed its versions and read it back.
One agent run in the audit log: update the page, list its versions, read it back.
The posts list of a 907-page archive, each page marked Created via API or Changed via API.
907 pages, 899 of them created through the API.

Keys you control

Give an agent a key, not your password.

Each API key belongs to one person on one site, and can be read-write or read-only. You create, disable and revoke keys in the admin, and see when each was last used. A revoked key stays in the record, so you can still tell which calls it made.

The admin dashboard’s Insights and Developer groups: analytics, usage, latency, API keys, the API audit log, the API operations and the block schemas.
The admin’s developer tools: keys, the audit log, every operation and every block schema.

What the API covers

What an agent can do today.

AreaOperations
Pagescreate, update, delete, search; versions, compare, restore; preview as HTML or image
Sections and tagscreate, rename, translate, delete
Photos and albumsupload, describe, sort into albums, add HDR
Filesupload, describe, replace, delete
Designthemes, fonts, style templates, style recipes, the site’s design settings
Formscreate, draft, publish versions; read and file submissions
Discoverythe API definition, block schemas, layouts, the styling guide, site search

Seventy operations in all. A few things are still done in the admin only: interface strings, site settings and user accounts.

Proof

A historical archive, rebuilt by an agent.

A historical archive of 907 pages was rebuilt this way. An agent created 899 of its pages through the API: biographies, a chronology with a page per year, court records, a press archive. It also translated them into five languages. People reviewed every page in the editor. Its home page alone has 48 versions.

An older version of a page compared with the current one, block by block, with the changed words marked in five languages.
What an agent changed between two versions, in all five languages.

How this site was made

This site was built the same way.

These pages were written by an AI coding agent through the same API, from a set of numbered scripts. Each run carries its own trace, each page was rendered and checked before it was saved, and a person reviewed every word. The screenshots on this site were taken by a script too, so they can be retaken whenever the admin changes.

© 2026 Polite Software Studio. Focused tools, thoughtfully made.