Auditmark

Generate a template with AI

POST
/templates/ai-generate

Draft a template from a written description: the JSON sibling of ai-import. Same guard order and the same draft pipeline, minus the upload stage — pydantic parses the body, and its prompt has already been through clean_ai_instruction — so the outcome is always a created draft, never a sheet choice.

Authorization

OrgApiKey
AuthorizationBearer <token>

Organization API key. Send as Authorization: Bearer <key>. Create one in Admin > Settings > API keys.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://api.auditmark.io/v1/templates/ai-generate" \  -H "Content-Type: application/json" \  -d '{    "prompt": "string"  }'
{  "status": "created",  "template_id": "c6d67e98-83ea-49f0-8812-e4abae2b68bc",  "family_id": "fcd2485f-01cf-42a4-b87e-419b8257112a",  "sheets": [    {      "name": "string",      "rows": 0    }  ]}
{  "detail": [    {      "loc": [        "string"      ],      "msg": "string",      "type": "string",      "input": null,      "ctx": {}    }  ]}