Open standard docs
Template Discovery API for AI Agents
How agents and integrations can search, retrieve, cite, and reuse Open Image Templates without downloading the full catalog.
Start with compact discovery
Use /api/templates/search for ranked retrieval or /templates-index.json for a compact catalog scan. Both return IDs, descriptions, tags, aspect ratios, model recommendations, human URLs, and JSON URLs without repeating every full prompt and control definition.
Search with filters
The search endpoint accepts q, category, tag, model, aspect_ratio, content_tier, limit, and offset. Sensitive templates are excluded by default and are returned only when include_nsfw=true is explicitly requested.
Fetch full records only when needed
After selecting a result, fetch its json_url to retrieve the complete prompt, editable slots, controls, negative prompt, example metadata, creator, license, and suggested settings. This two-step flow is faster and uses less context than downloading /templates.json.
Use the OpenAPI document
The machine-readable API description is published at /openapi.json. Tools can use its operation IDs, parameters, response schemas, and link relations to integrate the read-only discovery API.
Cite the canonical human page
Show users the canonical_url from a search result and use json_url for structured retrieval. JSON responses publish Link headers for the canonical HTML page, JSON Schema, and OpenAPI service description.