# Finalize streaming session

- **Method:** `POST`
- **Path:** `/api/v1/streaming/{session_id}/finalize`
- **Operation ID:** `finalize_streaming_session_api_v1_streaming__session_id__finalize_post`
- **Tags:** Streaming

Collect all streamed audio into a complete WAV and return as base64.

Waits for generation to complete, concatenates all chunks, stores the
result as the last generation result, and removes the session.
Call this after the audio stream finishes to get the full audio.

## Effective servers

- `http://127.0.0.1:8100`

  Voice Creator Pro on this computer

## Path parameters

- **`session_id` (required)**: `string`

## Responses

### 200 Successful Response

**Content type:** `application/json`

schema: `GenerationResult`

- **`status` (required)**: `string`

  Human-readable status message
- **`success` (required)**: `boolean`

  Whether generation completed successfully
- **`audio_base64`**: `string | null`

  Base64-encoded audio output (WAV format)
- **`error_code`**: `string | null`

  Machine-readable failure code when success is false
- **`error_detail`**: `string | null`

  Extra detail for the failure code

**Example:**

```json
{
  "success": true,
  "status": "Generated successfully",
  "audio_base64": "UklGRi4AAABXQVZFZm10IBAAAA...",
  "error_code": "language_unsupported",
  "error_detail": ""
}
```

### 404 Session not found or expired.

### 422 Validation Error

**Content type:** `application/json`

schema: `HTTPValidationError`

- **`detail`**: `array`

  **Items:**

  schema: `ValidationError`
  - **`loc` (required)**: `array of (string | integer)`
  - **`msg` (required)**: `string`
  - **`type` (required)**: `string`
  - **`ctx`**: `object`
  - **`input`**: `any`

**Example:**

```json
{
  "detail": [
    {
      "loc": [
        ""
      ],
      "msg": "",
      "type": "",
      "input": null,
      "ctx": {}
    }
  ]
}
```

## Schemas

- `GenerationResult` — shown above.
- `HTTPValidationError` — shown above.
- `ValidationError` — shown above.
