Generate AI-powered articles, run SEO analyses, and create content plans — all from your own code.
All API requests require a Bearer token in the Authorization header.
Generate your API key from Settings → Public API Key in the Katteb dashboard.
# Include in every request Authorization: Bearer YOUR_API_KEY Content-Type: application/json
402 error before any resources are consumed.
The API mirrors the same behavior as the Katteb dashboard — you can only run one heavy operation at a time.
These use job-based concurrency gating — the same rules as the dashboard:
| Rule | Behavior |
|---|---|
| Articles | Cannot submit a new article while one is being generated. Wait for completion or 10 min timeout. |
| SEO Analysis | Cannot submit a new analysis while one is in progress. Wait for completion or 5 min timeout. |
| Daily Cap | 50 heavy operations per day (Pro). Higher tiers get multiplied limits. |
active_job_id and active_job_type so you can poll the active job's status instead of waiting blindly.
Lightweight endpoints use standard sliding-window rate limiting:
Response Headers
# Heavy operations X-RateLimit-Limit-Day: 50 X-RateLimit-Remaining-Day: 47 X-Credits-Remaining: 25000 # Read operations X-RateLimit-Limit-Minute: 30 X-RateLimit-Remaining-Minute: 28 X-RateLimit-Limit-Hour: 300 X-RateLimit-Remaining-Hour: 295
When blocked, you receive a 429 with a Retry-After header and the active job details:
{
"success": false,
"error": "You have an article being generated (Job #4521, status: processing)...",
"retry_after": 180,
"active_job_id": 4521,
"active_job_type": "article"
}
All endpoints use the query parameter ?endpoint= to specify the operation.
Queue an article for background generation. Returns a job ID for polling. Credits deducted immediately.
curl -X POST "https://app.katteb.com/api/v2/?endpoint=articles/generate" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"topic": "Best AI Writing Tools in 2026",
"language": "English",
"country": "us",
"word_count": 1500,
"enhancements": ["featured_image", "tldr"]
}'
{
"success": true,
"job_id": 4521,
"topic": "Best AI Writing Tools in 2026",
"credits_charged": 2005,
"estimated_time": "2-5 minutes",
"status": "pending",
"poll_url": "?endpoint=articles/get&id=4521"
}
Poll this endpoint to check article generation progress. Content is returned when status is "completed".
curl "https://app.katteb.com/api/v2/?endpoint=articles/get&id=4521" \ -H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"job_id": 4521,
"topic": "Best AI Writing Tools in 2026",
"status": "completed",
"progress": 100,
"content_html": "<h1>Best AI Writing Tools...</h1><p>...</p>",
"featured_image": "https://...",
"meta_title": "Best AI Writing Tools in 2026",
"meta_description": "Discover the top AI writing...",
"word_count": 1523
}
pending | Queued, waiting for worker |
processing | Being generated (check progress %) |
completed | Done — full content available |
failed | Generation failed — see error_detail |
cancelled | Cancelled by user |
curl "https://app.katteb.com/api/v2/?endpoint=articles/list&page=1&limit=10&status=completed" \ -H "Authorization: Bearer YOUR_API_KEY"
Cancel a pending or scheduled article. Credits are automatically refunded.
curl -X DELETE "https://app.katteb.com/api/v2/?endpoint=articles/cancel&id=4521" \ -H "Authorization: Bearer YOUR_API_KEY"
Submit a URL or raw text for AI-powered SEO analysis. Returns a job ID for polling.
curl -X POST "https://app.katteb.com/api/v2/?endpoint=seo/analyze" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "url",
"value": "https://example.com/blog-post",
"keyword": "ai writing tools"
}'
{
"success": true,
"job_id": 4522,
"keyword": "ai writing tools",
"credits_charged": 1000,
"estimated_time": "1-3 minutes",
"status": "pending",
"poll_url": "?endpoint=seo/get&id=4522"
}
curl "https://app.katteb.com/api/v2/?endpoint=seo/get&id=4522" \ -H "Authorization: Bearer YOUR_API_KEY"
curl "https://app.katteb.com/api/v2/?endpoint=account/credits" \ -H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"credits": 25000,
"credits_total": 50000,
"plan_type": "pro",
"plan_tier": "pro",
"api_usage_today": { "heavy": 3, "read": 12 }
}
curl "https://app.katteb.com/api/v2/?endpoint=account/limits" \ -H "Authorization: Bearer YOUR_API_KEY"
Get all your writing styles with their IDs. Use the id as writing_style_id in articles/generate.
Writing styles are created in the Katteb dashboard under Writer → Writing Style. Each style defines tone, formatting rules, and example text that the AI follows.
curl "https://app.katteb.com/api/v2/?endpoint=styles/list" \ -H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"styles": [
{
"id": 42,
"name": "Conversational Blog",
"description": "Friendly, engaging tone with short paragraphs",
"is_active": true,
"created_at": "2026-03-15 10:30:00"
},
{
"id": 38,
"name": "Technical Documentation",
"description": "Formal, precise language with code examples",
"is_active": false,
"created_at": "2026-02-20 14:15:00"
}
],
"count": 2,
"hint": "Use the 'id' value as 'writing_style_id' in articles/generate."
}
styles/list to get your style IDs, then pass the desired id as writing_style_id when generating articles.
Get all your brands/workspaces with their IDs. Use the id as brand_id in articles/generate or seo/analyze.
curl "https://app.katteb.com/api/v2/?endpoint=brands/list" \ -H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"brands": [
{
"id": 15,
"name": "My Tech Blog",
"url": "https://mytechblog.com",
"created_at": "2026-01-10 08:00:00"
}
],
"count": 1,
"hint": "Use the 'id' value as 'brand_id' in articles/generate or seo/analyze."
}
Credits are deducted at the time of job creation. Cancelled jobs are refunded. Costs are loaded live from the system and always up to date.
| Operation | Credit Cost | Notes |
|---|---|---|
| Article Generation | 1,500 | Base cost per article |
| SEO Analysis | 1,000 | Includes competitor analysis + recommendations |
| Status Check / List | 0 | Free — poll as needed |
| Credit Balance / Limits | 0 | Free |
Each enhancement adds to the base article cost when included in the enhancements array.
| Enhancement | Key | Credit Cost |
|---|---|---|
| TL;DR Summary | tldr | 5 |
| Featured Image | featured_image | 500 |
| Internal Links | internal_links | 100 |
| FAQ Section | faq | 5 |
| Key Takeaways | key_takeaways | 5 |
| Video Embed | video_embed | 10 |
| Quotes | quotes | 10 |
| Patent Analysis | patent | 15 |
featured_image + tldr costs 1,500 + 500 + 5 = 2,005 credits.
Use ISO 3166-1 alpha-2 codes for the country parameter (Google's gl geo-location parameter) and language names or codes for language.
170+ supported countries. Use the 2-letter code in your API requests.
| Code | Country |
|---|---|
us | 🇺🇸 United States |
gb | 🇬🇧 United Kingdom |
ca | 🇨🇦 Canada |
au | 🇦🇺 Australia |
de | 🇩🇪 Germany |
fr | 🇫🇷 France |
es | 🇪🇸 Spain |
it | 🇮🇹 Italy |
nl | 🇳🇱 Netherlands |
br | 🇧🇷 Brazil |
in | 🇮🇳 India |
jp | 🇯🇵 Japan |
ae | 🇦🇪 United Arab Emirates |
sa | 🇸🇦 Saudi Arabia |
eg | 🇪🇬 Egypt |
tr | 🇹🇷 Turkey |
kr | 🇰🇷 South Korea |
mx | 🇲🇽 Mexico |
ar | 🇦🇷 Argentina |
co | 🇨🇴 Colombia |
za | 🇿🇦 South Africa |
ng | 🇳🇬 Nigeria |
ke | 🇰🇪 Kenya |
se | 🇸🇪 Sweden |
no | 🇳🇴 Norway |
dk | 🇩🇰 Denmark |
fi | 🇫🇮 Finland |
pl | 🇵🇱 Poland |
at | 🇦🇹 Austria |
ch | 🇨🇭 Switzerland |
be | 🇧🇪 Belgium |
pt | 🇵🇹 Portugal |
ie | 🇮🇪 Ireland |
nz | 🇳🇿 New Zealand |
sg | 🇸🇬 Singapore |
my | 🇲🇾 Malaysia |
ph | 🇵🇭 Philippines |
id | 🇮🇩 Indonesia |
th | 🇹🇭 Thailand |
vn | 🇻🇳 Vietnam |
pk | 🇵🇰 Pakistan |
bd | 🇧🇩 Bangladesh |
il | 🇮🇱 Israel |
jo | 🇯🇴 Jordan |
lb | 🇱🇧 Lebanon |
kw | 🇰🇼 Kuwait |
qa | 🇶🇦 Qatar |
bh | 🇧🇭 Bahrain |
om | 🇴🇲 Oman |
ma | 🇲🇦 Morocco |
tn | 🇹🇳 Tunisia |
dz | 🇩🇿 Algeria |
iq | 🇮🇶 Iraq |
ru | 🇷🇺 Russia |
ua | 🇺🇦 Ukraine |
ro | 🇷🇴 Romania |
cz | 🇨🇿 Czech Republic |
hu | 🇭🇺 Hungary |
gr | 🇬🇷 Greece |
bg | 🇧🇬 Bulgaria |
rs | 🇷🇸 Serbia |
hr | 🇭🇷 Croatia |
cl | 🇨🇱 Chile |
pe | 🇵🇪 Peru |
hk | 🇭🇰 Hong Kong |
tw | 🇹🇼 Taiwan |
cn | 🇨🇳 China |
For articles/generate, use the full language name (e.g. "English").
| Code | Name | Native |
|---|---|---|
en | English | English |
ar | Arabic | العربية |
zh | Chinese (Simplified) | 简体中文 |
zh_TW | Chinese (Traditional) | 繁體中文 |
es | Spanish | Español |
hi | Hindi | हिन्दी |
pt | Portuguese | Português |
ru | Russian | Русский |
ja | Japanese | 日本語 |
de | German | Deutsch |
fr | French | Français |
ko | Korean | 한국어 |
tr | Turkish | Türkçe |
it | Italian | Italiano |
nl | Dutch | Nederlands |
vi | Vietnamese | Tiếng Việt |
pl | Polish | Polski |
uk | Ukrainian | Українська |
ro | Romanian | Română |
id | Indonesian | Bahasa Indonesia |
th | Thai | ไทย |
sv | Swedish | Svenska |
da | Danish | Dansk |
fi | Finnish | Suomi |
no | Norwegian | Norsk |
he | Hebrew | עברית |
fa | Persian | فارسی |
ur | Urdu | اردو |
bn | Bengali | বাংলা |
ta | Tamil | தமிழ் |
te | Telugu | తెలుగు |
mr | Marathi | मराठी |
gu | Gujarati | ગુજરાતી |
ms | Malay | Bahasa Melayu |
hu | Hungarian | Magyar |
el | Greek | Ελληνικά |
cs | Czech | Čeština |
bg | Bulgarian | Български |
hr | Croatian | Hrvatski |
sk | Slovak | Slovenčina |
sr | Serbian | Српски |
lt | Lithuanian | Lietuvių |
sl | Slovenian | Slovenščina |
et | Estonian | Eesti |
lv | Latvian | Latviešu |
ka | Georgian | ქართული |
az | Azerbaijani | Azərbaycan |
sw | Swahili | Kiswahili |
am | Amharic | አማርኛ |
ne | Nepali | नेपाली |
tl | Tagalog | Tagalog |
jv | Javanese | Basa Jawa |
yo | Yoruba | Yorùbá |
ig | Igbo | Igbo |
zu | Zulu | IsiZulu |
All errors return JSON with "success": false and an "error" message.
| Code | Meaning | Action |
|---|---|---|
| 400 | Bad Request | Check required parameters |
| 401 | Unauthorized | Check your API key |
| 402 | Insufficient Credits | Top up credits or upgrade plan |
| 403 | Forbidden | API requires a paid plan |
| 429 | Rate Limited | Wait for Retry-After seconds |
| 500 | Server Error | Retry after a moment |
{
"success": false,
"error": "Rate limit exceeded. You can make 1 request every 10 minutes.",
"retry_after": 420
}
Test API endpoints directly from your browser. Your API key is only sent to the Katteb API and never stored.
Send a request to see the response here