Acclaira API Reference
The Acclaira API provides a powerful, multi-modal backend for generating viral social media posts, 350-word SEO WordPress articles, and Urdu voice-over video scripts. It is organized around standard RESTful HTTP principles, accepts JSON-encoded request bodies, returns standard JSON responses, and supports Bearer & X-API-Key token authentication with full Cross-Origin Resource Sharing (CORS).
Base URL
https://acclaira.com/api/v1
CORS Support
Enabled (Any Origin / Domain)
Response Format
application/json
Authentication
Authenticate all API requests by including your secret API key in the request headers. You can pass the key either as a standard Authorization: Bearer <API_KEY> header or via the x-api-key header.
Authorization: Bearer acc_live_YOUR_API_KEY
// Or alternatively:
x-api-key: acc_live_YOUR_API_KEY
Keep your API keys confidential
Your API key grants full access to consume credits and trigger content publishing on your account. Never commit it to public GitHub repositories.
CORS & Custom Frontends
All Acclaira /api/* and /api/v1/* endpoints have automatic Cross-Origin Resource Sharing (CORS) preflight support enabled.
You can call this API directly from any client-side JavaScript environment (React, Next.js, Vue, Svelte, Vite, Angular, React Native, Flutter, Electron, or mobile apps) without needing a proxy server.
Credit Rates & HTTP Status Codes
Credit Cost Per Call
- Module 1 · Social Post1 Credit
- Module 2 · SEO News Article2 Credits
- Module 3 · Urdu Video Script3 Credits
- Publishing (WP / Meta)0 Credits (Free)
- RSS News Fetch & Account APIs0 Credits (Free)
Standard HTTP Status Codes
- 200 OKSuccessful execution
- 201 CreatedResource created
- 400 Bad RequestMissing required parameters
- 401 UnauthorizedMissing or invalid API key
- 402 Payment RequiredInsufficient credit balance
- 500 / 502 ErrorUpstream provider or network error
Generate Social Media Post (Module 1)
Generates an engaging, viral social media caption crafted in Roman Urdu and English mix, 8-10 trending hashtags, and SEO keywords for any news headline.
Request Parameters (JSON Body)
| Field | Type | Requirement | Description |
|---|---|---|---|
| headline | string | required | The breaking news headline or update text. |
| language | string | optional · default: "mixed" | Optionally specify "mixed" (Roman Urdu + English), "urdu" (Nastaliq), or "english". |
curl -X POST "https://acclaira.com/api/v1/generate/caption" \
-H "Authorization: Bearer acc_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"headline": "Pakistan IT exports reach record high in 2026", "language": "mixed"}'{
"success": true,
"headline": "Pakistan IT exports reach record high in 2026",
"caption": "🚀 Big News for Pakistan! 🇵🇰 Humaray IT sector ne 2026 mein history create kardi hai! Pakistan ki IT exports ab tak ke record high par pohanch chuki hain...\n\nFreelancers aur tech startups ki continuous mehnat rang le aayi hai. Kya aapko lagta hai ke Pakistan region ka next biggest tech hub ban sakta hai? Apni raye comments mein zaroor share karein! 👇",
"hashtags": "#PakistanTech #ITExports #DigitalPakistan #TechNews #FreelancersPakistan",
"keywords": "Pakistan IT exports, record IT exports 2026, Pakistan tech industry, Digital Pakistan",
"cost": 1,
"remaining": 14
}Generate SEO News Article (Module 2)
Generates a full 350-word SEO news article in publication-ready English with headline, readable paragraphs, bulleted takeaways, and a 150-character search meta description.
Request Parameters (JSON Body)
| Field | Type | Requirement | Description |
|---|---|---|---|
| topic | string | required | The news topic, headline, or summary source to write about. |
curl -X POST "https://acclaira.com/api/v1/generate/article" \
-H "Authorization: Bearer acc_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"topic": "State Bank of Pakistan announces new monetary policy"}'{
"success": true,
"topic": "State Bank of Pakistan announces new monetary policy",
"title": "State Bank of Pakistan Unveils Landmark Monetary Policy Update",
"article": "In a pivotal economic briefing today, the State Bank of Pakistan announced key updates to its monetary policy framework, aiming to balance inflation targets while fostering sustained industrial growth...\n\nKey takeaways:\n• Strategic policy adjustment to stimulate economic momentum\n• Enhanced credit accessibility for small and medium enterprises\n• Stability measures targeted for foreign exchange markets",
"full_text": "State Bank of Pakistan Unveils Landmark Monetary Policy Update...",
"meta": "State Bank of Pakistan announces key updates to its monetary policy framework to foster industrial growth and maintain currency stability.",
"cost": 2,
"remaining": 12
}Generate Urdu Video Script (Module 3)
Generates a viral 60-second video script in fluent Urdu (Nastaliq script) tailored for short-form video (TikTok, Instagram Reels, YouTube Shorts).
Request Parameters (JSON Body)
| Field | Type | Requirement | Description |
|---|---|---|---|
| topic | string | required | The news topic or headline to create an Urdu script for. |
curl -X POST "https://acclaira.com/api/v1/generate/urdu-script" \
-H "Authorization: Bearer acc_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"topic": "Petrol prices reduced tonight across Pakistan"}'{
"success": true,
"topic": "Petrol prices reduced tonight across Pakistan",
"script": "ناظرین، اس وقت کی بڑی خبر... حکومت نے پیٹرولیم مصنوعات کی قیمتوں میں بڑی کمی کا اعلان کر دیا ہے۔ عوام کے لیے ریلیف کا یہ فیصلہ آج رات بارہ بجے سے نافذ العمل ہوگا۔ آپ کی اس بارے میں کیا رائے ہے؟ کمنٹس میں بتائیے۔",
"language": "ur",
"cost": 3,
"remaining": 9
}Publish Article to WordPress
Publishes an article directly to your connected WordPress site using WordPress REST API and Application Passwords. Optionally uploads and sets a feature image.
Request Parameters (JSON Body)
| Field | Type | Requirement | Description |
|---|---|---|---|
| title | string | required | Title of the WordPress post. |
| content | string | required | HTML or plain text body of the article. |
| imageBase64 | string | optional | Base64 encoded PNG or JPEG image data for featured media. |
| status | string | optional · default: "publish" | "publish" or "draft". |
curl -X POST "https://acclaira.com/api/v1/publish/wordpress" \
-H "Authorization: Bearer acc_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title": "Economic Growth Accelerates in Q3", "content": "Full story details...", "status": "publish"}'{
"success": true,
"post_id": 1420,
"link": "https://yoursite.com/economic-growth-accelerates-in-q3/",
"status": "publish",
"title": "Economic Growth Accelerates in Q3"
}Publish Post to Facebook / Instagram
Publishes an image post and caption directly to your connected Meta Facebook Page and creates an optional automated first comment.
Request Parameters (JSON Body)
| Field | Type | Requirement | Description |
|---|---|---|---|
| caption | string | required | The post copy and hashtags. |
| imageBase64 | string | required | Base64 encoded PNG or JPEG image data. |
| firstComment | string | optional | Optional URL or comment to automatically post as the first comment. |
curl -X POST "https://acclaira.com/api/v1/publish/meta" \
-H "Authorization: Bearer acc_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"caption": "Breaking news update 🔥 #Breaking", "imageBase64": "data:image/png;base64,iVBORw..."}'{
"success": true,
"post_id": "104928374928172_93849182739182",
"url": "https://facebook.com/104928374928172_93849182739182"
}Fetch Live News Headlines
Fetches and parses real-time news headlines from your configured RSS sources or an ad-hoc feed URL.
Request Parameters (JSON Body)
| Field | Type | Requirement | Description |
|---|---|---|---|
| url | string | optional | Optional specific RSS feed URL to parse on the fly. |
curl -X GET "https://acclaira.com/api/v1/sources/fetch" \ -H "Authorization: Bearer acc_live_YOUR_API_KEY" \ -H "Accept: application/json"
{
"count": 3,
"items": [
{
"title": "Pakistan tech exports increase by 28% in latest quarterly review",
"link": "https://example-news.com/tech-exports-surge",
"pubDate": "Mon, 17 Aug 2026 21:00:00 GMT",
"description": "The Ministry of IT reports steady acceleration across freelance and corporate sectors.",
"sourceUrl": "https://example-news.com/feed.xml"
}
]
}Account Profile & Quota Balance
Returns authenticated account info, remaining credit balance, active subscription plan, per-module credit costs, and channel connection statuses.
curl -X GET "https://acclaira.com/api/v1/me" \ -H "Authorization: Bearer acc_live_YOUR_API_KEY" \ -H "Accept: application/json"
{
"user": {
"id": 1,
"email": "user@domain.com",
"name": "Alex",
"role": "user",
"plan": "pro",
"credits": 250,
"status": "active"
},
"costs": {
"caption_post": 1,
"article": 2,
"urdu_video": 3
},
"integrations": {
"wordpress": {
"configured": true,
"live": true,
"url": "https://yoursite.com"
},
"meta": {
"configured": true,
"live": true,
"page_id": "104928374928172"
},
"ai_engine": {
"configured": true
}
},
"auth": {
"type": "api_key",
"key_name": "My Custom Frontend"
}
}API Health Check
Returns service availability, active API version, server timestamp, and an index of all available endpoints.
curl -X GET "https://acclaira.com/api/v1/health"
{
"status": "healthy",
"version": "v1",
"service": "Acclaira REST API",
"timestamp": "2026-08-18T00:00:00.000Z",
"endpoints": {
"auth_check": "GET /api/v1/me",
"generate_caption": "POST /api/v1/generate/caption",
"generate_article": "POST /api/v1/generate/article",
"generate_urdu_script": "POST /api/v1/generate/urdu-script",
"publish_wordpress": "POST /api/v1/publish/wordpress",
"publish_meta": "POST /api/v1/publish/meta",
"sources_fetch": "GET /api/v1/sources/fetch",
"docs": "GET /api/v1/docs"
}
}