Cognitive API  ·  v1

Every AI lab sells you a model.
We sell you the work.

Call an agent. Get back a finished pull request, a reviewed contract, a clean dataset. No prompt engineering. No agent loop to build. No idle compute to pay for. The Cognitive API gives you domain specialists — already trained, already deployed — that your product can call like any other service.

6
Specialist agents
5
Integration paths
<2 min
To first response
import Cognitive from '@cognitive-ai/sdk'; const cog = new Cognitive(); // reads COGNITIVE_API_KEY // Run two agents in parallel — unique to Cognitive const [legal, finance] = await cog.agents.batch([ { agent: 'legal', task: 'Review this NDA.', files: [ndaFile] }, { agent: 'finance', task: 'Summarize Q3 P&L.' }, ]);
Response
{ "output": "Contract review complete. Three critical clauses flagged…" , "usage": { "cost_usd": 0.0042 } }
Built different

Not a model. A team of specialists.

Every other API gives you a blank model and a prompt box. You still have to build the loop, write the guardrails, and tune the domain knowledge. Cognitive ships that work already done — so you call an agent and get back finished output, not tokens to interpret.

⚡

Parallel agent execution

Run your legal analyst, financial reviewer, and QA agent simultaneously with one batch call. Results come back together, in order.

Not in OpenAI or Meta's API
🧵

Stateful threads

Build multi-turn conversations that remember context — without managing thread IDs, server-side files, or polling loops. Simpler than OpenAI Assistants.

📎

File and vision input

Drop any PDF, image, or document into any agent call. The SDK encodes it automatically — in both Node and the browser.

🔄

OpenAI-compatible

Already using the OpenAI SDK? Change two lines. Point your base URL at Cognitive and use your specialist agents as model names.

🔌

MCP server included

Every agent is available as an MCP tool. Use them directly from Cursor, Claude, or any MCP-compatible editor — no extra setup.

💰

Pay per use

No seats. No monthly minimums. You pay for tokens consumed and cost per run, visible in every response body so you always know what you spent.

Roster

Who you can call today

Each agent is a specialist — trained on domain-specific tasks, not a general-purpose assistant dressed up in a system prompt.

🧠
Anna
General Intelligence
Research, analysis, writing, strategy. Anna handles complex reasoning across any domain and is the default starting point for most integrations.
agent: "anna"
⚖️
Legal
Contract & Risk Analysis
NDA review, clause flagging, risk scoring, and plain-language summaries of complex legal documents. Pass the file, get the redlines.
agent: "legal"
📊
Finance
Financial Analysis
P&L summaries, earnings analysis, burn rate projections, and financial narrative. Attach a spreadsheet or paste raw numbers.
agent: "finance"
💻
Engineer
Code Generation & Review
Write, review, and refactor code across languages. Give it a GitHub ticket or a failing test; it returns working implementation.
agent: "engineer"
🔍
QA
Quality & Testing
Test plan generation, edge case identification, and bug report triage. Pairs with Engineer in the swarm pipeline for full ticket-to-PR coverage.
agent: "qa"
✨
Wonder
Creative & Ideation
Brand strategy, campaign concepts, product naming, and copy. Wonder is Cognitive's creative specialist — fast, opinionated, and ready to iterate.
agent: "wonder"
Capabilities

Everything your app needs

Batch execution

Run multiple agents at the same time

Send an array of agent calls and get back all results at once, in the same order you sent them. No client-side orchestration, no Promise.all juggling — one call, one response.

Neither OpenAI nor Meta's Llama API offers parallel batch execution at the agent abstraction layer. This is Cognitive's biggest structural advantage.

⚡

Use case: A contract management tool that runs legal, finance, and risk agents on the same document simultaneously — cutting review time from 3 sequential calls to 1 parallel one.

batch.js SDK
const [legalReview, financeSummary, riskScore] = await cog.agents.batch([ { agent: 'legal', task: 'Review this NDA for red flags.', files: [ndaFile] }, { agent: 'finance', task: 'Summarize payment terms and penalties.' }, { agent: 'anna', task: 'Rate overall vendor risk 1–10.' }, ], { maxConcurrency: 3 });
Threads

Stateful conversations, without the plumbing

Create a thread, send messages, and the agent remembers the full history — automatically. No thread IDs to pass around, no server-side file uploads, no polling for completion.

OpenAI's Assistants API requires creating a thread object, uploading files to a separate store, creating a run, polling for status, and then retrieving messages. With Cognitive, it's thread.send().

threads.js SDK
// Create once, send as many times as you need const thread = cog.threads.create({ agent: 'anna', system: 'You are reviewing our Q4 board deck.' }); await thread.send('What are our biggest Q4 risks?'); console.log(thread.lastOutput); // Continues from where the last message left off await thread.send('Which one is most likely to slip?'); console.log(thread.lastOutput);
Streaming

Real-time output with one line of code

Stream tokens to your UI as they're generated. Works with async generators in JS and Python — no SSE parsing, no manual chunking.

💡

Tip: Combine streaming with threads for a natural chat experience. The thread.stream() method updates history automatically when the stream completes.

