GlyphfieldDocs
Documentation/System reference

Endpoint reference

Public machine routes for discovery, identities, elements, generation, search, and OpenAPI.

Maintained with source

Discovery

MethodRouteResponse
GET/llms.txtPlain-text agent runbook
GET/llms-full.txtComplete agent-readable documentation corpus
GET/api/docs/{slug}One processed documentation page as Markdown
GET/api/agentVersioned manifest and generation contract
GET/openapi.jsonOpenAPI 3.1 JSON
GET/api/catalogStudio tool catalog, resource links, Shader Library, and deterministic Surface Library
GET/api/labsComplete Studio lab-plugin catalog
GET/api/materialsComplete shared Shader Library with controls and attribution
GET/api/identitiesBuilt-in template and reference identity records
GET/api/elementsSearchable brand element records
GET/api/generateCurrent generation contract and examples
GET/api/searchSelf-hosted documentation search index/query response
GET/api/surface-textures/{assetId}/{map}Allowlisted CC0 surface map with provider/license headers

Generation

MethodRouteContent type
POST/api/generateRequest: application/json; response: JSON or image/svg+xml
OPTIONS/api/generateCORS preflight

Generation supports template, background, element-brief, and design-sequence kinds.

design-sequence returns a response-schema-1 envelope with a version-3, apply-ready Design Lab compatibility document rather than a server-rendered approximation. Apply it with the programmatic browser API; Design Lab validates and normalizes it to CanvasDocument schema 2 with Design Lab source 4. Re-read that source, then invoke design.export with png, jpg, gif, or mp4. GIF and MP4 also accept mode: 'shader-sequence'; this keeps the result on the authentic Canvas/WebGL renderer.

Browser API

Every active Studio tool registers window.glyphfield.studio (version 1). The API discovers and operates visible controls by accessible label, including authorized uploads supplied as File objects. Source-enabled tools also expose exact readSource and async applySource methods. download(artifact) and artifact.download save returned Blob artifacts. Use describe() to discover current tool-specific actions.

Design Lab actions include PNG/JPG stills, GIF, ordinary MP4, sequence GIF/MP4, sequence preview, stop, describe, and configure. await invoke('design.export', { format, mode?, download? }) is the unified entry point. Export actions resolve to an object containing the generated Blob, file name, dimensions, and format; download: true also writes the file through the browser.

MethodRoutePurpose
GET/api/searchSelf-hosted Fumadocs/Orama documentation search

Search is used by the documentation UI and is separate from Studio tool search.

Supporting routes

GET /api/surface-textures/{assetId}/{map} only accepts an assetId published by the surface catalog and a map of color, displacement, metalness, normal, or roughness. It never acts as an arbitrary URL proxy. Successful responses include X-Surface-License and X-Surface-Provider; unavailable maps return 404, and unreachable allowlisted upstreams return 502.

GET /api/github-stars supplies the current repository-star count to product chrome. It is an optional UI utility rather than a generation dependency; consumers must tolerate 503 and stars: null.

OpenGraph routes /api/og-home, /api/og, and /og/docs/{slug}/image.png are covered in Social previews.

Caching

Discovery GET routes are publicly cacheable for a short period. Generation responses use Cache-Control: no-store.

CORS

Agent routes expose:

Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, Accept

The current routes do not require an API key.

  1. /api/agent
  2. /api/labs
  3. The task-specific catalog
  4. /api/generate when producing an HTTP artifact
  5. /api/docs/{slug} or /llms-full.txt for the necessary operating detail

Catalog IDs, schemas, and action lists are authoritative. Examples are explanatory and should not be treated as a substitute for discovery.

On this page