Generate a document from a raw template body (no persistence)
jsonfabrica_generate_adhocGenerates a document directly from a raw template body string for ad-hoc synthetic data creation. Use when you need a quick one-off JSON sample without saving a reusable template.
Instructions
Calls POST /v1/templates/generate. Generates a document directly from a raw body string without creating a template record — prefer this over jsonfabrica_generate_from_template while still iterating on template syntax; switch to jsonfabrica_create_template once the body is ready to be reused or shared. Goes through the same billing/usage metering as persisted-template generation (not a free bypass). createSeq()/durable sequence side effects still apply; set sequenceNamespace/variableNamespace to e.g. "debug" to avoid colliding with real tenant sequences and variables.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Raw template body containing at least one function-call placeholder, e.g. "Hello {{getRandomFullName()}}" — evaluated directly without persisting a template record. Required. | |
| seed | No | Deterministic PRNG seed for this generation — the same seed reproduces byte-identical random values. Optional; if omitted the server picks a random seed and returns it in the response. | |
| params | No | Key/value map supplying values for getParam("key") placeholders in `body`. Optional; omitted keys leave the corresponding getParam() calls unresolved/empty. | |
| context | No | Arbitrary auxiliary key/value data made available to `body` alongside `params`. Optional; omitted keys are simply absent during generation. | |
| sequenceNamespace | No | Isolates createSeq()/getSeq() durable-sequence side effects under this namespace, e.g. "debug", so ad-hoc runs don't advance real tenant sequences. Optional; omitted means the default (unnamespaced) sequence scope is used. | |
| variableNamespace | No | Isolates durable-variable side effects under this namespace, analogous to `sequenceNamespace`. Optional; omitted means the default (unnamespaced) variable scope is used. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | The generated document; shape is entirely determined by the template body. | |
| meta | Yes | Generation metadata. |