Stream

A real-time analysis stream (§4.8).

Artificial IntelligenceVideoReal-TimeJEPAPlatform

Properties

Name Type Description
id string Stream resource id (prefixed ULID). P6 §4.8.
object string
status object
metering_rule object
end_reason object
prompt stringnull
query objectnull
model string
queue_position integernull
estimated_start_s integernull
signaling object
ice_servers arraynull
limits object
duration_s integernull Live-clock duration. Terminal only.
results_summary objectnull Terminal summary: {result_frames, frames (deprecated alias of result_frames — removed ~2026-08-28), last_detections}. result_frames counts result EVENTS emitted (results are sampled, not per-source-fr
failure_diagnostic objectnull Present when end_reason is ice_failed (and some media_timeout cases): ICE candidate summary from the server side — {local_candidates: string[], hint}. Use it to distinguish "server advertised only pri
recording object
usage object
metadata object Free-form key/value metadata. ≤16 keys, key ≤40 chars [a-zA-Z0-9_.-], value ≤500 chars.
created_at string
live_started_at stringnull
ended_at stringnull
View JSON Schema on GitHub

JSON Schema

primateintelligence-ai-stream-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/primateintelligence-ai/json-schema/primateintelligence-ai-stream-schema.json",
  "title": "Stream",
  "description": "A real-time analysis stream (§4.8).",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/primateintelligence-ai-openapi.json#/components/schemas/Stream",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^st_[0-9A-HJKMNP-TV-Z]{26}$",
      "description": "Stream resource id (prefixed ULID). P6 §4.8."
    },
    "object": {
      "type": "string",
      "enum": [
        "stream"
      ]
    },
    "status": {
      "$ref": "#/$defs/StreamStatus"
    },
    "metering_rule": {
      "allOf": [
        {
          "$ref": "#/$defs/MeteringRule"
        },
        {
          "description": "PRI-552: settlement rule pinned at create time. Streams created before the cutover report per_second."
        }
      ]
    },
    "end_reason": {
      "$ref": "#/$defs/StreamEndReason"
    },
    "prompt": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 1,
      "maxLength": 2000
    },
    "query": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {}
    },
    "model": {
      "type": "string"
    },
    "queue_position": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1
    },
    "estimated_start_s": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0
    },
    "signaling": {
      "$ref": "#/$defs/StreamSignaling"
    },
    "ice_servers": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object",
        "additionalProperties": {}
      }
    },
    "limits": {
      "$ref": "#/$defs/StreamLimits"
    },
    "duration_s": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0,
      "description": "Live-clock duration. Terminal only."
    },
    "results_summary": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {},
      "description": "Terminal summary: {result_frames, frames (deprecated alias of result_frames — removed ~2026-08-28), last_detections}. result_frames counts result EVENTS emitted (results are sampled, not per-source-frame). Detection rows use the same enums/casing as the file-API result contract (answer: yes|no|indeterminate, lowercase; prompt echoed exactly as submitted)."
    },
    "failure_diagnostic": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {},
      "description": "Present when end_reason is ice_failed (and some media_timeout cases): ICE candidate summary from the server side — {local_candidates: string[], hint}. Use it to distinguish \"server advertised only private/host candidates\" from \"client could not reach relay\"."
    },
    "recording": {
      "$ref": "#/$defs/StreamRecordingState"
    },
    "usage": {
      "$ref": "#/$defs/StreamUsage"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "maxLength": 500
      },
      "default": {},
      "description": "Free-form key/value metadata. ≤16 keys, key ≤40 chars [a-zA-Z0-9_.-], value ≤500 chars."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "live_started_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "ended_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  },
  "required": [
    "id",
    "object",
    "status",
    "end_reason",
    "prompt",
    "query",
    "model",
    "queue_position",
    "estimated_start_s",
    "signaling",
    "ice_servers",
    "limits",
    "duration_s",
    "results_summary",
    "failure_diagnostic",
    "usage",
    "created_at",
    "live_started_at",
    "ended_at"
  ],
  "$defs": {
    "MeteringRule": {
      "type": "string",
      "enum": [
        "per_second",
        "per_frame"
      ],
      "description": "PRI-552: settlement rule pinned at admission. Resources created before the cutover report per_second."
    },
    "StreamEndReason": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "completed",
        "canceled",
        "insufficient_credits",
        "error",
        "timeout",
        "ice_failed",
        "media_timeout"
      ],
      "description": "Why the stream ended. completed — normal end after live. canceled — ended before going live (client action). insufficient_credits — balance exhausted. error — server-side failure. timeout — max_session_s cutoff. ice_failed — WebRTC ICE never connected (see failure_diagnostic). media_timeout — connected but no media/results within the first-frame window. A stream that never went live is never `completed`."
    },
    "StreamLimits": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "max_session_s": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "description": "Plan entitlement (max_session_s) — hard session cutoff."
        },
        "warn_at_remaining_s": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "description": "The `warning {remaining_s}` threshold surfaced mid-stream."
        }
      },
      "required": [
        "max_session_s",
        "warn_at_remaining_s"
      ]
    },
    "StreamRecordingState": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "recording",
            "available",
            "failed",
            "none"
          ]
        }
      },
      "required": [
        "status"
      ],
      "description": "PRI-496: recording state — null unless the stream opted in with recording: true at create."
    },
    "StreamSignaling": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "url": {
          "type": "string",
          "description": "Versioned signaling WS. Auth: ?token= accepts a client token (pvct_) or first-party Clerk JWT — NEVER a secret key."
        },
        "expires_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "url",
        "expires_at"
      ],
      "description": "Present while the stream is joinable; null once ended."
    },
    "StreamStatus": {
      "type": "string",
      "enum": [
        "queued",
        "ready",
        "live",
        "ended"
      ],
      "description": "Stream lifecycle state (§4.8): queued → ready → live → ended. Terminal immutable."
    },
    "StreamUsage": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "billed_seconds": {
          "type": "integer",
          "minimum": 0,
          "description": "Settled ledger amount. per_frame streams (PRI-552, the default): derived from the processed-frame count. Historical per_second streams: LIVE-clock derived (join/negotiation free)."
        },
        "credit_balance_after": {
          "type": [
            "integer",
            "null"
          ]
        },
        "metering_rule": {
          "allOf": [
            {
              "$ref": "#/$defs/MeteringRule"
            },
            {
              "description": "PRI-552: the rule this stream settled under. Mirrors the top-level metering_rule for a self-contained terminal summary."
            }
          ]
        },
        "frames": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0,
          "description": "PRI-552: processed-frame count (results_summary.result_frames). Present for both metering rules — frame counting predates the billing cutover; null when unknown."
        }
      },
      "required": [
        "billed_seconds",
        "credit_balance_after"
      ],
      "description": "Terminal only. Same ledger as uploads — one balance."
    }
  }
}

Work with this as data

Every JSON Schema 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 schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • 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 JSON Schema
curl "https://apis.io/api/v1/json-schemas/primateintelligence-ai-stream"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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