AllGoodInsp AGI

REST API

The AllGoodInsp REST API provides programmatic access to the design reference database and the /extract-essence synthesis step. All endpoints return JSON and support CORS. A few capabilities remain MCP-only: search_by_component (reverse lookup by design element), get_principles / get_patterns, and the methodology guides.

Base URL

https://api.allgoodinsp.com/v1

Quick start

No key needed for the first call:

curl "https://api.allgoodinsp.com/v1/sites?limit=3"

Then sign in, click New Key on your account page, and check the key (free, no credits used):

curl "https://api.allgoodinsp.com/v1/credits" \
  -H "Authorization: Bearer YOUR_API_KEY"

Search for references, then synthesize the top hits into a DESIGN.md:

curl "https://api.allgoodinsp.com/v1/search?q=saas+landing+bold+typography&limit=3" \
  -H "Authorization: Bearer YOUR_API_KEY"

curl -X POST "https://api.allgoodinsp.com/v1/extract-essence" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"site_ids": ["<id-1>", "<id-2>"], "brief": "SaaS landing page, bold typography"}'

Authentication

Most read endpoints work without authentication, subject to stricter rate limits. For higher limits and write access, generate an API key from your account page and include it in the Authorization header. The same API key works for both the REST API and MCP.

Authorization: Bearer YOUR_API_KEY
Unauthenticated 5 req/hour, 10/day (general). 3 req/hour, 5/day (search). No submissions.
Authenticated 10 req/min, 50/day (general). 5 req/min, 25/day (search). 5 req/hour, 3/day (submissions).

Endpoints

GET /sites

List all sites with optional filters and pagination.

Query parameters

category Filter by category (e.g. software-saas, agency)
country Filter by ISO 3166-1 alpha-2 code (e.g. JP, US)
region Filter by region (e.g. east-asia, europe)
page Page number (default: 1)
limit Results per page, 1–100 (default: 30)

Example

curl "https://api.allgoodinsp.com/v1/sites?category=agency&country=JP&limit=10"

No key required and no rate limit on this endpoint. A key is needed for /sites/:site_id, /extract-essence and /submissions, and raises the limit on /search.

Response

{
  "sites": [
    {
      "site_id": "example-agency",
      "site_name": "Example Agency",
      "url": "https://example-agency.com/",
      "category": "agency",
      "country": "JP",
      "region": "east-asia"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 42,
    "total_pages": 5
  }
}

GET /sites/:site_id

Retrieve the full design analysis for a single site. Includes sections, components, CSS values, and principle references. AI-only fields (mood, user_might_say, etc.) are stripped. Requires an API key and costs 1 credit (same as MCP get_site). Charged responses include X-Credits-Free-Remaining / X-Credits-Paid-Remaining headers.

Example

curl "https://api.allgoodinsp.com/v1/sites/stripe-com" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "meta": {
    "site_id": "stripe-com",
    "site_name": "Stripe",
    "url": "https://stripe.com/",
    "category": "software-saas",
    "country": "US",
    "region": "north-america"
  },
  "convention_breaks": [...],
  "sections": [
    {
      "section": "hero",
      "role": "...",
      "dominant_decision": "...",
      "components": [
        {
          "target": "Hero Headline",
          "principle_refs": ["typo_002", "layout_003"],
          "what": "...",
          "css": "...",
          "why": "..."
        }
      ]
    }
  ]
}

GET /search

Semantic search across all sites. Matches against mood, purpose, and design descriptions using vector embeddings.

q Required. Search query (e.g. minimal editorial typography)
limit Max results, 1–30 (default: 20)

Example

curl "https://api.allgoodinsp.com/v1/search?q=bold+typography+dark+theme&limit=5" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "query": "bold typography dark theme",
  "sites": [
    {
      "site_id": "example-site",
      "site_name": "Example Site",
      "url": "https://example-site.com/",
      "category": "portfolio",
      "country": "US",
      "region": "north-america"
    }
  ],
  "total": 5,
  "next_step": {
    "description": "Synthesize 2-5 of these references into a ready-to-save DESIGN.md...",
    "endpoint": "POST /v1/extract-essence",
    "example_body": { "site_ids": ["<site_id>", "<site_id>", "<site_id>"], "brief": "<your design goal>" },
    "cost_credits": 5
  }
}

POST /extract-essence

The primary synthesis endpoint. Combines 2-5 references into a ready-to-save DESIGN.md: YAML design tokens, CSS custom properties, color palette, typography scale, spacing system, motion notes, section structure, and binding do's-and-don'ts. Save the returned brief as DESIGN.md at your project root and reference it from CLAUDE.md/AGENTS.md so it loads on every generation. Requires an API key. Costs 5 credits — only charged when synthesis succeeds (invalid input and unknown site_ids are free).

site_ids Required. Array of 2-5 site IDs (from /search results)
brief Required. Design goal, min 10 characters (e.g. SaaS landing page, confident and minimal)
aspect_overrides Optional. Map of color / typography / layout / sections to a site_id, to pin which reference owns each aspect
reference_intents Optional. Array of { site_id, take, leave? } — what to adopt or avoid per reference

Example

