AI Suggestions
Endpoints for generating app creation suggestions based on available data sources and AI analysis.
GET /api/apps/suggestions
Get keyword-based app suggestions derived from the user's available datasets and toolkits.
Authentication: Required
Pre-requisites: AI feature must be enabled (ai.verify)
{
"_links": {
"self": {
"href": "https://informer.example.com/api/apps/suggestions"
}
},
"suggested": [],
"templates": [
{
"id": "kpi-dashboard",
"title": "KPI Dashboard",
"description": "Track key performance indicators with live metrics",
"icon": "speed",
"color": "blue",
"category": "template",
"prompt": "Create a KPI dashboard with cards showing key metrics. Include trend indicators and sparkline charts. Use a clean, professional design with a grid layout."
},
{
"id": "chart-gallery",
"title": "Chart Gallery",
"description": "Multiple chart types in an interactive layout",
"icon": "bar_chart",
"color": "teal",
"category": "template",
"prompt": "Create a chart gallery with multiple visualization types - bar charts, line charts, pie charts, and a data table. Make the charts interactive and responsive."
},
{
"id": "data-entry-form",
"title": "Data Entry Form",
"description": "Collect and submit data with validation",
"icon": "edit_note",
"color": "green",
"category": "template",
"prompt": "Create a data entry form with text inputs, dropdowns, date pickers, and validation. Include a submit button that shows success/error feedback."
},
"… 3 more items (6 total) — omitted from docs"
],
"meta": {
"datasetsAnalyzed": 0,
"toolkitsAnalyzed": 0
}
}
Key Fields:
| Field | Description |
|---|---|
suggested | Data-driven suggestions (title, description, prompt, icon, color) matched from dataset field names and toolkit types; capped at 8, deduplicated by title |
templates | Static template suggestions (KPI dashboard, data explorer, etc.) |
meta.datasetsAnalyzed / meta.toolkitsAnalyzed | How many of the caller's Datasets/Toolkits were analyzed |
Pattern Matching:
Suggestions are generated by matching keywords in dataset field names against known patterns (sales, customer, inventory, employee, finance, project, shipping) and toolkit types (GitHub, Slack, Stripe, Jira, Salesforce).
POST /api/apps/suggestions
Generate AI-powered app suggestions using an LLM to analyze available data sources.
Authentication: Required
Pre-requisites: AI feature must be enabled (ai.verify)
Payload: None (empty body)
Response Fields:
| Field | Description |
|---|---|
suggestions | AI-generated entries: label (3-6 word title), description, prompt (names the specific data source and its id), icon (Material icon name), color |
meta.source | "ai", or "templates" when the caller has no data sources to analyze (the static templates are returned instead) |
meta.datasetsAnalyzed / queriesAnalyzed / datasourcesAnalyzed | Context sizes fed to the model |
Behavior:
- Loads up to 10 each of the user's datasets, queries, and datasources to build context
- Uses an LLM to generate relevant app suggestions with specific prompts
- Falls back to keyword-based suggestions if the AI call fails
- Suggestions include detailed prompts that reference the user's actual data sources
POST /api/apps/{id}/_suggest-icon
Generate a duotone SVG favicon for a specific app, optionally refining across multiple iterations within the same dialog session.
Authentication: Required.
Permission: permission.app.edit (Member+, level 2 + not managed).
Editing the favicon is an identity mutation, locked on managed apps.
Pre-requisites: AI feature must be enabled. The strategic-tier
model (go_strategic) must be registered.
Payload: all optional.
{
"name": "Optional name override (defaults to app.name)",
"description": "Optional description override",
"refine": "Free-text note for next iteration (e.g. 'more blue, less busy')",
"previousSvg": "<svg>...</svg>",
"metaphor": "shopping-bag"
}
refineis folded into the prompt as "the user asked for these changes." Capped at 500 characters server-side.previousSvgis the most-recent suggestion the dialog received; the model uses it as the "previous design" it iterates on. First-pass calls (no previous SVG) design from scratch.metaphoris a Font Awesome icon NAME (nofa-prefix) used as inspiration for the central glyph. The server passes the name only, not the path data, so the model redraws at app-tile scale rather than pasting the literal icon onto a tile.
Response:
{ "svg": "<svg ...>...</svg>" }
The server validates the SVG before returning: must start with <svg,
must not contain <image> / <script> / href (executable or
external-asset hooks), and must be ≤ 32 KB. Validation failures
return a clear error message — see app/lib/favicon-design.md
for the design constraints the model is asked to follow.
Errors:
| Status | Cause |
|---|---|
| 403 | App is managed (origin: deployed/marketplace) — favicon is publisher-locked. |
| 503 | go_strategic model unavailable. |
| 422 | Generated SVG failed the content-safety whitelist (<script> etc.). |