API quick start
Mint a key, list a project, generate, poll. One wallet. An article is 1.5 credits. A social variant is 0.6 credits per platform.
01Mint a key
Open Developer settings. Copy the key once. Give it write if you will generate. Key creation is session-only.
02List a project
Generation needs a project_id. Projects are created in the app, not over the API.
curl https://www.brainpercent.app/api/v1/projects \
-H "Authorization: Bearer bp_your_key"03Generate an article
Returns 202. Costs 1.5 credits. Takes about ten to fifteen minutes. Poll poll_url until is_complete is true.
curl -X POST https://www.brainpercent.app/api/v1/articles/generate \
-H "Authorization: Bearer bp_your_key" \
-H "Content-Type: application/json" \
-d '{
"topic": "The week a brand ships from one URL",
"project_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"tone": "professional",
"word_count": 1200
}'202Queued
{
"success": true,
"data": {
"article_id": "550e8400-e29b-41d4-a716-446655440001",
"status": "queued",
"credits_deducted": 1,
"credits_remaining": 39,
"estimated_time": "10-15 minutes",
"poll_url": "/api/v1/articles/550e8400-e29b-41d4-a716-446655440001/status"
}
}04Generate social from a URL
One content_id covers every requested platform. Cost is 0.6 credits times the platform count.
curl -X POST https://www.brainpercent.app/api/v1/social/generate \
-H "Authorization: Bearer bp_your_key" \
-H "Content-Type: application/json" \
-d '{
"source_url": "https://www.brainpercent.app/blog",
"platforms": ["twitter", "linkedin"],
"source_type": "blog"
}'05Check the wallet
curl https://www.brainpercent.app/api/v1/user/credits \
-H "Authorization: Bearer bp_your_key"plan is the internal plan name (Creator, Professional, Business, Agency), not the pricing-page label.