API Reference

For developers who want to integrate Summarizer programmatically.

Client Configuration API

GET /summarizer/api/client_config.php?client_id=YOUR_CLIENT_ID

Returns the client's theme settings and custom prompt.

{
  "custom_prompt": "Summarize in 2 bullet points",
  "theme": {
    "primary": "#7a1e1e",
    "secondary": "#c5a028",
    "font_family": "Inter",
    ...
  },
  "auto_regenerate": true
}

Generate Summary API

POST /summarizer/api/summarize.php

Request body:

{
  "client_id": "cli_xxx",
  "url": "https://example.com/article",
  "content": "Full article text...",
  "custom_prompt": "Optional override"
}

Response:

{ "summary": "AI generated summary...", "cached": false }

Rate Limits

  • Free plan: 80 summaries/month
  • Creator plan: 1,000 summaries/month
  • Pro plan: 5,000 summaries/month
  • Each unique URL generates one summary (cached thereafter)
  • Regenerating an existing summary also counts toward the quota

Error Codes

  • 403: Invalid or inactive client ID
  • 402: Free trial expired
  • 429: Monthly limit reached
  • 500: AI service unavailable or database error