> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.cloudraker.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.cloudraker.com/_mcp/server.

# Stop a realtime transcription

POST https://api.cloudraker.com/v1/realtime/transcriptions/{id}/stop

Stops the session. The decoder finishes the current utterance, the client gets its last finals, and the socket closes. A stop on a closed session answers `202` too.

**Learn more:** [Realtime transcription](https://docs.cloudraker.com/capabilities/realtime-transcription)

Reference: https://docs.cloudraker.com/paperwork/api/realtime-transcriptions/stop-realtime-transcription

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `id` (string, required)

## Response

### 202

The session, now closing or already closed.

- `object` ("realtime_transcription", required)
- `id` (string, required)
- `status` (enum, required)
  - Allowed values: `created`, `active`, `closing`, `closed`, `expired`, `failed`
- `closeReason` (enum, required, nullable)
  - Allowed values: `client_end`, `stopped`, `idle_timeout`, `max_duration`, `credits_exhausted`, `worker_unavailable`, `too_fast`, `internal_error`
- `audio` (RealtimeTranscriptionAudio, required)
- `maxDurationSeconds` (integer, required)
- `audioSeconds` (double, required) — Received audio, in seconds.
- `billedMinutes` (integer, required) — Minutes charged so far.
- `finalPass` (RealtimeTranscriptionFinalPass, required)
- `metadata` (map from string to string, required, nullable)
- `createdAt` (datetime, required)
- `connectedAt` (datetime, required, nullable)
- `closedAt` (datetime, required, nullable)
- `connectBy` (datetime, required, nullable) — Connect before this time, or the session expires. Null once a client connected.
- `websocket` (RealtimeTranscriptionTicket, optional) — Only in the create response.

## Errors

### 401 Unauthorized Error

Missing or invalid credential.

- `any`

### 403 Forbidden Error

The credential may not use the /v1 API.

- `any`

### 404 Not Found Error

Unknown id, or another API key created it.

- `any`

### 429 Too Many Requests Error

Rate limited. The `/v1` API allows at least **67 requests per minute per organization** (about 1,000 requests per 15 minutes) — a guaranteed floor, enforced per edge location, so a geographically spread caller may get more. Wait for the `Retry-After` interval and retry — the error is `retryable`.

- `code` (enum, required)
  - Allowed values: `rate_limited`
- `message` (string, required)
- `retryable` (boolean, required)
- `requestId` (string, required)
- `docUrl` (string, optional)

## Types

### RealtimeTranscriptionAudio

- `encoding` ("pcm_s16le", required)
- `sampleRate` (double, required)
- `channels` (double, required)

### RealtimeTranscriptionFinalPass

- `enabled` (boolean, required)
- `status` (enum, required)
  - Allowed values: `disabled`, `recording`, `uploading`, `processing`, `ready`, `failed`, `skipped`
- `fileId` (string, required, nullable) — A normal /v1 file (`GET /v1/files/{id}`).

### RealtimeTranscriptionTicket

Only in the create response.

- `object` ("realtime_transcription_ticket", required)
- `url` (string, required) — The `wss://` URL to open. It carries a single-use ticket that expires after 60 seconds.
- `expiresAt` (datetime, required)

## Examples

**Response**

```json
{
  "object": "string",
  "id": "rtt_01KZ0000000000000000000000",
  "status": "created",
  "closeReason": "client_end",
  "audio": {
    "encoding": "string",
    "sampleRate": 1.1,
    "channels": 1.1
  },
  "maxDurationSeconds": 1,
  "audioSeconds": 1.1,
  "billedMinutes": 1,
  "finalPass": {
    "enabled": true,
    "status": "disabled",
    "fileId": "string"
  },
  "metadata": {},
  "createdAt": "2024-01-15T09:30:00Z",
  "connectedAt": "2024-01-15T09:30:00Z",
  "closedAt": "2024-01-15T09:30:00Z",
  "connectBy": "2024-01-15T09:30:00Z",
  "websocket": {
    "object": "string",
    "url": "string",
    "expiresAt": "2024-01-15T09:30:00Z"
  }
}
```

**SDK Code**

```typescript
import { CloudRakerClient } from "@cloudraker/api";

async function main() {
    const client = new CloudRakerClient({
        token: "YOUR_TOKEN_HERE",
    });
    await client.realtimeTranscriptions.stopRealtimeTranscription({
        id: "id",
    });
}
main();

```

```python
from cloudraker import CloudRaker

client = CloudRaker(
    token="YOUR_TOKEN_HERE",
)

client.realtime_transcriptions.stop_realtime_transcription(
    id="id",
)

```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.cloudraker.com/v1/realtime/transcriptions/id/stop"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.cloudraker.com/v1/realtime/transcriptions/id/stop")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.cloudraker.com/v1/realtime/transcriptions/id/stop")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.cloudraker.com/v1/realtime/transcriptions/id/stop', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.cloudraker.com/v1/realtime/transcriptions/id/stop");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.cloudraker.com/v1/realtime/transcriptions/id/stop")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```