ALTEGODocs
⌘K
altego.clubOpen the editor
Browse documentation
On this page
Docs / Developers

API and AI assistants

Give your assistant a key, describe your idea, and open the result in ALTEGO. Your AI uses the same pages, blocks and effects as the editor.

Connect your assistant

Create a personal keyOpen Settings → API. Choose permissions and expiry, then copy the key. Its full value is shown once.
Add it to your AIUse an assistant with HTTP tools or an OpenAPI connector. Set its authentication to Bearer, or save the key as ALTEGO_API_KEY in its secret store.
Describe your pageShare the guide and your brief. The assistant creates a draft in your account. Open it in the editor, review it, then publish.
i
Your assistant needs a tool that can make HTTP requests. A plain chat cannot call the API by itself. This is a REST API with OpenAPI documentation, not an MCP server.
Instruction for your AI
Use https://altego.club/api/v1/guide and its OpenAPI schema to build my ALTEGO page.
My API key is configured in your secret store as ALTEGO_API_KEY.
Read https://altego.club/api/v1/catalog for block defaults and effects.
Create a draft from my brief and return its editor link. Ask me before publishing.
For edits, fetch the current document and revision first. Preserve fields I did not ask to change.

Keys and permissions

Each key accesses only its owner’s pages. Keys cannot access other accounts or admin controls. Keep the key in the assistant’s secret settings, outside public prompts, page content and source control.

Request headers
Authorization: Bearer YOUR_KEY
Content-Type: application/json
User-Agent: ALTEGO-Agent/1.0
PermissionWhat it allows
pages:readRead your pages and assets. Always included.
pages:writeCreate and edit drafts.
assets:writeUpload images and fonts.
pages:publishPublish, unpublish and modify live pages.

Publishing is off by default. Editing a live page needs both write and publish permissions. Keys expire in 1–365 days and can be revoked at any time in Settings → API.

Endpoints

Base URL: https://altego.club/api/v1. Private endpoints require your Bearer key. The guide, schema and catalog are public.

RequestAction
GET /meCheck the account and key permissions.
GET /catalogRead block defaults and effect presets.
GET /pagesList your pages and revisions.
POST /pagesCreate a draft from a name, handle and blocks.
GET /pages/{id}Read a complete page document.
PUT /pages/{id}Replace the document with its expected revision.
PUT /assets/{id}Upload an image or font as raw bytes.
GET /assets/{id}Download your stored asset.
POST /pages/{id}/publishPublish a page.
POST /pages/{id}/unpublishReturn a page to draft.

Your first API page

Set ALTEGO_API_KEY in your environment, then run this Python example. It creates one draft and prints its editor link.

Python · standard library
import json, os, uuid, urllib.request

body = {"operationId": str(uuid.uuid4()), "page": {
    "handle": "ai-" + uuid.uuid4().hex[:12],
    "name": "Built with AI",
    "blocks": [{"type": "heading", "text": "Hello, world"}]}}
request = urllib.request.Request(
    "https://altego.club/api/v1/pages",
    data=json.dumps(body).encode(), method="POST",
    headers={"Authorization": "Bearer " + os.environ["ALTEGO_API_KEY"],
             "Content-Type": "application/json",
             "User-Agent": "ALTEGO-Agent/1.0"})
with urllib.request.urlopen(request) as response:
    page = json.load(response)
print("https://altego.club/#/edit/" + page["document"]["handle"])
i
The result is saved in your account. If the editor is already open, reload it to fetch pages created externally. A new page stays private until published.

Effects and layers

Use the block and effect catalog for complete defaults and the available preset IDs. Place blocks with frame: {x, y, w, h} on the 1280 px desktop canvas; phone and tablet layouts adapt automatically.

The block array controls layer order: first at the back, last in front. Effects accept custom colors, transparent alpha and opacity from 0 to 100. Use #RRGGBBAA for effect colors with transparency.

Upload images or fonts before saving the page. Images use {kind: "upload", key: "asset UUID"}; an effect’s photo field takes the asset UUID directly. Upload IDs are immutable.

Publishing and retries

To update a page, fetch its complete document and revision. Send the modified document with expectedRevision and a fresh operationId. Preserve fields you did not intend to change.

After a timeout, retry the exact same body and operation ID. A revision conflict returns 409: fetch the current page, reconcile your changes, then use a new operation ID. There is no page deletion endpoint in v1.

StatusMeaning
401Invalid, expired or revoked key.
403Missing permission. An edge rejection may also occur before the API; use the client identity shown above.
404Page or asset missing, or belongs to another account.
409Revision, handle or operation ID conflict.
413 / 415Size limit or unsupported upload.
429Rate limit; wait before retrying.

Read the full API guide for all limits, error codes and upload formats.