inite-ai Episodes API

The raw-substrate driver: verbatim pre-extraction dialogue turns (L0) as a contract — keyset reads, NDJSON export, and signed new-episode webhooks — so any consumer can build its own projection without touching our database. Flags: EPISODES_API_ENABLED / EPISODE_SUBSCRIPTIONS_ENABLED (off → 404).

Operations 5

GET /v1/episodes Read the L0 episode substrate (keyset-paged) #
GET /v1/episodes/export Stream the substrate as NDJSON (replay/export) #
GET /v1/episodes/subscriptions List registered webhook endpoints #
POST /v1/episodes/subscriptions Register a new-episode webhook endpoint #
DELETE /v1/episodes/subscriptions/{id} Delete a webhook endpoint #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/inite-ai:inite-ai-episodes-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

inite-ai-episodes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: 'Generated from the zod wire contracts (`pnpm openapi:build` — scripts/build-openapi.ts); do not edit by hand. Excluded on purpose: the operator/ops surface (jobs, leases, policy, stats, maintenance, GDPR cascades), which is indexed in docs/api.md, and the MCP transport `ALL /mcp/{companyId}`, which is JSON-RPC over Streamable HTTP rather than REST — MCP clients discover it through `tools/list` (docs/mcp.md). Scopes are plain bearer-key grants, not OAuth flows — each operation states its required scope.'
  license:
    identifier: AGPL-3.0-or-later
    name: AGPL-3.0-or-later
  summary: 'The community-facing platform surface: the memory core (fact ingest, search, multi-hop, synthesize, entity and fact reads), the Domain Pack registry and tenant pack admin, the document pipeline, the external-indexer work protocol, the raw-substrate driver, the evidence substrate, and source reputation reads.'
  title: INITE Brain — Platform Episodes API
  version: 2.6.0
servers:
- description: Hosted instance (placeholder — self-hosted deployments serve the same paths on their own origin).
  url: https://brain.inite.ai
security:
- bearerAuth: []
tags:
- description: 'The raw-substrate driver: verbatim pre-extraction dialogue turns (L0) as a contract — keyset reads, NDJSON export, and signed new-episode webhooks — so any consumer can build its own projection without touching our database. Flags: EPISODES_API_ENABLED / EPISODE_SUBSCRIPTIONS_ENABLED (off → 404).'
  name: Episodes
paths:
  /v1/episodes:
    get:
      description: 'Verbatim pre-extraction dialogue turns in stable (occurredAt, id) order — the raw layer any consumer can build its own projection from. Callers without `brain:read_pii` see only episodes whose piiClass is empty. 404 until EPISODES_API_ENABLED=1. Source: src/episodes/episodes.controller.ts.


        Required scope: `brain:read`.'
      operationId: listEpisodes
      parameters:
      - description: Only turns of this conversation.
        in: query
        name: conversationId
        required: false
        schema:
          type: string
      - description: Only turns by this speaker.
        in: query
        name: speaker
        required: false
        schema:
          type: string
      - description: ISO lower bound on occurredAt (inclusive).
        in: query
        name: since
        required: false
        schema:
          type: string
      - description: ISO upper bound on occurredAt (exclusive).
        in: query
        name: until
        required: false
        schema:
          type: string
      - description: Page size (max 200, default 50).
        in: query
        name: limit
        required: false
        schema:
          type: integer
      - description: Opaque keyset cursor from the previous page (`nextCursor`).
        in: query
        name: cursor
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EpisodesListResponse'
          description: One page of episodes.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      summary: Read the L0 episode substrate (keyset-paged)
      tags:
      - Episodes
  /v1/episodes/export:
    get:
      description: 'The same filtered stream as GET /v1/episodes, one episode per line, paged internally — bounded memory however large the tenant. 404 until EPISODES_API_ENABLED=1.


        Required scope: `brain:read`.'
      operationId: exportEpisodes
      parameters:
      - description: Only turns of this conversation.
        in: query
        name: conversationId
        required: false
        schema:
          type: string
      - description: Only turns by this speaker.
        in: query
        name: speaker
        required: false
        schema:
          type: string
      - description: ISO lower bound on occurredAt (inclusive).
        in: query
        name: since
        required: false
        schema:
          type: string
      - description: ISO upper bound on occurredAt (exclusive).
        in: query
        name: until
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/x-ndjson:
              schema:
                $ref: '#/components/schemas/EpisodeWire'
          description: NDJSON stream; each line is an Episode.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      summary: Stream the substrate as NDJSON (replay/export)
      tags:
      - Episodes
  /v1/episodes/subscriptions:
    get:
      description: 'Secrets are never included. 404 until EPISODE_SUBSCRIPTIONS_ENABLED=1.


        Required scope: `brain:read`.'
      operationId: listEpisodeSubscriptions
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EpisodeSubscriptionsListResponse'
          description: Registered endpoints.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      summary: List registered webhook endpoints
      tags:
      - Episodes
    post:
      description: 'Registers an http(s) endpoint for `episodes_available` pushes (see the EpisodesAvailableEvent schema and the top-level webhooks section). The HMAC signing secret is returned exactly once. Pushes carry METADATA ONLY — bodies are pulled through GET /v1/episodes under the subscriber’s own scopes. Delivery is at-least-once. 404 until EPISODE_SUBSCRIPTIONS_ENABLED=1.


        Required scope: `brain:admin`.'
      operationId: createEpisodeSubscription
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEpisodeSubscriptionRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateEpisodeSubscriptionResponse'
          description: Registered; store the secret now.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      summary: Register a new-episode webhook endpoint
      tags:
      - Episodes
  /v1/episodes/subscriptions/{id}:
    delete:
      description: '404 until EPISODE_SUBSCRIPTIONS_ENABLED=1.


        Required scope: `brain:admin`.'
      operationId: deleteEpisodeSubscription
      parameters:
      - description: The episode_subscription record id.
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteEpisodeSubscriptionResponse'
          description: Whether a subscription was deleted.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      summary: Delete a webhook endpoint
      tags:
      - Episodes
