AI
Generate XML prompt from natural language
Generates a full XML prompt from a natural language instruction, or iteratively refines an existing prompt when conversationHistory and existingPrompt are supplied. Does not persist anything; the returned prompt text is meant to be saved by the caller.
Authorization
bearerAuth In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/ai/nl-create" \ -H "Content-Type: application/json" \ -d '{ "instruction": "Draft a friendly follow-up agent that re-engages leads 24h after the last reply.", "existingPrompt": "", "conversationHistory": [], "variableContext": { "firstName": "Alex", "propertyName": "Maple Court" }, "assistedMode": true, "modelOverride": { "provider": "anthropic", "model": "claude-sonnet-4-6" } }'{ "success": true, "prompt": "<prompt><role>Friendly leasing follow-up agent</role><goal>Re-engage leads 24h after their last reply.</goal></prompt>"}