Glyphfield API
Generate from the live contract rather than remembered IDs or fields.
Start with discovery
Resolve the Glyphfield origin from the user or environment. Use http://localhost:3012 only for this repository's local development server.
- Read
/api/agent for interfaces, policies, resources, and generation kinds.
- Read
/api/labs for the current tool catalog. Do not hard-code its count.
- Read the relevant
/api/materials, /api/identities, /api/elements, or /api/catalog data.
- Read
GET /api/generate immediately before building a POST body. Its requestSchema is the same discriminated schema published in /openapi.json.
- Use
/openapi.json, /llms.txt, or /llms-full.txt when the task needs the full machine contract.
Read references/http-generation.md for request patterns and the Design Lab bridge.
Choose the generation kind
template: deterministic slide, blog-cover, or partnership SVG.
background: deterministic gradient, pattern, dither, or tactile surface SVG.
element-brief: one catalog element resolved against an identity.
design-sequence: an apply-ready layered composition plus shader timeline and Browser API commands.
Use output: "raw" for direct SVG bytes where supported. Otherwise parse the JSON artifact envelope. Design-sequence output is JSON and requires the browser for authentic Canvas/WebGL raster or motion export.
Contract rules
- Send
Content-Type: application/json.
- Unknown top-level fields are rejected; use only values from current discovery. Validate against
requestSchema before sending when your client supports JSON Schema.
- Do not invent shader, identity, element, surface, or tool IDs.
- Do not send remote URLs. Use supported data URLs or an authorized browser
File when a local asset is needed.
- Treat
400, 413, 415, and 429 bodies as actionable structured errors. Do not retry unchanged invalid input.
- HTTP generation does not mutate an open Studio project.
- For public or self-hosted deployment work, load
/docs/reference/api-security and /docs/reference/self-hosting; repository validation and edge rate limiting are separate controls.
Completion
For SVG, confirm status, MIME type, extension, dimensions, and a non-empty body. For JSON, validate the expected schema fields. For a design sequence, apply response.document in Design Lab, re-read normalized source, inspect the canvas, and export there.
1---2name: glyphfield-api3description: Discover and use Glyphfield's deterministic HTTP API for brand identities, catalogs, element briefs, SVG backgrounds/templates, and apply-ready Design Lab sequences. Use for programmatic or batch generation that should not depend on an open browser canvas.4---56# Glyphfield API78Generate from the live contract rather than remembered IDs or fields.910## Start with discovery1112Resolve the Glyphfield origin from the user or environment. Use `http://localhost:3012` only for this repository's local development server.13141. Read `/api/agent` for interfaces, policies, resources, and generation kinds.152. Read `/api/labs` for the current tool catalog. Do not hard-code its count.163. Read the relevant `/api/materials`, `/api/identities`, `/api/elements`, or `/api/catalog` data.174. Read `GET /api/generate` immediately before building a POST body. Its `requestSchema` is the same discriminated schema published in `/openapi.json`.185. Use `/openapi.json`, `/llms.txt`, or `/llms-full.txt` when the task needs the full machine contract.1920Read [references/http-generation.md](references/http-generation.md) for request patterns and the Design Lab bridge.2122## Choose the generation kind2324- `template`: deterministic slide, blog-cover, or partnership SVG.25- `background`: deterministic gradient, pattern, dither, or tactile surface SVG.26- `element-brief`: one catalog element resolved against an identity.27- `design-sequence`: an apply-ready layered composition plus shader timeline and Browser API commands.2829Use `output: "raw"` for direct SVG bytes where supported. Otherwise parse the JSON artifact envelope. Design-sequence output is JSON and requires the browser for authentic Canvas/WebGL raster or motion export.3031## Contract rules3233- Send `Content-Type: application/json`.34- Unknown top-level fields are rejected; use only values from current discovery. Validate against `requestSchema` before sending when your client supports JSON Schema.35- Do not invent shader, identity, element, surface, or tool IDs.36- Do not send remote URLs. Use supported data URLs or an authorized browser `File` when a local asset is needed.37- Treat `400`, `413`, `415`, and `429` bodies as actionable structured errors. Do not retry unchanged invalid input.38- HTTP generation does not mutate an open Studio project.39- For public or self-hosted deployment work, load `/docs/reference/api-security` and `/docs/reference/self-hosting`; repository validation and edge rate limiting are separate controls.4041## Completion4243For SVG, confirm status, MIME type, extension, dimensions, and a non-empty body. For JSON, validate the expected schema fields. For a design sequence, apply `response.document` in Design Lab, re-read normalized source, inspect the canvas, and export there.