All Guides

Custom Analysis Templates

Create a custom analysis template with your own prompt, run it against a brand, and iterate to refine the output. Build reusable, shareable scoring criteria for your team.

~8 min

Overview

Templates define the prompt and scoring rubric used by the Analyze API. Linksii ships with built-in templates (like brand_scorecard) but you can create custom ones tailored to your evaluation criteria — e.g. a UX audit, an SEO assessment, or a competitive feature comparison.

Built-in templates

brand_scorecard

Overall brand scoring across 5 dimensions (visual identity, messaging, trust, CTA, AI discoverability)

ux_audit

UX quality assessment — navigation clarity, content hierarchy, accessibility signals

competitive_positioning

How well a brand differentiates itself vs. category leaders

Custom templates are scoped to your workspace. Share templates across workspaces by copying the template_id — any workspace with API access can use a template ID from another workspace.


List Templates

Start by listing available templates to see what already exists for your workspace, including built-in templates.

curl "https://www.linksii.com/api/v1/templates?workspace_id=ws_01HXYZ" \
  -H "Authorization: Bearer lnk_your_api_key_here"

Response

{
  "data": [
    {
      "id": "brand_scorecard",
      "name": "Brand Scorecard",
      "slug": "brand-scorecard",
      "system_prompt": "Score a brand across 5 key dimensions...",
      "type": "builtin",
      "created_at": null
    },
    {
      "id": "tmpl_01HXYZ",
      "name": "SaaS Landing Page Audit",
      "slug": "saas-landing-page-audit",
      "system_prompt": "Evaluate SaaS homepage effectiveness...",
      "output_schema": "{ score: number, ... }",
      "type": "custom",
      "created_at": "2025-05-20T14:00:00Z"
    }
  ],
  "meta": { "total": 2, "limit": 20, "offset": 0 }
}

Create a Template

A template has a name, slug, system_prompt (the instructions passed to the AI model), and an optional output_schema that defines the expected response structure.

1

Write your prompt

Focus your prompt on specific, measurable criteria. The example below creates a template that scores SaaS landing pages on conversion readiness.

2

POST to /api/v1/templates

curl -X POST https://www.linksii.com/api/v1/templates \
  -H "Authorization: Bearer lnk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "workspace_id": "ws_01HXYZ",
    "name": "SaaS Conversion Audit",
    "slug": "saas-conversion-audit",
    "system_prompt": "You are a conversion rate optimisation expert. Analyse this screenshot and score the page 0-100 overall and across these dimensions:\n\n1. headline_clarity (0-100): Is the value proposition clear in under 5 seconds?\n2. social_proof (0-100): Is there visible, credible social proof above the fold?\n3. cta_prominence (0-100): Is the primary CTA visually dominant and action-oriented?\n4. friction_level (0-100, higher = less friction): How many steps between landing and sign-up?\n5. mobile_readiness (0-100): Does the layout appear optimised for smaller screens?\n\nReturn JSON with keys: score, dimensions (each with score and summary), recommendations (array of strings).",
    "output_schema": "{ score: number, dimensions: { [key]: { score: number, summary: string } }, recommendations: string[] }"
  }'

Response

{
  "data": {
    "id": "tmpl_01HABC",
    "workspace_id": "ws_01HXYZ",
    "name": "SaaS Conversion Audit",
    "slug": "saas-conversion-audit",
    "system_prompt": "You are a conversion rate optimisation expert...",
    "output_schema": "{ score: number, dimensions: ... }",
    "type": "custom",
    "created_at": "2025-06-01T10:00:00Z"
  }
}

Save the template id (e.g. tmpl_01HABC). You'll pass it as the template field when running analyses.


Run with Your Template

Pass your new template ID as the template field. The context object provides additional metadata to the analysis.

curl -X POST https://www.linksii.com/api/v1/analyze \
  -H "Authorization: Bearer lnk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://cdn.example.com/screenshots/my-saas-homepage.png",
    "template": "tmpl_01HABC",
    "workspace_id": "ws_01HXYZ",
    "context": {
      "brand_name": "My SaaS",
      "industry": "project management"
    }
  }'

Iterate the Prompt

Refine your template by updating it with PUT /api/v1/templates/:id. This keeps the same ID so existing analyses referencing it remain linked.

curl -X PUT "https://www.linksii.com/api/v1/templates/tmpl_01HABC" \
  -H "Authorization: Bearer lnk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "system_prompt": "Updated system prompt with improved scoring criteria..."
  }'

Prompt writing tips

Be specific about dimensions

Name each scoring dimension explicitly. Vague prompts produce inconsistent outputs.

Specify the output format

Ask for JSON with defined keys. e.g. "Return JSON with keys: score (int), dimensions (object), recommendations (array)".

Set scale boundaries

Always clarify what 0 and 100 mean for each dimension to anchor the model.

Use the context object

Pass brand-specific metadata via the context field at analysis time so the same template works across different brands.


Error Handling

CodeCause & Fix
400Missing required fields (workspace_id, name, slug, or system_prompt). Check request body.
400Template ID not found when running analysis. Verify the template ID and workspace ownership.
404Template not found for PUT/DELETE. Confirm the template ID exists in your workspace.
409Template name already exists in this workspace. Use a unique name or update the existing template.

Next Steps