Back to Blog
Platform

Install Cognitive Workflows Into Any Surface Area With a Few Lines of Code

It's the Twilio moment for AI employees.

February 25, 2026

Now Any Developer Can Install Cognitive Workflows Into Any Surface Area With a Few Lines of Code

We just shipped External API V1.

It's the Twilio moment for AI employees.

Any developer can now invoke Cerebrals programmatically with a few lines of code.

No enterprise sales calls. No custom integrations. No months-long implementations.

Just an API key and a simple HTTP request.

What We Built

An external API that lets third-party developers embed Cerebrals into their own applications.

Think Twilio's model:

But instead of sending SMS, you're invoking AI employees.

The Code

const response = await fetch('https://api.cerebralos.com/v1/cerebrals/cerebral_abc123/message', {
 method: 'POST',
 headers: {
   'X-API-Key': 'sk_live_your_api_key',
   'Content-Type': 'application/json'
 },
 body: JSON.stringify({
   message: "What's the status of order 1234?",
   session_id: "user-abc-123",
   customer_id: "cust_8f2a"
 })
});

const data = await response.json();
console.log(data.data.message); // "Order 1234 shipped on Feb 23..."

That's it.

A few lines to add a customer service Cerebral to your app.

A few lines to add a medical billing Cerebral to your EMR.

A few lines to add a data analyst Cerebral to your dashboard.

Why This Matters

Before External API V1:

You had to use Cerebral OS to use Cerebrals.

Which meant:

After External API V1:

Cerebrals work wherever you need them.

In your:

Developers control:

We provide:

How It Actually Works

Step 1: Get an API key

Log into Cerebral OS → Developers → API Keys → Create Key

sk_live_abc123xyz...

Step 2: Choose a Cerebral

Pick which AI employee you want to invoke:

Get its ID: cerebral_abc123

Step 3: Make the call

POST /v1/cerebrals/:cerebralId/message
X-API-Key: sk_live_...

{
 "message": "user's question or request",
 "session_id": "unique session identifier",
 "customer_id": "your customer ID",
 "identity": {
   "email": "user@example.com",
   "name": "Jane Doe",
   "role": "customer"
 },
 "metadata": {
   "order_id": "1234",
   "source": "mobile-app"
 }
}

You get back:

{
 "success": true,
 "data": {
   "message": "The Cerebral's response",
   "session_id": "user-abc-123",
   "execution_id": "exec_xyz",
   "metadata": {
     "model": "gpt-4o-mini",
     "tokens_used": 312,
     "actions_executed": 1,
     "governance_status": "approved"
   }
 }
}

That's the entire integration.

What Developers Can Build

Shopify Store Widget

// Add customer service to any Shopify store
async function handleCustomerQuestion(question, orderId) {
 const response = await fetch('https://api.cerebralos.com/v1/cerebrals/cerebral_cs/message', {
   method: 'POST',
   headers: {
     'X-API-Key': process.env.CEREBRAL_API_KEY,
     'Content-Type': 'application/json'
   },
   body: JSON.stringify({
     message: question,
     session_id: `shopify-${orderId}`,
     metadata: { order_id: orderId }
   })
 });
 
 return await response.json();
}

Install customer service AI into any Shopify store in 10 minutes.

Healthcare EMR Integration

// Add medical billing Cerebral to your EMR
async function processClaim(claimData) {
 const response = await fetch('https://api.cerebralos.com/v1/cerebrals/cerebral_billing/message', {
   method: 'POST',
   headers: {
     'X-API-Key': process.env.CEREBRAL_API_KEY,
     'Content-Type': 'application/json'
   },
   body: JSON.stringify({
     message: "Process this insurance claim",
     session_id: `claim-${claimData.id}`,
     customer_id: claimData.patient_id,
     metadata: { claim: claimData }
   })
 });
 
 return await response.json();
}

Medical billing automation inside your existing EMR workflow.

Slack Bot

// Add AI employee to Slack workspace
app.message(async ({ message, say }) => {
 const response = await fetch('https://api.cerebralos.com/v1/cerebrals/cerebral_support/message', {
   method: 'POST',
   headers: {
     'X-API-Key': process.env.CEREBRAL_API_KEY,
     'Content-Type': 'application/json'
   },
   body: JSON.stringify({
     message: message.text,
     session_id: message.user,
     identity: {
       email: message.user_email,
       name: message.user_name,
       role: "employee"
     }
   })
 });
 
 const data = await response.json();
 await say(data.data.message);
});

Internal IT support Cerebral answering questions in Slack.

Mobile App

