chatform
API referenceV1

Generate a form document from a natural-language prompt

Returns a document and its lint issues **without saving anything** — pass the result to `POST /v1/forms` to keep it. Consumes one `ai_generations` unit and the tokens it costs, charged only when a usable document comes back. If you are already driving this from a model of your own, writing the document yourself and posting it to `/v1/forms` costs you nothing here.

POST
/v1/ai/generate-form

Authorization

AuthorizationBearer <token>

A server-side secret key. Never send one from a browser — a request carrying an Origin header is refused for this reason.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/ai/generate-form" \  -H "Content-Type: application/json" \  -d '{    "prompt": "string"  }'
{  "doc": null,  "issues": [    null  ],  "tokens": 0}