Skip to main content
POST
/
api
/
ai
/
nl-create
Generate XML prompt from natural language
curl --request POST \
  --url https://your-instance.example.com/api/ai/nl-create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "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>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.tetherai.ca/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
instruction
string
required

Natural-language ask describing what the prompt should accomplish.

existingPrompt
string

Optional current prompt XML to iteratively refine; absent for first-draft generation.

conversationHistory
object[]

Prior turns in this prompt-drafting session, replayed so the model can continue an iterative refinement thread.

variableContext
object

Available runtime variables and field scopes (grouped) the editor exposes; constrains the model to real @variables instead of inventing placeholders.

assistedMode
boolean

When true, drafting uses the stronger battle-tested XML architecture system prompt; otherwise stays closer to the user request with lighter guardrails.

modelOverride
object

Pin to a specific provider/model (e.g. { provider: 'anthropic', model: 'claude-sonnet-4-6' }) overriding the org's default assignment.

Example:
{
  "provider": "anthropic",
  "model": "claude-sonnet-4-6"
}

Response

Prompt drafted

success
boolean
required
prompt
string
required

Generated XML prompt