Developer Documentation
CentralIntelAI API
Embed platform intelligence into any website, app, or product. Help your users understand how to get the most from your platform — automatically.
Overview
The CentralIntelAI API is an intelligence layer you embed into any platform. Given a URL and optional page content, it returns structured intelligence — guidance, risks, behavioral insights, and recommendations — tailored to the specific type of platform the user is on.
It is not a chatbot or Q&A system. It functions as an analyst engine that reads your platform context and generates decision-support intelligence for your users.
Ecommerce
Social Apps
SaaS
Marketplaces
The API is accessible via REST from any platform — web, Flutter, iOS, Android, or server-to-server. A drop-in JavaScript widget is also available for web deployments.
Quickstart
1. Create an account and generate an API key from your Billing page.
2. Make your first request:
curl -X POST https://www.centralintelai.com/api/v1/intelligence \
-H "Authorization: Bearer ciai_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"url": "https://amazon.com/dp/B09XYZ",
"title": "Sony WH-1000XM5 Headphones",
"content": "4.6 stars · 12,480 reviews · $279.99 · Ships in 2 days..."
}'3. You'll receive structured intelligence immediately:
{
"platform_type": "ecommerce",
"summary": "Amazon product page for premium headphones in a competitive category with strong social proof signals.",
"guidance": [
{
"title": "Price history indicates a pending discount",
"detail": "This SKU drops 15-20% during Prime Day and major sale events. Current price of $279.99 is near its 90-day high.",
"priority": "high"
}
],
"risks": [
{
"title": "Review recency skew",
"detail": "12k+ reviews but 40% clustered in 2022 launch window. Recent reviews trend lower. Verify current hardware revision.",
"severity": "medium"
}
],
"insights": [...],
"recommendations": [...],
"generated_at": "2026-06-05T20:00:00.000Z"
}Authentication
All requests must include your API key via one of two methods:
Authorization header (recommended):
Authorization: Bearer ciai_live_your_key_hereX-Api-Key header:
X-Api-Key: ciai_live_your_key_hereAPI keys are prefixed with ciai_live_. Keep your key secret — do not expose it in client-side code for production apps. For the web widget, keys are intentionally embedded client-side and are rate-limited per key.
Web Widget
The easiest integration for any website. Add one script tag — the widget renders a floating intelligence button that users can invoke on any page.
<script
src="https://www.centralintelai.com/widget.js"
data-api-key="ciai_live_your_key_here"
data-theme="light"
data-position="bottom-right"
async
></script>Configuration attributes
data-api-keystringrequiredYour CentralIntelAI API key.
data-theme'light' | 'dark' | 'auto'Widget color theme. auto follows the user's system preference. Default: light.
data-position'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'Position of the floating button. Default: bottom-right.
data-api-basestringOverride the API base URL (for self-hosted or proxy deployments). Default: https://www.centralintelai.com.
The widget automatically collects the page URL, title, meta description, and visible text content — no additional configuration needed.
Flutter SDK
Use the http package to call the API directly. Add to your pubspec.yaml:
dependencies:
http: ^1.2.0Then call the intelligence endpoint:
import 'dart:convert';
import 'package:http/http.dart' as http;
Future<Map<String, dynamic>> fetchIntelligence({
required String url,
String? title,
String? content,
}) async {
final response = await http.post(
Uri.parse('https://www.centralintelai.com/api/v1/intelligence'),
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ciai_live_your_key_here',
},
body: jsonEncode({
'url': url,
if (title != null) 'title': title,
if (content != null) 'content': content,
}),
);
if (response.statusCode == 200) {
return jsonDecode(response.body) as Map<String, dynamic>;
} else {
throw Exception('Intelligence request failed: ${response.body}');
}
}Example usage in a widget:
// In your StatefulWidget or with a FutureBuilder:
final intelligence = await fetchIntelligence(
url: 'https://yourapp.com/product/123',
title: 'Product Detail Page',
content: currentPageText, // optional visible text
);
// Access structured data:
final guidance = intelligence['guidance'] as List;
final risks = intelligence['risks'] as List;
final recommendations = intelligence['recommendations'] as List;iOS SDK
Use URLSession — no external dependencies required.
import Foundation
struct IntelligenceRequest: Codable {
let url: String
var title: String?
var content: String?
var platformType: String?
enum CodingKeys: String, CodingKey {
case url, title, content
case platformType = "platform_type"
}
}
func fetchIntelligence(
request: IntelligenceRequest,
completion: @escaping (Result<[String: Any], Error>) -> Void
) {
guard let endpoint = URL(string: "https://www.centralintelai.com/api/v1/intelligence") else { return }
var urlRequest = URLRequest(url: endpoint)
urlRequest.httpMethod = "POST"
urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type")
urlRequest.setValue("Bearer ciai_live_your_key_here", forHTTPHeaderField: "Authorization")
urlRequest.httpBody = try? JSONEncoder().encode(request)
URLSession.shared.dataTask(with: urlRequest) { data, response, error in
if let error = error { completion(.failure(error)); return }
guard let data = data,
let json = try? JSONSerialization.jsonObject(with: data) as? [String: Any]
else { completion(.failure(URLError(.badServerResponse))); return }
completion(.success(json))
}.resume()
}Usage with Swift concurrency (iOS 15+):
// Using async/await
func loadIntelligence() async throws -> [String: Any] {
let request = IntelligenceRequest(
url: "https://yourapp.com/current-screen",
title: "Current screen title"
)
return try await withCheckedThrowingContinuation { continuation in
fetchIntelligence(request: request) { result in
continuation.resume(with: result)
}
}
}API Reference
/api/v1/intelligenceGenerate platform intelligence for a given URL and context.
Request Body
urlstringrequiredThe full URL of the page or screen to analyze.
titlestringPage or screen title. Improves accuracy.
descriptionstringMeta description or short summary of the page.
contentstringVisible text content of the page (up to 4,000 characters). More context = better intelligence.
platform_typestringHint the platform type: ecommerce, social, saas, content, forum, marketplace, other. If omitted, the API auto-detects.
user_contextstringOptional context about what the user is trying to accomplish. Sharpens recommendations.
Response Headers
X-Request-Latency-MsnumberTime in milliseconds the intelligence generation took.
X-PlanstringYour current plan identifier.
Error Codes
400Bad RequestMissing required field or malformed JSON.
401UnauthorizedMissing or invalid API key.
403ForbiddenAPI key revoked or account suspended.
429Too Many RequestsMonthly request limit reached for your plan.
500Server ErrorIntelligence generation failed. Retry the request.
Response Schema
{
"platform_type": "ecommerce | social | saas | content | forum | marketplace | other",
"summary": "string — 1-2 sentence intelligence overview",
"guidance": [
{
"title": "string",
"detail": "string — tactical guidance specific to this platform",
"priority": "high | medium | low"
}
],
"risks": [
{
"title": "string",
"detail": "string — risk explanation and mitigation",
"severity": "high | medium | low"
}
],
"insights": [
{
"title": "string",
"detail": "string — behavioral or strategic insight"
}
],
"recommendations": [
{
"action": "string — specific action to take",
"rationale": "string — why this matters now"
}
],
"generated_at": "ISO 8601 timestamp"
}guidance contains 3–5 items ordered high to low priority. risks contains 0–3 items (omitted if none detected). insights contains 2–4 items. recommendations contains 2–3 immediately actionable items.
Platform Types
The API auto-detects platform type from the URL and content. You can override with the platform_type field.
ecommerceProduct pages, carts, checkouts. Intelligence covers pricing patterns, review quality, seller risk, return policies.
socialSocial feeds, profiles, posts. Intelligence covers algorithm behavior, content strategies, engagement patterns, shadowban risks.
saasApp dashboards, feature pages. Intelligence covers hidden capabilities, integration opportunities, tier traps, workflow optimizations.
contentArticles, blogs, media. Intelligence covers discovery strategy, creator monetization, content lifecycle, audience signals.
forumCommunities, threads, replies. Intelligence covers influence patterns, trust-building, moderation risks, information quality.
marketplaceListings, sellers, buyers. Intelligence covers competitive positioning, pricing dynamics, supply/demand signals.
Pricing
Pay As You Go
$0.035/request
50 free requests
Starter
$19/month
1,000 req included
Growth
$49/month
5,000 req included
Scale
$149/month
20,000 req included
Overage rates: Starter $0.025/req · Growth $0.018/req · Scale $0.012/req. Manage your plan at /dashboard/billing.
Rate Limits
Pay As You Go50 free requests/month, then $0.035/request. No concurrent limit.
Starter1,000 requests/month. Max 10 concurrent requests.
Growth5,000 requests/month. Max 30 concurrent requests.
Scale20,000 requests/month. Max 100 concurrent requests. Custom limits available.
When you exceed your monthly limit, the API returns 429 Too Many Requests with a message indicating your plan and an upgrade link. Requests reset on the 1st of each calendar month.