curl -X POST "https://api.allgoodinsp.com/v1/extract-essence" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "site_ids": ["example-site", "another-site", "third-site"],
    "brief": "SaaS landing page for a developer tool, confident and minimal"
  }'

Response

{
  "site_ids": ["example-site", "another-site", "third-site"],
  "format": "design-md",
  "filename_hint": "DESIGN.md",
  "brief": "---\nname: ...\ncolors: ...\n---\n\n# Design System\n\n**Goal**: SaaS landing page...\n\n## CSS Custom Properties\n...",
  "credits": { "free_remaining": 70, "paid_remaining": 0 }
}

Unknown site_ids return 404 with suggested alternatives matching your brief. Insufficient credits return 402.

GET /taxonomy

Get all categories, countries, and regions with site counts. Useful for building filter UIs.

Example

curl "https://api.allgoodinsp.com/v1/taxonomy" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "categories": [
    { "category": "agency", "count": 120 },
    { "category": "software-saas", "count": 95 }
  ],
  "countries": [
    { "country": "JP", "count": 380 },
    { "country": "US", "count": 170 }
  ],
  "regions": [
    { "region": "east-asia", "count": 385 },
    { "region": "north-america", "count": 172 }
  ]
}

GET /screenshots/:site_id

Retrieve a screenshot of the site as a WebP image.

size full for the full viewport screenshot (default: thumbnail)

Example

curl "https://api.allgoodinsp.com/v1/screenshots/stripe-com?size=full" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o screenshot.webp

Returns image/webp with a 24-hour cache header. Returns 404 if no screenshot is available.

POST /submissions

Submit a site URL for review. Submissions enter a moderation queue and are not published immediately. Rate limited to 5 requests per hour.

Request body

url Required. The site URL (must be http or https)
siteName Optional site name (max 200 characters)
description Optional description or notes (max 2000 characters)

Example

curl -X POST "https://api.allgoodinsp.com/v1/submissions" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com", "siteName": "Example Site"}'

Response

{
  "id": "a1b2c3d4-...",
  "status": "pending"
}

Returns 409 if the URL already exists in the collection or is already pending review.

POST /api-keys

Create a new API key. Requires authentication. Maximum 5 active keys per user.

Request body

name Required. A label for the key (max 100 characters, e.g. "Production", "Testing")

Example

curl -X POST "https://api.allgoodinsp.com/v1/api-keys" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Production"}'

Response

{
  "id": "a1b2c3d4-...",
  "key": "agi_...",
  "keyPrefix": "agi_abcd",
  "name": "Production",
  "createdAt": "2026-03-26T00:00:00.000Z"
}

The key field contains the full API key and is shown only once. Store it securely. All keys start with agi_; keys created on the account page before 2026-08-24 start with allgoodinsp_ and keep working. Both prefixes work on every endpoint and on MCP.

GET /api-keys

List all API keys for the authenticated user. Full keys are never returned — only the prefix for identification.

Example

curl "https://api.allgoodinsp.com/v1/api-keys" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "keys": [
    {
      "id": "a1b2c3d4-...",
      "keyPrefix": "agi_abcd",
      "name": "Production",
      "createdAt": "2026-03-26T00:00:00.000Z",
      "lastUsedAt": "2026-03-26T12:00:00.000Z",
      "revokedAt": null
    }
  ]
}

DELETE /api-keys/:id

Revoke an API key. The key becomes immediately unusable. This cannot be undone.

Example

curl -X DELETE "https://api.allgoodinsp.com/v1/api-keys/a1b2c3d4-..." \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{ "revoked": true }

Errors

All errors return JSON with an error field:

{ "error": "Site not found" }
400 Bad request (missing or invalid parameters)
401 Invalid or expired API key, or authentication required (submissions, extract-essence)
402 Insufficient credits — response includes a credits object with remaining balances. Register a payment method or wait for the monthly reset.
429 Rate limit exceeded — retry after the window resets (see rate-limit headers)
404 Resource not found
405 Method not allowed
409 Duplicate resource (URL already exists or pending)

Rate limits

Limits depend on whether you include an API key:

Authenticated 10/min + 50/day general, 5/min + 25/day search, 3/min + 30/day extract-essence, 5/hour + 3/day submissions
Unauthenticated 5/hour + 10/day general, 3/hour + 5/day search (IP-based)

Rate limit status is returned in response headers:

X-RateLimit-Limit Maximum requests allowed in the window
X-RateLimit-Remaining Requests remaining in the current window
X-RateLimit-Reset Seconds until the window resets

When the limit is exceeded, the API returns 429 Too Many Requests with a Retry-After header.

Usage & Pricing

Every account gets 75 free credits per month, which resets on the 1st. To go beyond the free tier, either buy a credit pack (1,000 credits for $10, never expires) or register a payment method for overage billing at $0.01 per credit at the end of each month — both from your billing page.

Credit costs per operation:

POST /extract-essence (MCP: extract_essence) 5 credits
GET /search (MCP: search_sites / search_by_component) 2 credits
MCP only: get_site / get_principles / get_patterns 1 credit
Guides (methodology, workflow, reference guide) Free

A typical design task (search + extract + reference lookups) uses around 15-25 credits including revisions. The free tier covers 3-5 site builds per month. Check your balance and usage history on the billing page.