Generate intent-rule draft with AI
Intent Rules
Generate intent-rule draft with AI
Generate or refine intent-rule draft content with natural-language instructions and an LLM.
POST
Generate intent-rule draft with AI
Generates intent-rule draft content from natural-language instructions and the workspace’s current fields context. The LLM returns a draft name, description, and rule tree.
This endpoint supports intent rules only. It generates against the intent-rule fields context.
The generated draft is not saved automatically. Persist the returned content with Create intent rule or Update intent rule, using
status: "DRAFT".Headers
string
required
Bearer token containing your Fini workspace API key. Format:
Bearer fini_... The key needs write scope.string
required
application/jsonBody parameters
string
required
Natural-language instructions describing the rule to create or the changes to make. The value cannot be empty.
string
Current rule name. Used as context when refining
currentFlowConfig.string
Current rule description. Used as context when refining
currentFlowConfig.RuleNodeConfig
Existing rule tree to refine. Omit it to generate a new draft from scratch.
Response
object
Generated draft content with
name, description, and flowConfig.Errors
400 Bad Request
400 Bad Request
instructions is empty, or currentFlowConfig is invalid.403 Forbidden
403 Forbidden
The API key does not include the
write scope required for this route.500 Internal Server Error
500 Internal Server Error
Fini could not generate the draft content.

