Create a pipeline
Code Mode: praxis.media.pipelines.create
HTTP: POST /media/v1/pipelines
Describe what to run while a stream is live, once, and attach it to as many streams as you like with pipeline_id. A pipeline is an ordered list of elements: processors that read the broadcast and sinks that receive the results. transcribe {language?, hot_words?} turns the speech into transcript.partial and transcript.final events (each carries offset_ms in the stream, end_ms and the wall-clock time at, which is the source’s own PROGRAM-DATE-TIME when it has one and the time received otherwise). describe_frames {interval_s 5 to 300 default 10, prompt?, model?} describes one keyframe every interval_s as a frame.described event; a slow description skips the frames in between, it never queues them. match_keywords {keywords} raises an alert event when a final sentence of the transcript holds one of the words, as a keyword_match alert rule does; the sinks send the results on: webhook {url} posts every event of the stream to your server, signed as Standard Webhooks (the secret whsec_ is shown once, in the response that adds the webhook), and agent {session_id} sends them to an agent session; the events sink is always on. A processor appears once; webhook and agent sinks up to five each. alert_rules holds keyword_match {keywords} and model_judgment {prompt}. A stream runs the pipeline as it was when the broadcast began: editing it changes the next broadcast, not the one on air. Example: {“name”:“jewellery room”,“elements”:[{“type”:“transcribe”,“language”:“zh”},{“type”:“describe_frames”,“interval_s”:20}]}.
Signature
praxis.media.pipelines.create(args:{body:{/** The pipeline's name. e.g. "jewellery room" */ name:string;/** The ordered processors and sinks; empty by default. */ elements?:Array<{/** Which processor or sink this element is. e.g. "transcribe" */ type:"transcribe"|"describe_frames"|"match_keywords"|"events"|"webhook"|"agent";/** transcribe: a language tag such as zh or en-US. e.g. "zh" */ language?:string;/** transcribe: words the recogniser should favour, at most 100. e.g. ["jade"] */ hot_words?:Array<string>;/** describe_frames: seconds between two described frames. e.g. 20 */ interval_s?:number;/** describe_frames: what to ask the model about the frame; the default asks what is happening in the picture in a sentence or two. e.g. "Describe what is happening in the picture in one or two sentences." */ prompt?:string;/** describe_frames: the vision model; omit it to use the platform's default. e.g. "gemini-3.5-flash" */ model?:string;/** match_keywords: the words to look for in the transcript. e.g. ["refund"] */ keywords?:Array<string>;/** webhook: the https or http address results are posted to. e.g. "https://example.com/hook" */ url?:string;/** webhook: a stable name for this webhook inside the pipeline (letters, digits, - and _, up to 64); whk_ followed by its position when you send none. e.g. "whk_0" */ id?:string;/** webhook: the signing secret (whsec_ followed by base64) the receiver verifies each delivery with. e.g. "whsec_k3JvYm90LXNlY3JldC1leGFtcGxlLTAwMDA" */ secret?:string;/** agent: the agent session that receives the results. e.g. "ses_01example" */ session_id?:string}>;/** The alert rules; empty by default. */ alert_rules?:Array<{/** Which rule this is. e.g. "keyword_match" */ type:"keyword_match"|"model_judgment";/** keyword_match: the words that fire it. e.g. ["refund"] */ keywords?:Array<string>;/** model_judgment: the question the model answers. e.g. "Is the anchor promising a refund?" */ prompt?:string;[key:string]:unknown}>}}):Promise<{/** The pipeline's id; msp_ followed by 26 lowercase base32 characters. e.g. "msp_zpnqd7a2kxwg3vhr5tj4bfm6ec" */ id:string;/** Always media.pipeline. e.g. "media.pipeline" */ object:"media.pipeline";/** The pipeline's name. e.g. "jewellery room" */ name:string;/** The ordered processors and sinks. */ elements:Array<{/** Which processor or sink this element is. e.g. "transcribe" */ type:"transcribe"|"describe_frames"|"match_keywords"|"events"|"webhook"|"agent";/** transcribe: a language tag such as zh or en-US. e.g. "zh" */ language?:string;/** transcribe: words the recogniser should favour, at most 100. e.g. ["jade"] */ hot_words?:Array<string>;/** describe_frames: seconds between two described frames. e.g. 20 */ interval_s?:number;/** describe_frames: what to ask the model about the frame; the default asks what is happening in the picture in a sentence or two. e.g. "Describe what is happening in the picture in one or two sentences." */ prompt?:string;/** describe_frames: the vision model; omit it to use the platform's default. e.g. "gemini-3.5-flash" */ model?:string;/** match_keywords: the words to look for in the transcript. e.g. ["refund"] */ keywords?:Array<string>;/** webhook: the https or http address results are posted to. e.g. "https://example.com/hook" */ url?:string;/** webhook: a stable name for this webhook inside the pipeline (letters, digits, - and _, up to 64); whk_ followed by its position when you send none. e.g. "whk_0" */ id?:string;/** webhook: the signing secret (whsec_ followed by base64) the receiver verifies each delivery with. e.g. "whsec_k3JvYm90LXNlY3JldC1leGFtcGxlLTAwMDA" */ secret?:string;/** agent: the agent session that receives the results. e.g. "ses_01example" */ session_id?:string}>;/** The alert rules. */ alert_rules:Array<{/** Which rule this is. e.g. "keyword_match" */ type:"keyword_match"|"model_judgment";/** keyword_match: the words that fire it. e.g. ["refund"] */ keywords?:Array<string>;/** model_judgment: the question the model answers. e.g. "Is the anchor promising a refund?" */ prompt?:string;[key:string]:unknown}>;/** When the pipeline was created. e.g. "2026-11-28T10:00:00.000Z" */ created_at:string;/** When it last changed. e.g. "2026-11-28T10:00:00.000Z" */ updated_at:string}>;Request body
| Required | Content types | Description |
|---|---|---|
| yes | application/json |
Responses
| Status | Content types | Description |
|---|---|---|
| 201 | application/json | The pipeline. |
| 400 | application/json | A field is invalid: the error names it (for example elements[0].interval_s outside 5 to 300, or a second transcribe element). Correct that field and send again. |
| 401 | application/json | The request carries no valid API key or session. Send a key of your organization. |
| 404 | application/json | Media Streams is not released for your organization (flag media-streams-public is off). |