{"openapi":"3.0.0","paths":{"/health/live":{"get":{"operationId":"HealthController_live","parameters":[],"responses":{"200":{"description":"The HTTP process is running"}},"summary":"Process liveness, independent of MySQL availability","tags":["Health"]}},"/health/ready":{"get":{"operationId":"HealthController_ready","parameters":[],"responses":{"200":{"description":"Database and required schema are ready"},"503":{"description":"Database unavailable or migrations missing"}},"summary":"MySQL connectivity and migration readiness","tags":["Health"]}},"/api/v1":{"get":{"operationId":"ServiceController_info","parameters":[],"responses":{"200":{"description":""}},"summary":"Service version and implemented capabilities","tags":["Service"]}},"/api/v1/docs/api_ai_template.MD":{"get":{"operationId":"ServiceController_instructions","parameters":[],"responses":{"200":{"description":""}},"summary":"Versioned integration instructions and implementation status","tags":["Service"]}},"/api/v1/ai-templates":{"get":{"operationId":"TemplatesController_list","parameters":[{"name":"limit","required":true,"in":"query","schema":{"type":"string"}},{"name":"offset","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"List templates owned by this key owner (templates:read)","tags":["Templates"]},"post":{"operationId":"TemplatesController_create","parameters":[{"name":"Idempotency-Key","in":"header","description":"New UUID v4; reuse only when retrying this exact request","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["name","prompt","revision","doc"],"properties":{"name":{"type":"string","minLength":1,"maxLength":160},"prompt":{"type":"string","minLength":1,"maxLength":24000},"revision":{"type":"integer","minimum":0,"description":"0 for create; the last read revision for update"},"doc":{"type":"object","required":["body_html","row_html","css"],"properties":{"body_html":{"type":"string","maxLength":60000},"row_html":{"type":"string","maxLength":60000},"css":{"type":"string","maxLength":80000}},"additionalProperties":true}}}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Create a template (templates:create)","tags":["Templates"]}},"/api/v1/ai-templates/validate":{"post":{"operationId":"TemplatesController_validate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["doc"],"properties":{"doc":{"type":"object","required":["body_html","row_html","css"],"properties":{"body_html":{"type":"string","maxLength":60000},"row_html":{"type":"string","maxLength":60000},"css":{"type":"string","maxLength":80000}},"additionalProperties":true}}}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Validate and normalize a document without saving (templates:read)","tags":["Templates"]}},"/api/v1/ai-templates/contract":{"get":{"operationId":"TemplatesController_contract","parameters":[],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Read the schema version and supported placeholders (templates:read)","tags":["Templates"]}},"/api/v1/ai-templates/{id}":{"get":{"operationId":"TemplatesController_detail","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Read an owned template and its latest revision (templates:read)","tags":["Templates"]},"put":{"operationId":"TemplatesController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"New UUID v4; reuse only when retrying this exact request","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["name","prompt","revision","doc"],"properties":{"name":{"type":"string","minLength":1,"maxLength":160},"prompt":{"type":"string","minLength":1,"maxLength":24000},"revision":{"type":"integer","minimum":0,"description":"0 for create; the last read revision for update"},"doc":{"type":"object","required":["body_html","row_html","css"],"properties":{"body_html":{"type":"string","maxLength":60000},"row_html":{"type":"string","maxLength":60000},"css":{"type":"string","maxLength":80000}},"additionalProperties":true}}}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Replace a template using optimistic revision checking (templates:update)","tags":["Templates"]}},"/api/v1/ai-templates/generations/config":{"get":{"operationId":"GenerationsController_config","parameters":[],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Read generation availability and quotas (templates:read)","tags":["Generation"]}},"/api/v1/ai-templates/generations":{"post":{"operationId":"GenerationsController_start","parameters":[{"name":"Idempotency-Key","in":"header","description":"UUID v4; reuse for exact retries without another provider call","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["prompt"],"properties":{"prompt":{"type":"string","minLength":10,"maxLength":6000},"template_id":{"type":"integer","minimum":1,"description":"Owned template to refine; requires its current revision"},"revision":{"type":"integer","minimum":1}}}}}},"responses":{"202":{"description":""}},"security":[{"bearer":[]}],"summary":"Generate a draft without saving (templates:generate; refinements also require templates:read)","tags":["Generation"]}},"/api/v1/ai-templates/generations/{id}":{"get":{"operationId":"GenerationsController_get","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Poll an owned draft job (templates:generate; refinements also require templates:read)","tags":["Generation"]}}},"info":{"title":"Aether Template Generator","description":"User-scoped template API. Issue API keys in the Template Generator console. See api_ai_template.MD for the document contract.","version":"0.1.0","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{}}}