// Add AI employee to iOS app
func askCerebral(question: String) async throws -> String {
   let url = URL(string: "https://api.cerebralos.com/v1/cerebrals/cerebral_app/message")!
   var request = URLRequest(url: url)
   request.httpMethod = "POST"
   request.setValue(apiKey, forHTTPHeaderField: "X-API-Key")
   request.setValue("application/json", forHTTPHeaderField: "Content-Type")
   
   let body = [
       "message": question,
       "session_id": userId,
       "customer_id": customerId
   ]
   request.httpBody = try JSONEncoder().encode(body)
   
   let (data, _) = try await URLSession.shared.data(for: request)
   let response = try JSONDecoder().decode(CerebralResponse.self, from: data)
   
   return response.data.message
}

Native AI employees inside your mobile experience.

Session Management

Sessions are stateful.

The Cerebral remembers context within a session:

// First message in session
await cerebral.message({
 message: "What's my order status?",
 session_id: "user-123"
});
// Response: "Which order? You have 3 recent orders."

// Follow-up in same session
await cerebral.message({
 message: "The most recent one",
 session_id: "user-123"  // Same session
});
// Response: "Order #5678 shipped yesterday..."

Each session maintains:

You control session lifecycle:

Identity and Permissions

You control who the Cerebral is serving:

{
 "identity": {
   "email": "jane@example.com",
   "name": "Jane Doe",
   "role": "customer"
 }
}

The Cerebral uses this for:

Your API key permissions control:

What This Enables

Developers can now:

1. Embed AI employees in existing appsNo need to rebuild your UI. Add Cerebrals to what you already have.

2. Build new products on top of CerebralsYour app, your brand, our AI infrastructure.

3. White-label AI employee experiencesYour customers never see Cerebral OS. They see your product.

4. Extend internal toolsAdd AI employees to CRMs, admin panels, dashboards.

5. Create industry-specific solutionsHealthcare, legal, e-commerce, logistics - build verticals on our platform.

The Developer Experience

We built this to be stupid simple:

No SDKs required - Just HTTP requests

Standard REST - Works in any language

Bearer auth - Simple API key in header

JSON everywhere - Request and response

Stateful sessions - Just pass session_id

Rich metadata - Attach whatever context you need

Error handling - Standard HTTP codes + detailed messages

Pricing

Pay per usage:

No minimums. No seat licenses. No enterprise contracts.

Start with $0. Scale to millions of requests.

Just like Twilio.

The Twilio Parallel

Twilio did this for communications:

Before Twilio:

After Twilio:

twilio.messages.create(to="+1234567890", body="Hello")

Every app could send SMS.

We're doing this for AI employees:

Before External API:

After External API V1:

cerebral.message({message: "Help this customer"})

Every app can have AI employees.

What Developers Are Building

We're seeing:

E-commerce platforms adding customer service Cerebrals to every merchant

Healthcare SaaS embedding medical billing automation into their workflow tools

Internal tool builders adding IT support Cerebrals to Slack/Teams

SaaS companies white-labeling AI employees for their customers

Mobile apps adding conversational AI that can actually take actions

All with a few lines of code.

The Architecture Behind It

What External API does:

  1. Authenticates via API key (SHA-256 hashed, never stored plain)
  2. Validates permissions and rate limits
  3. Routes to the requested Cerebral
  4. Injects session context and identity
  5. Executes the Cerebral's workflow
  6. Manages actions across integrations
  7. Enforces governance policies
  8. Tracks usage for billing
  9. Returns the response

What you don't have to build:

You just make the call. We handle everything else.

Getting Started

1. Create a Cerebral in Cerebral OS

2. Get an API key

3. Make your first call

curl -X POST https://api.cerebralos.com/v1/cerebrals/YOUR_CEREBRAL_ID/message \
 -H "X-API-Key: sk_live_YOUR_KEY" \
 -H "Content-Type: application/json" \
 -d '{
   "message": "Hello",
   "session_id": "test-123"
 }'

4. Integrate into your app

const cerebral = {
 async message(body) {
   const res = await fetch('https://api.cerebralos.com/v1/cerebrals/YOUR_ID/message', {
     method: 'POST',
     headers: {
       'X-API-Key': 'sk_live_YOUR_KEY',
       'Content-Type': 'application/json'
     },
     body: JSON.stringify(body)
   });
   return await res.json();
 }
};

// Now use it anywhere
const response = await cerebral.message({
 message: "What's my order status?",
 session_id: userId
});

5. Ship it

The Bottom Line

AI employees shouldn't require enterprise deployments.

They should work like any other API:

That's what External API V1 delivers.

A few lines of code.

Any surface area.

Any developer.

The infrastructure is ready.

Start building.

[Get your API key →]

See Cerebral in production.

Governed, auditable labor running real workflows across your existing infrastructure.

Book a Demo