Use variables

Make prompts reusable with {{variables}} — syntax, live preview, defaults, arrays, advanced patterns.

Try it live

Edit the prompt below. Variables appear as inputs — fill them and watch the resolved output update instantly.

Variable Editor

Type {{name}} to create a variable. Fill it in below.

prompt-template.mdlive
resolved-output.txt
Write a professional blog post about prompt engineering for developers.

Basic syntax

Wrap any word in {{double braces}}:

Write a {{tone}} email to {{client}} about {{topic}}.

Creates three inputs: tone, client, topic.


Defaults

Add =value after the name to pre-fill:

Write a {{tone=friendly}} email to {{client}} about {{topic}}.
  • Input shows “friendly” by default
  • User can override or keep it

Variable types

SyntaxTypeExample
{{name}}Text (required){{client}}
{{name=default}}Text (optional){{tone=friendly}}
{{name?}}Text (optional, empty default){{notes?}}

Advanced patterns

Repeat a variable

Use the same name multiple times — fills once, appears everywhere:

Subject: {{topic}} update

Hi {{client}},

Here's your {{topic}} update for this week.

Thanks,
{{sender}}

Descriptions (shows as tooltip)

Add # description after the name:

Write a {{tone#professional or casual?}} email.

Arrays / lists

Prefix with * for comma-separated list input:

Include these points: {{*points}}

Input: point 1, point 2, point 3 → resolves to point 1, point 2, point 3


Live preview

As you type in variable inputs, the Resolved Prompt panel updates in real-time with color-coded substitutions:

  • Green = filled variable
  • Yellow = using default
  • Red = required but empty

Variable management UI

When you save a session with variables, PromptAura stores:

{
  "variables": {
    "tone": "friendly",
    "client": "Acme Corp"
  },
  "variableDescriptions": {
    "tone": "professional or casual?",
    "client": "company name"
  }
}

Edit these in the session editor → Variables tab.


Best practices

DoDon’t
{{client}}, {{topic}}, {{tone}}{{clientName}}, {{subject}}, {{voice}}
Use defaults for common casesLeave everything required
Add descriptions for teammatesUse cryptic names like {{x1}}

API usage

Variables sent via API:

curl -X POST https://prompt-aura.ppai.web.id/api/v1/sessions/:id/run \
  -H "Authorization: Bearer pa_xxx..." \
  -H "Content-Type: application/json" \
  -d '{"variables": {"topic": "API design", "tone": "technical"}}'

Missing required variables → 400 error with list of missing names.