AI Tools
AI-powered writing tools — SEO title generation and streaming research via the MisarBlog API.
Generate Title Suggestions
/blog/v1/ai/titlesGenerates SEO/AEO/GEO-optimized article titles. Two modes: generate titles from an existing article's content, or from a keyword/topic prompt. Authenticated with your API key (Authorization: Bearer mbk_...).
Request body
actionstringbodysuggest | seo (default: seo).
suggest — generate titles from existing article content (requires context).
seo — generate high-visibility titles from a keyword/topic prompt (requires prompt).
promptstringbodyTopic or keyword phrase. Required when action is seo.
contextstringbodyArticle content used as source/context (max 8000 chars). Required when action is suggest; optional for seo.
Response fields
titlesArray<{ title: string; hint: string }>Up to 5 title suggestions. Each item has a title and a short hint explaining the keyword strategy or search intent it targets.
rawstringThe unparsed model output, in case you want to render it directly.
{
"action": "seo",
"prompt": "How to build a real-time chat app with Next.js and WebSockets"
}{
"titles": [
{
"title": "How to Build Real-Time Chat with Next.js and WebSockets",
"hint": "Front-loads the primary keyword; 'How to' pattern targets tutorial intent."
},
{
"title": "Next.js WebSockets: A Complete Guide to Real-Time Apps",
"hint": "Long-tail phrase 'Next.js WebSockets' with low competition."
}
],
"raw": "1. How to Build Real-Time Chat with Next.js and WebSockets\n→ ..."
}curl -X POST https://api.misar.io/blog/v1/ai/titles \
-H "Authorization: Bearer mbk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"action":"seo","prompt":"real-time chat with Next.js"}'Generic Completion
/blog/v1/ai/completeRuns a generic system + user prompt completion and returns the model text. This backs the MCP prompt templates. Authenticated with your API key (Authorization: Bearer mbk_...).
Spends credits. Returns 402 when the wallet balance / plan quota is exhausted.
Request body
systemstringbodySystem prompt that steers the model.
promptstringbodyrequiredThe user prompt to complete.
max_tokensintegerbodyMaximum tokens to generate.
Response fields
textstringThe completion text.
curl -X POST https://api.misar.io/blog/v1/ai/complete \
-H "Authorization: Bearer mbk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"system": "You are a concise technical editor.",
"prompt": "Rewrite this intro to be tighter: ...",
"max_tokens": 300
}'{ "text": "..." }AI Research (Streaming)
/blog/v1/ai/researchStreams AI-generated research on a topic as Server-Sent Events (text/event-stream). The request is proxied to the assisters.dev agent stream and passed through directly.
Session-authenticated
This endpoint is used by the MisarBlog editor and authenticates with your logged-in session (cookie), not an API key. It is not part of the Bearer mbk_... public API-key surface.
Request body
querystringbodyrequiredThe research topic or question. (The alias topic is also accepted.)
Response
A 200 OK returns a text/event-stream (Content-Type: text/event-stream). The body is the upstream agent's SSE stream forwarded verbatim — consume it as raw Server-Sent Events. The exact event payload shape is defined by the assisters.dev agent stream.
{
"query": "Impact of large language models on software development productivity"
}Content-Type: text/event-stream
Cache-Control: no-cache
data: ...
data: ...const res = await fetch("https://api.misar.io/blog/v1/ai/research", {
method: "POST",
headers: { "Content-Type": "application/json" },
credentials: "include", // send the session cookie
body: JSON.stringify({ query: "LLMs in software development" }),
});
const reader = res.body!.getReader();
const decoder = new TextDecoder();
while (true) {
const { done, value } = await reader.read();
if (done) break;
process.stdout.write(decoder.decode(value));
}For more details on streaming, see the Streaming guide.
Status codes
400— Missing required field (prompt/contextfor titles;queryfor research) or invalid JSON401— Invalid or missing credentials402— Insufficient credits / plan quota (title generation and/ai/complete, when the universal wallet is enabled)429— Rate limit exceeded (100 req/min per key)502— Upstream AI generation error