Articles
Start a long-form SEO article for one of your projects, poll it, then read it. Starting one costs 1.5 credits from the wallet. Reading is free.
| Method | Path | Needs |
|---|---|---|
| GET | /api/v1/articles | read |
| GET | /api/v1/articles/{id} | read |
| POST | /api/v1/articles/generate | write. 1.5 credits. |
| GET | /api/v1/articles/{id}/status | read |
Status lifecycle
- generating
- processing
- completed
- cms or draft
| status | Meaning |
|---|---|
| generating | Accepted, waiting for the writer |
| processing | Being researched and written |
| completed | Written. The quality check then moves it to cms or draft. |
| cms | Finished and passed the quality check. This is the published-ready state; there is no "published". |
| draft | Finished but held for your review in the app (quality check not passed), or moved back to draft by you |
| needs_editing | Finished, flagged for edits |
| failed | Did not finish. The charge is refunded automatically. |
| archived | Archived in the app |
Filter values accepted by ?status=: generating, processing, completed, draft, queued, cms, needs_editing, failed, archived.
/api/v1/articlesYour articles across all projects, paginated. Bodies are left out; fetch one article for its content.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| page | integer | Optional | 1-based page Default 1. |
| limit | integer | Optional | 1 to 100 Default 20. |
| status | string | Optional | One of the statuses above |
| project_id | uuid | Optional | Only this project |
| search | string | Optional | Case-insensitive match on the title |
| sort | string | Optional | created_at, updated_at or title Default created_at. |
| order | string | Optional | asc or desc Default desc. |
curl "https://www.brainpercent.app/api/v1/articles?status=cms&limit=10" \
-H "Authorization: Bearer $BP_KEY"{
"success": true,
"data": [
{
"id": "ed234978-8cae-4f3c-83d2-ed57d9f5020b",
"title": "How to dial in a cold brew ratio at home",
"slug": "how-to-dial-in-a-cold-brew-ratio-at-home",
"status": "cms",
"meta_description": "The ratio, grind and steep time that make cold brew taste right.",
"created_at": "2026-10-28T21:02:33.793579+00:00",
"updated_at": "2026-10-28T21:15:12.270471+00:00",
"project_id": "1f8b4518-128d-4b2c-8b81-aa3939dbb7b5"
}
],
"pagination": {
"total": 1,
"page": 1,
"limit": 10,
"total_pages": 1,
"has_more": false
},
"meta": {
"timestamp": "2026-10-29T15:40:14.123Z"
}
}/api/v1/articles/:idOne article with its HTML body. Another account's article, or an unknown id, is a 404.
curl https://www.brainpercent.app/api/v1/articles/ed234978-8cae-4f3c-83d2-ed57d9f5020b \
-H "Authorization: Bearer $BP_KEY"{
"success": true,
"data": {
"id": "ed234978-8cae-4f3c-83d2-ed57d9f5020b",
"project_id": "1f8b4518-128d-4b2c-8b81-aa3939dbb7b5",
"title": "How to dial in a cold brew ratio at home",
"slug": "how-to-dial-in-a-cold-brew-ratio-at-home",
"status": "cms",
"content": "<h2>Start with 1:8</h2><p>β¦</p>",
"meta_description": "The ratio, grind and steep time that make cold brew taste right.",
"excerpt": "β¦",
"keywords": "cold brew ratio, cold brew at home",
"lang": "en",
"word_count": 1200,
"tone": "professional",
"generation_progress": 100,
"published_at": null,
"created_at": "2026-10-28T21:02:33.793579+00:00",
"updated_at": "2026-10-28T21:15:12.270471+00:00"
},
"meta": {
"timestamp": "2026-10-29T15:40:14.123Z"
}
}Fields returned, and only these: id, project_id, title, slug, status, content, meta_description, excerpt, keywords, lang, word_count, tone, generation_progress, published_at, created_at, updated_at. The article is written in the project's language (lang, from the project's business_language).
/api/v1/articles/generateStart an article and return at once with 202. Charges 1.5 credits from the wallet before the job is queued (accounts on an older article allowance are charged one article from it instead). Needs write. Writing takes about 10 to 15 minutes; poll poll_url. A job that fails is refunded.
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| topic | string | Required | The main keyword the article targets, 3 to 500 characters. The title is written for you. |
| project_id | uuid | Required | Your project. It supplies brand, audience and language. |
| keywords | string[] | Optional | Up to 20 extra keywords |
| tone | string | Optional | professional, casual, academic or conversational Default professional. |
| word_count | integer | Optional | 300 to 5000 Default 800. |
curl -X POST https://www.brainpercent.app/api/v1/articles/generate \
-H "Authorization: Bearer $BP_KEY" \
-H "Content-Type: application/json" \
-d '{
"topic": "cold brew ratio",
"project_id": "1f8b4518-128d-4b2c-8b81-aa3939dbb7b5",
"keywords": ["cold brew at home"],
"word_count": 1200
}'{
"success": true,
"data": {
"article_id": "ed234978-8cae-4f3c-83d2-ed57d9f5020b",
"status": "generating",
"job_id": "01JQ8Z3M4N5P6Q7R8S9T0U1V2W",
"slug": "cold-brew-ratio",
"language": "en",
"credits_deducted": 1.5,
"charged_to": "wallet",
"articles_remaining": 12,
"estimated_time": "10-15 minutes",
"poll_url": "/api/v1/articles/ed234978-8cae-4f3c-83d2-ed57d9f5020b/status"
},
"meta": {
"timestamp": "2026-10-29T15:40:14.123Z"
}
}| Field | Meaning |
|---|---|
| credits_deducted | Credits billed: 1.5 from the wallet, or 1 when charged_to is article_balance |
| charged_to | wallet, or article_balance for an account on the older article allowance |
| articles_remaining | How many more articles the same balance covers. For the wallet itself, call GET /user/credits. |
| poll_url | Relative path. Prefix it with https://www.brainpercent.app. |
| Status | Code | When |
|---|---|---|
| 400 | VALIDATION_ERROR | Missing project_id, topic under 3 characters, or a topic with no letters or digits |
| 402 | INSUFFICIENT_CREDITS | The balance cannot cover one article. Nothing was created. |
| 403 | FORBIDDEN | The key lacks write |
| 404 | NOT_FOUND | project_id is not one of your projects |
| 500 | INTERNAL_ERROR | The job could not be queued. The charge is returned. |
/api/v1/articles/:id/statusSmall, cheap poll target. Stop when is_complete or is_failed is true.
curl https://www.brainpercent.app/api/v1/articles/ed234978-8cae-4f3c-83d2-ed57d9f5020b/status \
-H "Authorization: Bearer $BP_KEY"{
"success": true,
"data": {
"article_id": "ed234978-8cae-4f3c-83d2-ed57d9f5020b",
"status": "cms",
"title": "How to dial in a cold brew ratio at home",
"slug": "how-to-dial-in-a-cold-brew-ratio-at-home",
"progress": 100,
"is_complete": true,
"is_failed": false,
"created_at": "2026-10-28T21:02:33.793579+00:00",
"updated_at": "2026-10-28T21:15:12.270471+00:00"
},
"meta": {
"timestamp": "2026-10-29T15:40:14.123Z"
}
}| Field | Meaning |
|---|---|
| is_complete | True once the job stopped running and did not fail (completed, cms, draft, needs_editing, archived) |
| is_failed | True when status is failed |
| progress | 0 to 100 while writing, or null |
A poll loop
- Your server to Brainpercent:
POST /api/v1/articles/generateA topic and a project_id. Needs write. - Brainpercent to Your server: 202 with
article_idandpoll_url1.5 credits are charged. Writing takes about 10 to 15 minutes. - Your server to Brainpercent:
GET /api/v1/articles/{id}/statusRepeat until is_complete or is_failed is true. - Brainpercent to Your server:
is_complete: trueIf is_failed is true instead, the charge is refunded. - Your server to Brainpercent:
GET /api/v1/articles/{id} - Brainpercent to Your server: The article with its HTML bodyReading is free.
ID=ed234978-8cae-4f3c-83d2-ed57d9f5020b
until curl -s https://www.brainpercent.app/api/v1/articles/$ID/status -H "Authorization: Bearer $BP_KEY" \
| grep -Eq '"is_(complete|failed)":true'; do
sleep 30
done{
"success": false,
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Insufficient article balance: need 1, have 0"
},
"meta": {
"timestamp": "2026-10-29T15:40:14.123Z"
}
}Publishing a finished article to your own website happens in the app (or through your site's webhook, see Webhooks and async jobs). There is no article publish route in the API.