Read-only REST API — news, AI model catalog, intelligence ranking, tools and tutorials.
https://swen.ia.br/api/v1All endpoints work without a key at a low anonymous rate limit (10 requests/minute per IP), so you can try the API before requesting a key. For a higher limit (30 requests/minute), get a free key instantly below — no approval wait. Send it as a Bearer token:
Authorization: Bearer sk_swen_...Keys are scoped per resource (news, models, tools, tutorials).
Need a higher limit or a negotiated partnership? Contact contato@swen.ia.br.
| Method | Path | Description |
|---|---|---|
GET | /api/v1/news | List news articles (summary + canonical link, no full body). |
GET | /api/v1/news/{slug} | Single news article by slug. |
GET | /api/v1/models | AI model catalog: pricing, context window, speed. |
GET | /api/v1/models/{slug} | Single model by slug. |
GET | /api/v1/rankings/intelligence | Intelligence ranking — Artificial Analysis Intelligence Index, deduplicated by model family. Identical ordering to swen.ia.br/ranking and the iOS app. |
GET | /api/v1/tools | AI tools directory: pricing, ratings, categories. |
GET | /api/v1/tutorials | Tutorials and guides directory. |
curl https://swen.ia.br/api/v1/rankings/intelligence?limit=10 \
-H "Authorization: Bearer sk_swen_..."{
"data": [
{ "rank": 1, "slug": "anthropic-claude-fable-5", "name": "Claude Fable 5", "vendor": "Anthropic", "score": 59.9, "url": "https://swen.ia.br/benchmark/anthropic-claude-fable-5" },
{ "rank": 2, "slug": "openai-gpt-5-6-sol-max", "name": "GPT-5.6 Sol (max)", "vendor": "OpenAI", "score": 58.9, "url": "https://swen.ia.br/benchmark/openai-gpt-5-6-sol-max" }
],
"meta": { "count": 2, "source": "Artificial Analysis Intelligence Index", "updatedAt": "2026-07-17T14:30:00.000Z" }
}Instead of polling /api/v1/news or /api/v1/models, register a webhook and get an HTTP POST the moment something changes. Requires an API key with the matching scope.
curl -X POST https://swen.ia.br/api/v1/webhooks \
-H "Authorization: Bearer sk_swen_..." \
-H "Content-Type: application/json" \
-d '{"targetUrl": "https://your-site.com/webhooks/swen", "events": ["news.published"]}'Response includes a secret — shown only once, used to verify every delivery. Available events: news.published, model.new, model.updated.
Each delivery includes X-SWEN-Timestamp (unix seconds) and X-SWEN-Signature (sha256=<hex>). To verify: compute HMAC-SHA256 of `${timestamp}.${rawBody}` using your secret, compare to the signature, and reject if the timestamp is more than ~5 minutes old (prevents replay of an intercepted delivery).
{
"event": "news.published",
"data": {
"slug": "openai-lanca-gpt-5-6",
"title": "OpenAI lança GPT-5.6",
"summary": "...",
"category": "Modelos",
"publishedAt": "2026-07-22T22:00:00.000Z",
"updatedAt": "2026-07-22T22:00:00.000Z",
"source": "OpenAI",
"url": "https://swen.ia.br/noticia/openai-lanca-gpt-5-6",
"imageUrl": "https://swen.ia.br/...",
"isManchete": true,
"isBreakingNews": false,
"isCover": true,
"relevanceScore": 87,
"tone": 4,
"density": 3,
"language": "pt-BR",
"audioUrl": "https://swen.ia.br/audio/openai-lanca-gpt-5-6.mp3",
"entities": [
{ "name": "OpenAI", "type": "company" },
{ "name": "GPT-5.6", "type": "product" }
]
}
}model.updated also includes a changes array with only the fields that actually changed (price, version, status, context window, featured):
{
"event": "model.updated",
"data": {
"slug": "openai-gpt-5-6",
"name": "GPT-5.6",
"vendor": "OpenAI",
"inputPricePerMillionTokens": 5,
"tokensPerSecond": 120,
"timeToFirstTokenMs": 300,
"changes": [
{ "field": "inputPricePerMillionTokens", "before": 3, "after": 5 }
]
}
}If your endpoint doesn't respond with a 2xx, we retry automatically at 1 min, 5 min, and 30 min (X-SWEN-Retry header tells you the attempt number). If it still fails after 20 consecutive failed deliveries, the webhook is auto-disabled and we email the key owner — reactivate it with PATCH /api/v1/webhooks/{id} ({"active": true}).
Manage your webhooks with GET /api/v1/webhooks (list, no secret returned), PATCH /api/v1/webhooks/{id} (update targetUrl/events/filters/active without rotating the secret) and DELETE /api/v1/webhooks/{id}. Up to 10 active webhooks per key.
Test your endpoint anytime with POST /api/v1/webhooks/{id}/test — sends a sample payload (marked "test": true) right away, without waiting for a real event and without counting toward the auto-disable threshold.
By default a news.published webhook fires for every published article. Pass an optional filters object on creation to only get delivered the ones you care about — filtering happens on our side, so your endpoint never even receives the rest. Filters only apply to news.published (they have no effect on model.* events).
curl -X POST https://swen.ia.br/api/v1/webhooks \
-H "Authorization: Bearer sk_swen_..." \
-H "Content-Type: application/json" \
-d '{
"targetUrl": "https://your-site.com/webhooks/swen",
"events": ["news.published"],
"filters": { "onlyBreakingNews": true, "minRelevance": 80 }
}'| Filter | Type | Effect |
|---|---|---|
onlyBreakingNews | boolean | Only deliver when isBreakingNews is true. |
onlyManchete | boolean | Only deliver when isManchete is true. |
onlyCover | boolean | Only deliver when the article is currently on the homepage (isCover). |
minRelevance | number (0–100) | Only deliver when relevanceScore is at or above this value. |
All provided filters must match (AND) for a delivery to happen. Omit filters entirely to get everything.
Exceeding the limit returns 429 with a Retry-After header.
SWEN.AI runs a public Model Context Protocol server exposing the same 4 data sources as callable tools — for Claude, ChatGPT, Cursor and any MCP-compatible agent. No API key required (IP rate limited).
https://swen.ia.br/api/mcpAvailable tools: search_news, get_news_article, list_ai_models, get_model, get_intelligence_ranking, search_tools, list_tutorials.
Intelligence ranking data is sourced from Artificial Analysis. If you display this data publicly, please credit SWEN.AI and link back to swen.ia.br.
All field names are English and versioned under /v1. We will never silently rename or remove a field within v1 — breaking changes ship as /v2.