Generate a decision
Runs a managed prompt (selected by prompt_type) over your input variables and returns a JSON object shaped by the response schema.
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
This endpoint expects an object.
prompt_type
Which managed prompt to run. Prompt types are enabled per workspace by FormantAI; a type that is not enabled returns 400.
prompt_variables
Values for the prompt’s input variables, keyed by variable name. Not enforced: a missing variable still runs and is billed.
response_schema
Optional JSON Schema for the answer. Omit it to get the prompt type's default shape.
Response
The structured answer
data
The answer, shaped by response_schema or the prompt type’s default.
Errors
400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
413
Content Too Large Error
422
Unprocessable Entity Error
429
Too Many Requests Error
502
Bad Gateway Error
503
Service Unavailable Error