webhooks:
  episodesAvailable:
    post:
      description: 'Brain POSTs this to every registered subscription endpoint when fresh episodes land. Metadata only — never episode text. Signed `X-Brain-Signature: sha256=` over the raw JSON body with the per-subscription secret. Delivery is at-least-once (dedupe on episode ids); the watermark advances only after a 2xx.'
      operationId: episodesAvailableWebhook
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EpisodesAvailableEvent'
        required: true
      responses:
        '200':
          description: Acknowledged; the watermark advances.
      summary: New-episode push (outbound webhook)
      tags:
      - Episodes
components:
  schemas:
    EpisodeSubscriptionRow:
      additionalProperties: false
      properties:
        active:
          type: boolean
        createdAt:
          type: string
        failureCount:
          maximum: 9007199254740991
          minimum: -9007199254740991
          type: integer
        id:
          type: string
        url:
          type: string
        watermark:
          type: string
      required:
      - id
      - url
      - active
      - watermark
      - failureCount
      - createdAt
      type: object
    CreateEpisodeSubscriptionResponse:
      additionalProperties: false
      properties:
        id:
          type: string
        secret:
          type: string
        watermark:
          type: string
      required:
      - id
      - secret
      - watermark
      type: object
    EpisodeSubscriptionsListResponse:
      additionalProperties: false
      properties:
        subscriptions:
          items:
            $ref: '#/components/schemas/EpisodeSubscriptionRow'
          type: array
      required:
      - subscriptions
      type: object
    ErrorResponse:
      description: Standard NestJS error envelope.
      properties:
        error:
          type: string
        message:
          anyOf:
          - type: string
          - items:
              type: string
            type: array
        statusCode:
          type: integer
      required:
      - statusCode
      - message
      type: object
    DeleteEpisodeSubscriptionResponse:
      additionalProperties: false
      properties:
        deleted:
          type: boolean
      required:
      - deleted
      type: object
    CreateEpisodeSubscriptionRequest:
      additionalProperties: false
      properties:
        url:
          type: string
      required:
      - url
      type: object
    EpisodesListResponse:
      additionalProperties: false
      properties:
        episodes:
          items:
            $ref: '#/components/schemas/EpisodeWire'
          type: array
        nextCursor:
          type: string
      required:
      - episodes
      type: object
    EpisodesAvailableEvent:
      additionalProperties: false
      properties:
        delivery:
          const: at-least-once
          type: string
        episodes:
          items:
            additionalProperties: false
            properties:
              conversationId:
                type: string
              id:
                type: string
              messageId:
                type: string
              occurredAt:
                type: string
              recordedAt:
                type: string
              speaker:
                type: string
            required:
            - id
            - messageId
            - occurredAt
            - recordedAt
            type: object
          type: array
        event:
          const: episodes_available
          type: string
        ts:
          type: string
        watermark:
          type: string
      required:
      - event
      - delivery
      - episodes
      - watermark
      - ts
      type: object
    EpisodeWire:
      additionalProperties: false
      properties:
        addressee:
          type: string
        conversationId:
          type: string
        id:
          type: string
        kind:
          type: string
        lang:
          type: string
        messageId:
          type: string
        occurredAt:
          type: string
        piiClass:
          items:
            type: string
          type: array
        recordedAt:
          type: string
        source:
          additionalProperties: {}
          propertyNames:
            type: string
          type: object
        speaker:
          type: string
        text:
          type: string
      required:
      - id
      - kind
      - messageId
      - text
      - occurredAt
      - recordedAt
      - source
      type: object
  responses:
    Forbidden:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: The key lacks the required scope.
    Unauthorized:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: Missing or unknown bearer key.
    NotFound:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: No such resource in this tenant.
    BadRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: Validation failed.
  securitySchemes:
    bearerAuth:
      description: 'API key (`Authorization: Bearer <key>`); its SHA-256 must be registered in BRAIN_API_KEYS. Keys carry scopes (`brain:read`, `brain:write`, `brain:admin`, `brain:read_pii`, `registry:publish`, `registry:curate`, `indexer:write`) — each operation states the scope it requires. Not an OAuth flow.'
      scheme: bearer
      type: http