stream.js SDK
for await (const event of cog.agents.stream({ agent: 'anna', task: 'Write an executive brief on Q3 results.' })) { process.stdout.write(event.delta); if (event.done) { // event.run has the full result + usage console.log('\nTokens:', event.run.usage); } }
Integration

Five ways to connect

Pick the integration that fits where you're building. They all hit the same API and support the same agents.

@cognitive-ai/sdk

The official JavaScript and TypeScript SDK. Works in Node 18+ and modern browsers. Full TypeScript types included — no @types package needed.

  • Async/await and async generator APIs
  • Streaming via async generators
  • Parallel batch execution
  • Stateful threads
  • File input: paths in Node, File/Blob in browser
  • Full TypeScript types
npm install @cognitive-ai/sdk
index.ts
import Cognitive from '@cognitive-ai/sdk'; const cog = new Cognitive(); const result = await cog.agents.run({ agent: 'anna', task: 'Summarize this quarter.' }); console.log(result.output);

cognitive-ai

The official Python SDK. Zero external dependencies — built entirely on the standard library. Python 3.11+ with full async support via asyncio.

  • Sync and async APIs side-by-side
  • Streaming via sync and async generators
  • Parallel batch with ThreadPoolExecutor
  • Async batch with asyncio gather
  • Stateful threads
  • Zero dependencies — stdlib only
pip install cognitive-ai
main.py
from cognitive_ai import Cognitive cog = Cognitive() # reads COGNITIVE_API_KEY result = cog.agents.run( agent='anna', task='Summarize this quarter.' ) print(result['output'])

REST API

Plain HTTP — use from any language, any framework, any tool. Every endpoint takes JSON and returns JSON. Auth is a standard Bearer token in the Authorization header.

  • Standard REST with JSON bodies
  • Bearer token authentication
  • SSE streaming with Accept: text/event-stream
  • Works from Go, Ruby, PHP, Java — any HTTP client
https://cognitivedaniel.com/api/v1
run.sh
curl https://cognitivedaniel.com/api/v1/agents/run \ -H "Authorization: Bearer $COGNITIVE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "agent": "anna", "task": "Summarize this quarter.", "maxTokens": 1000 }'

OpenAI Drop-in

Already using the OpenAI Python or JavaScript client? Change two lines — the base URL and the model name. Everything else stays the same.

  • Compatible with openai Python SDK and openai npm package
  • Use agents as model names: cognitive-anna
  • Preserves chat completions interface
  • Works with any tool built on OpenAI's API surface
https://cognitivedaniel.com/api/v1/openai
openai-compat.py
from openai import OpenAI client = OpenAI( api_key="your_cognitive_key", base_url="https://cognitivedaniel.com/api/v1/openai" ) response = client.chat.completions.create( model="cognitive-anna", # ← the only other change messages=[{"role": "user", "content": "Summarize this quarter."}] )

MCP Server

Run Cognitive agents as MCP tools inside Cursor, Claude Desktop, VS Code, or any MCP-compatible editor. No code required — just configure and start delegating.

  • Every agent available as an MCP tool
  • Works with Cursor, Claude Desktop, and any MCP client
  • Streamable HTTP transport, JSON-RPC 2.0
  • Authorization via Bearer token header
npx cognitive-ai-mcp
cursor-mcp.json
{ "mcpServers": { "cognitive": { "command": "npx", "args": ["cognitive-ai-mcp"], "env": { "COGNITIVE_API_KEY": "your_key_here" } } } }
How we compare

What Cognitive has that others don't

Capability Cognitive API OpenAI API Meta Llama API
Parallel agent batch execution ✓ agents.batch() ✗ ✗
Specialist agents (legal, finance, QA…) ✓ 6 built-in ✗ raw model only ✗ raw model only
Stateful multi-turn threads ✓ Simple Thread class ~ Assistants (complex) ✗
File / vision input ✓ Any agent ✓ ✗
Python SDK ✓ cognitive-ai ✓ ✓
JavaScript / TypeScript SDK ✓ @cognitive-ai/sdk ✓ ~ Partial
OpenAI-compatible layer ✓ Drop-in base URL Native ✗
MCP server ✓ cognitive-ai-mcp ✗ ✗
SSE streaming ✓ ✓ ✓
Usage cost per response ✓ In every response body ~ Via billing dashboard ~ Via billing dashboard
Pricing

Pay for output. Not compute.

No seats. No monthly minimums. No per-token billing that balloons as prompts get longer. You pay when finished work ships — and the cost is in every API response, so you always know exactly what you spent.

Developer
Free to start
Get an API key and start building immediately. No credit card required.
  • Every agent available
  • All SDKs and integration paths
  • $2 of free usage to try it
  • Community support
Enterprise
Custom / volume pricing
Volume discounts, SLA guarantees, and custom agent training for your domain.
  • Custom agent training
  • Dedicated infrastructure option
  • SLA and uptime guarantees
  • Dedicated support

Your first agent run is two minutes away.

Sign up, get a key, and call your first agent. No credit card. No configuration. Just results.