Canvas
A canvas model is a PNG template you lay out visually: canvas size, background, images, shapes, text, and fonts. The API does not create models. It renders one that already exists in your project, optionally filling in parameters.
Building a model
Models live in a project on aegi.run. Open the project’s Canvas tab and save the document you want to render. When you open a saved model, the address bar carries its id:
That modelId is what the render endpoint takes. Images and fonts you add in
the editor are uploaded to Aegis’s file service and referenced by URL, so the
model itself stays small.
Rendering
The body is optional. values fills the parameters the model declares:
The SDK has no canvas resource yet, so post it directly and collect the job with the client you already have:
The response confirms the queue, not the render:
Canvas jobs have type canvas, and result is:
The output is a still PNG at the model’s canvas size.
Parameters
A parameter has a key, a kind (text or image), and optionally a default
value, required, and a regular expression. Text parameters replace
{{key}} tokens in text elements. Image parameters fill the image elements
that point at them.
- Every value is a string. A text value is limited to 2,000 characters.
- An image value is an
http(s)URL or a base64 data URL (png,jpeg,gif,webp,avif), up to 10 MB. - Keys the model does not declare are ignored, not rejected.
- A missing value falls back to the parameter’s default. If it is required and
has no default, the request fails with
400. - A value that does not match the parameter’s pattern also fails with
400. - A request carries at most 50 values, and at most 12 MB of them.
Limits
Remote sources are fetched by the worker, not by the browser. Loopback, private,
link-local and .local/.internal hosts are refused, so a render cannot reach
the network Aegis runs on.
Errors
Models are project scoped: a key can only render models in its own project.
Cost
Canvas renders are in the canvas class: 10 per minute on free, up to 1,000
on scale, and they also count against the aggregate budget. See
rate limits.