---
title: "Prepare a direct Spectra-2 stream"
method: POST
path: "/v1/audio/stream-sessions"
tags: ["Audio"]
---

# Prepare a direct Spectra-2 stream

`POST /v1/audio/stream-sessions`

## Request

- Base URL: `https://speech-api.oruk.ai`
- URL: `https://speech-api.oruk.ai/v1/audio/stream-sessions`
- Auth: HTTP bearer

Server-only setup for one recording in an existing prepared session. Open the returned URL with [protocol, ticket] subprotocols, then use the documented start, PCM16, finish and cancel messages. Finish must precede the original deadline. The result matches the batch schema. No automatic reconnect or inference retry.

## Headers

- `X-Oruk-Session` string, required
- `X-Request-ID` string, required

## Request body

- object
  - `model` 'oruk-spectra-2', required
  - `task` 'transcription' | 'analysis', required

## Response `200`

Prepared connection; no inference has run.

- Spectra2StreamSession
  - `object` 'speech.stream_session', required
  - `model` 'oruk-spectra-2', required
  - `task` 'transcription' | 'analysis', required
  - `request_id` string, required
  - `url` string, uri, required: Open this WebSocket URL from your server. Do not add query parameters.
  - `protocol` 'oruk.spectra2.v1', required
  - `ticket` string, required: Private one-request credential. Send [protocol, ticket] as WebSocket subprotocols; never log it.
  - `expires_at_ms` integer, required: Original prepared-session deadline, as Unix milliseconds.
  - `max_audio_seconds` number, required: Time remaining at setup. Honor the fresher recording limit in the WebSocket ready message.

## Other responses

- `400`: Invalid model, task, session, or request ID.
- `401`: An Oruk API bearer key is required.
- `402`: Insufficient account allowance or credits.
- `403`: Account access is unavailable, or a server-only request was made from a browser.
- `404`: Preparation is unavailable for this session. Choose an ordinary speech request before recording.
- `409`: The session expired or direct streaming is unavailable. Choose a new session or an ordinary stream before recording.
- `429`: Session setup is busy. Wait before preparing another recording.
- `503`: Setup could not be confirmed. No inference was requested; an existing reservation can remain until expiry.

---

[API](https://skmtc.dev/oruk/apis/oruk-speech-api.md) · [All operations](https://skmtc.dev/oruk/apis/oruk-speech-api/llms.txt) · [OpenAPI document](https://skmtc.dev/oruk/apis/oruk-speech-api/revisions/c668cecab401?raw)
