API Reference
All prompt generation flows through a single endpoint. The server is stateless — requests are processed in-memory and discarded after the response is returned.
Request Body
goal: string (required, min 10 chars)
background: string
role: string
audience: string
format: string
tone: string
examples: string
constraints: string
model: string (default: meta-llama/llama-3.1-8b-instruct:free)
outputLength: string
complexity: "simple" | "moderate" | "advanced" | "expert"
priority: "speed" | "balanced" | "quality" | "creative"
domain: string
language: string (default: english)
Response
{ "result": "# FRAMEWORK: [NAME] | REASON: ... | ..." }
Framework Selection Engine
The engine analyzes all 14 input fields to select the optimal framework for each request. There is no default — every generation runs a 4-step analysis pipeline before choosing a methodology.
Requirements Analysis
Extracts intent from the goal field, assesses complexity level, maps constraints, and identifies information gaps across all provided fields.
Structural Assessment
Evaluates which structural pattern fits: role-based, process-based, creative, analytical, or problem-solving. Maps input density to framework complexity.
Framework Matching
Selects the single best framework from 20 methodologies. Selection is influenced by complexity level, optimization priority, and domain context.
Prompt Optimization
Applies structural delimiters, persona engineering, constraint injection (positive + negative), reasoning activation tokens, and output format specification.
Supported Frameworks
Model Configuration
All requests route through OpenRouter. The selected model is stored in localStorage as advi_selected_model and persists across sessions.
Llama 3.1 8B Instruct
DefaultMeta
meta-llama/llama-3.1-8b-instruct:free
Gemini 3 Flash Preview
Fastgoogle/gemini-3-flash-preview
Claude Sonnet 4.5
RecommendedAnthropic
anthropic/claude-sonnet-4.5
Grok 4.1 Fast
BetaxAI
x-ai/grok-4.1-fast
GPT-4o
StableOpenAI
openai/gpt-4o
Dashboard Input Fields
The dashboard is organized into 4 collapsible sections. Each field is passed to the API and injected into the system instruction for framework-aware prompt generation.
Core Objectives
What should the AI accomplish? Minimum 10 characters.
Red (<10) → Yellow (10-49) → Green (50+)
Relevant context, data structures, or requirements that inform the task.
Persona & Targeting
The AI's assumed expertise, e.g. "Senior Full-Stack Engineer"
Who receives the output, e.g. "Junior Developers"
Specialized field context, e.g. "Healthcare, Finance"
10 options: English, Spanish, French, German, Russian, Ukrainian, Armenian, Chinese, Japanese, Korean
Output Configuration
Expected structure: JSON, Markdown, Code, etc.
Communication style: Technical, Conversational, etc.
Desired size: "500 words", "3 paragraphs"
Simple → Moderate → Advanced → Expert. Maps to technical depth modifiers.
Advanced Configuration
Speed (favors RTF/APE/TAG) → Balanced → Quality (favors CO-STAR/RISE/TRACE) → Creative
Input-output pattern demonstrations for behavioral conditioning.
What to explicitly avoid. Injected as NEVER/AVOID directives.
Data Architecture
Advi is fully stateless on the server. All persistence is client-side via localStorage.
HistoryItem Schema
interface HistoryItem {
id: string;
timestamp: number;
goal: string;
result: string;
orgId: string | null;
inputs: {
background?, role?, audience?, format?,
tone?, examples?, constraints?, model?,
outputLength?, complexity?, priority?,
domain?, language?
};
}
Server retention
0 seconds
History scoping
Filtered by orgId
Deletion
Instant & permanent
Output Format
Every generated prompt follows a strict output protocol. The first line always identifies the selected framework, the reasoning, and optimization techniques applied.
# FRAMEWORK: RISE | REASON: Multi-step process | OPTIMIZATIONS: CoT, delimiters
─────────────────────────────────
### ROLE
You are a senior backend engineer with 10+ years...
### INPUT
Given the following database schema and requirements...
### STEPS
1. Analyze the current query performance...
### EXPECTATION
Deliver optimized queries with execution plans...
### CONSTRAINTS
MUST use parameterized queries. NEVER use SELECT *...
### RESPONSE FORMAT
Markdown with SQL code blocks and explanations...
Copy to clipboard
One-click
Download format
.md (Markdown)
Stats display
Chars / Words / Lines