Overview
StorkAI turns one sentence into a live AI agent β its own persona, memory, tools, chat and website. For developers, each agent exposes a small, stable HTTP surface so you can talk to it from any app, embed it in any page, and read its public profile and data.
- Base URL β
https://storkai.net. Self-hosting? Swap in your own origin everywhere below. - Public endpoints need no credentials β the chat, agent profile and on-site datasets are open (rate-limited by IP).
- Account endpoints act on your own agents and require your StorkAI session token.
- JSON everywhere β send and receive
application/json; responses are UTF-8.
Where do I get an agent ID?
Create an agent at /agents/new. Its ID is in the admin URL /agents/<id> and the public site /a/<id>. That ID is all you need to call the public API.
Quickstart
Send your first message to an agent in under a minute.
Build one at /agents/new, then copy the ID from its URL.
curl -X POST https://storkai.net/api/agents/chat \
-H "Content-Type: application/json" \
-d '{
"id": "YOUR_AGENT_ID",
"message": "Hi! What can you help me with?",
"history": []
}'{
"reply": "Hi! I can help you plan and organise anythingβ¦",
"cards": [],
"captured": {},
"vibe": "open"
}Thatβs the whole loop. Keep a running history and pass it back each turn for context.
Authentication
StorkAI has two access levels.
| Level | How | Use for |
|---|---|---|
| Public | No credentials. IP rate-limited. | Chat, agent profile, on-site datasets. |
| Account | Authorization: Bearer <token> β an API key (sk_live_β¦) or your StorkAI session token. | Managing your own agents, data, analytics. |
Create a revocable API key for server-to-server access at /developers/keys, then send it as a bearer token:
curl https://storkai.net/api/agents \
-H "Authorization: Bearer sk_live_YOUR_KEY"Keep keys secret
A key grants access to your agents β use it only server-side, never in a browser or app bundle. Keys canβt manage other keys and never perform admin actions. Revoke a leaked key instantly at /developers/keys.
Core concepts
Agent
A configured AI product β persona, memory, knowledge, tools, connectors and a public site β addressed by a single id.
The brain
Each agent compiles a full system prompt: operating principles, voice, guardrails, a progression checklist, knowledge and a strict JSON response contract.
Connectors
55+ ready APIs (crypto, finance, weather, commerceβ¦) an agent can call live β on StorkAI's managed key (credits) or your own.
Data modules
Upload a CSV/JSON and expose it as a table, KPI, chart or cards β searchable in chat and renderable on the agent's site.
Credits
The metered unit for AI + connector usage and monetization. Public chat is free; managed connector calls cost credits.
Hosting
Serve an agent on storkai.net/a/<id>, embed it anywhere, or point a custom domain at it.
The agent object (public projection)
GET /api/agents/public returns a public-safe view of an agent β never secrets, knowledge or flow.
{
"id": "string",
"name": "string",
"emoji": "string",
"role": "string",
"greeting": "string",
"starters": ["string"],
"tagline": "string",
"accent": "#6366F1",
"avatarUrl": "string | null",
"featureImages": [{ "label": "string", "url": "string" }],
"pricing": [{ "name": "string", "price": "string", "features": ["string"] }],
"dataModules": [ /* only modules marked on-site */ ]
}Chat with an agent
The core endpoint β the same one the embed widget and hosted site use.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
id | string | required | The agent ID. |
message | string | required* | The user message (β€ 1000 chars). *Required unless image is set. |
history | array | optional | Prior turns: [{ "role": "user" | "model", "text": string }] β last 8 used. |
image | string | optional | A data URL (data:image/β¦;base64,β¦) for vision, β€ ~6 MB. |
known | object | optional | Facts already captured ({ field: value }) so the agent never re-asks. |
Response
| Field | Type | Required | Description |
|---|---|---|---|
reply | string | β | The agent's message, in the user's language. |
cards | array | β | Swipe cards: { title, subtitle, tag, image?, href? }. |
captured | object | β | Facts learned this turn ({ field: value }). |
vibe | string | β | Detected tone (e.g. open, decisive, overwhelmed). |
action | object | β | A performed action, if any: { type, label, data }. |
Example
const res = await fetch("https://storkai.net/api/agents/chat", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
id: agentId,
message: "Find me a vegan caterer in Lyon",
history, // [{ role, text }, β¦]
}),
});
const data = await res.json();
console.log(data.reply);
data.cards?.forEach((c) => console.log(c.title, c.href));Rate limit
Rate limit: 20 requests / minute / IP. Exceeding it returns 429.
Get an agent's public profile
Fetch the public projection (see the agent object) β name, greeting, starters, accent and on-site data. Cached 60s.
curl "https://storkai.net/api/agents/public?id=YOUR_AGENT_ID"Read on-site datasets
Lists datasets an agent has published to its site (only modules marked on-site). Add &setId=β¦ to fetch one set's rows.
# List published datasets
curl "https://storkai.net/api/agents/data?pub=1&id=YOUR_AGENT_ID"
# One dataset's rows
curl "https://storkai.net/api/agents/data?pub=1&id=YOUR_AGENT_ID&setId=SET_ID"{ "set": { "setId": "β¦", "name": "Subsidies", "columns": ["name","amount"], "rows": [ β¦ ], "count": 128 } }Account API
These act on your own agents and require your StorkAI session token (Authorization: Bearer <token>). Each has its own rate limit.
| Method | Path | Purpose |
|---|---|---|
| GET | /api/agents | List your agents (secrets returned as keys only). |
| POST | /api/agents | Create an agent. |
| PATCH | /api/agents | Update an agent by { id, β¦fields }. |
| DELETE | /api/agents?id= | Delete an agent. |
| GET/POST/DELETE | /api/agents/data | Manage datasets (upload rows, list, delete). |
| GET | /api/agents/stats?id= | Usage analytics (messages, calls, avg latency). |
| GET | /api/agents/people?id= | People who chatted + what was captured. |
| GET | /api/agents/connectors?id= | Per-connector request & credit usage. |
| GET | /api/user/credits | Your credit balance & recent transactions. |
Never sent to clients
Secret values (integration keys) are write-only via a dedicated endpoint and are never returned by any API. Managing platform keys and billing is admin-only and out of scope for integrations.
Embed & widget
Two ways to put an agent on the web β no build step.
Inline iframe widget
<iframe
src="https://storkai.net/embed/YOUR_AGENT_ID"
width="420" height="640"
style="border:0;border-radius:16px;box-shadow:0 10px 40px rgba(0,0,0,.15)"
allow="microphone"
title="StorkAI agent"></iframe>Hosted site
Every agent gets a full public site at https://storkai.net/a/YOUR_AGENT_ID β hero, chat, features and data, agent-branded. Share the link, or point a custom domain at it from the agent admin.
Extensions
Official companions that put an agent one keystroke away β both are thin clients of the public chat API.
Chrome side panel
A Manifest V3 side panel: chat with your agent, send the current page's context, and right-click any selection to ask about it.
VS Code extension
An activity-bar chat themed to your editor, with 'Ask about Selection' to send highlighted code straight to your agent.
Both live in the repo under extensions/ β load unpacked (Chrome) or run with F5 (VS Code), then set your agent ID.
Connectors
An agent can pull live data from 69+ ready APIs across 13 categories β Crypto, Finance, E-commerce, Affiliate, Cloud & Dev, Data & Search and more.
- Managed β the call runs on StorkAI's key and costs credits. Zero setup for you.
- Bring your own key β store your credential (write-only) and calls run on it, free of platform credits.
- Safe by design β the model writes a
{{KEY}}placeholder; the real key is injected server-side, host-allowlisted, https-only, private IPs blocked. The model never sees the key.
Data modules
Upload a CSV or JSON and it becomes a first-class dataset your agent can present and search.
- Module types β table, KPI, chart, cards.
- In chat β the agent searches your rows and returns matches as cards (no invented data).
- On the site β modules marked on-site render on the agent's public page and are readable via the public datasets API.
Rate limits
| Endpoint | Limit |
|---|---|
POST /api/agents/chat | 20 / min / IP |
GET /api/agents/public | Unmetered (cached 60s) |
GET /api/agents/data?pub=1 | Unmetered (cached 60s) |
| Account endpoints | 20β60 / min / account (per route) |
Over the limit returns 429 with a short message. Back off and retry.
Errors
Errors are JSON: { "error": "message" } with a matching HTTP status.
| Status | Meaning |
|---|---|
400 | Bad request β invalid JSON or a missing required field (e.g. id/message). |
401 | Authentication required (account endpoints without a valid token). |
403 | Forbidden β you don't own that resource. |
404 | Not found β no agent/resource for that id. |
429 | Rate limited β slow down. |
500 | Server error β safe to retry with backoff. |
Versioning & stability
The public endpoints above are the stable integration surface. We add fields without breaking you β treat responses as additive and ignore unknown keys. Breaking changes will ship under a new path.
Support
Questions, quotas or an API-key/webhook need? Reach us at hello@storkai.net, or explore the platform overview and FAQ.