BreethDocs v0.1
REST API

POST /v1/episodes

Write a prose episode. Returns the extracted entities and edges.

Ingest a prose episode. Breeth extracts entities and edges synchronously, then runs narration, profile distillation, and (if you opted in) intent annotation asynchronously.

Scope required: write

Request

POST /v1/episodes
Authorization: Bearer ck_live_...
Content-Type: application/json
{
  "content": "Nandini Kulkarni shipped the migration in Q1 and was promoted to Staff Engineer.",
  "group_id": "default",
  "source_description": "api",
  "extract_intent": false
}
FieldTypeRequiredNotes
contentstring, ≥ 1 charyesThe prose to ingest.
group_idstringno ("default")Sub-namespace within your project. Letters, digits, dashes, underscores.
source_descriptionstring, ≤ 120 charsno ("api")Free-form label shown in the dashboard.
extract_intentboolno (false)Run intent annotation. Counts against monthly intents cap. See Intents.

Response — 200 OK

{
  "ok": true,
  "episode_name": "api_1778498269735",
  "extracted": {
    "entities": 4,
    "edges": 3
  },
  "group_id": "default",
  "warning": null,
  "cogram": {
    "mode": "async",
    "status": "pipeline_running_in_background",
    "task_id": "0ef8c19d6381",
    "note": "narrative/profile populate within ~15s"
  },
  "intent_suggestion": null
}
FieldMeaning
episode_nameUnique name. Use it with GET /v1/episodes/{name} to retrieve the raw content.
extracted.entitiesCount of new + updated nodes in the graph.
extracted.edgesCount of new edges. May be 0 for very terse content.
warningPresent when entities extracted but no edges (terse content, pronouns, snake_case predicates).
cogram.task_idBackground pipeline id. Poll GET /v1/tasks/{task_id} for narration / profile completion.
intent_suggestionIf you did not pass extract_intent: true and the content looks high-signal, this carries {should_extract, confidence, reason}. The suggestion is free; acting on it costs an intent credit.

Errors

HTTPSlugWhen
400invalid_requestMissing content or it's empty
401unauthenticatedBad / missing Bearer
402payment_requiredSubscription past-due
403missing_scopeKey lacks write scope
429quota_exceededMonthly writes cap hit — kind: "episodes_per_month"
429quota_exceededMonthly intents cap hit (only when extract_intent: true) — kind: "intent_extractions"

Examples

curl -X POST https://api.thebreeth.com/v1/episodes \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Sridhar prefers async Rust over Go for IO-heavy services.",
    "extract_intent": true
  }'
import httpx

r = httpx.post(
    "https://api.thebreeth.com/v1/episodes",
    headers={"Authorization": f"Bearer {KEY}"},
    json={
        "content": "Sridhar prefers async Rust over Go for IO-heavy services.",
        "extract_intent": True,
    },
)
r.raise_for_status()
print(r.json())
const r = await fetch("https://api.thebreeth.com/v1/episodes", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    content: "Sridhar prefers async Rust over Go for IO-heavy services.",
    extract_intent: true,
  }),
});
if (!r.ok) throw new Error(await r.text());
console.log(await r.json());

On this page