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

# Upload Batch Manifest File

POST https://api.sofer.ai/v1/transcriptions/batch-files
Content-Type: application/json

Upload a batch manifest containing audio URLs for standard mode batch processing.

**Workflow:**
1. Upload your manifest here to get a `batch_file_id`
2. Use that ID in [Create Batch Transcription](/api-reference/batch-transcribe/create-batch-transcription) with `processing_mode: "standard"`

The manifest is a list of audio sources (max 500), each with a URL and optional title or `client_item_id`. If you provide `client_item_id`, it must be unique within the manifest. You can provide it as a JSON array or JSONL format. If you need higher limits, contact support@sofer.ai.

Reference: https://docs.sofer.ai/api-reference/batch-transcribe/upload-batch-file

## Authentication

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

## Request

### Body (application/json)

This endpoint expects a BatchFileUploadRequest.

- `content_type` (enum, required) — Format of your manifest data
  - Allowed values: `json`, `jsonl`
- `json_items` (list of BatchManifestAudioSource, optional) — **For JSON format.** Array of audio sources to transcribe (max 500). If you need higher limits, contact support@sofer.ai.
- `jsonl` (string, optional) — **For JSONL format.** One audio source per line as JSON, separated by newlines (max 500 lines). If you need higher limits, contact [support@sofer.ai](mailto:support@sofer.ai). Example: `{"audio_url": "https://..."}\n{"audio_url": "https://..."}`
- `metadata` (BatchFileMetadata, optional) — Optional title and description for this manifest

## Response

### 200

- `batch_file_id` (UUID, required) — Use this ID when calling [Create Batch Transcription](/api-reference/batch-transcribe/create-batch-transcription) with standard mode
- `item_count` (integer, required) — Number of audio sources in the manifest
- `size_bytes` (integer, required) — Size of the manifest in bytes
- `created_at` (datetime, required) — Upload timestamp
- `status` (enum, required) — Validation status. Wait for `VALID` before starting a batch.
  - Allowed values: `PENDING_VALIDATION`, `VALID`, `INVALID`
- `checksum` (string, optional) — SHA256 checksum of the manifest
- `validation_errors` (list of string, optional) — If status is `INVALID`, lists what's wrong with the manifest

## Errors

### 401 Authentication Error

Authentication error

### 429 Rate Limit Error

Rate limit exceeded, or you have used up your quota

## Types

### BatchManifestAudioSource

A single audio file in a batch manifest upload. Per-item speaker settings take precedence over the batch-level speaker settings provided when creating the batch transcription.

- `audio_url` (string, required) — Direct download URL to the audio file (MP3, WAV, etc.)
- `title` (string, optional) — Title for this transcription. Falls back to batch_title or auto-generated "Item 1", "Item 2", etc.
- `client_item_id` (string, optional) — Caller-defined identifier for this batch item. Must be unique within the manifest. Use this to map the item back to the resulting transcription later.
- `num_speakers` (integer, optional) — Expected number of speakers for this specific file. Mutually exclusive with `auto_detect_speakers`. If provided, this overrides the batch-level speaker setting for this item. Values greater than 1 add **$0.30/hour**.
- `auto_detect_speakers` (boolean, optional) — Automatically detect the number of speakers for this specific file. Mutually exclusive with `num_speakers`. If provided, this overrides the batch-level speaker setting for this item. Auto-detection adds **$0.30/hour**.

### BatchFileMetadata

Optional metadata for organizing batch files.

- `title` (string, optional) — Name for this batch manifest
- `description` (string, optional) — Notes or description

## Examples

### json_format

Upload a manifest as a JSON array

**Request**

```json
{
  "content_type": "json",
  "json_items": [
    {
      "audio_url": "https://example.com/shiur1.mp3",
      "title": "Parshas Bereishis - Rabbi Cohen",
      "client_item_id": "bereishis"
    },
    {
      "audio_url": "https://example.com/shiur2.mp3",
      "title": "Parshas Noach - Rabbi Cohen",
      "client_item_id": "noach"
    },
    {
      "audio_url": "https://example.com/shiur3.mp3",
      "title": "Parshas Lech Lecha - Rabbi Cohen",
      "client_item_id": "lech_lecha"
    }
  ],
  "metadata": {
    "title": "Rabbi Cohen Weekly Parsha Series",
    "description": "Shiurim from Fall 2024"
  }
}
```

**Response**

```json
{
  "batch_file_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "item_count": 3,
  "size_bytes": 256,
  "created_at": "2024-01-15T09:30:00Z",
  "status": "VALID"
}
```

**SDK Code**

```python json_format
import requests

url = "https://api.sofer.ai/v1/transcriptions/batch-files"

payload = {
    "content_type": "json",
    "json_items": [
        {
            "audio_url": "https://example.com/shiur1.mp3",
            "title": "Parshas Bereishis - Rabbi Cohen",
            "client_item_id": "bereishis"
        },
        {
            "audio_url": "https://example.com/shiur2.mp3",
            "title": "Parshas Noach - Rabbi Cohen",
            "client_item_id": "noach"
        },
        {
            "audio_url": "https://example.com/shiur3.mp3",
            "title": "Parshas Lech Lecha - Rabbi Cohen",
            "client_item_id": "lech_lecha"
        }
    ],
    "metadata": {
        "title": "Rabbi Cohen Weekly Parsha Series",
        "description": "Shiurim from Fall 2024"
    }
}
headers = {
    "Authorization": "Bearer <apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript json_format
const url = 'https://api.sofer.ai/v1/transcriptions/batch-files';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <apiKey>', 'Content-Type': 'application/json'},
  body: '{"content_type":"json","json_items":[{"audio_url":"https://example.com/shiur1.mp3","title":"Parshas Bereishis - Rabbi Cohen","client_item_id":"bereishis"},{"audio_url":"https://example.com/shiur2.mp3","title":"Parshas Noach - Rabbi Cohen","client_item_id":"noach"},{"audio_url":"https://example.com/shiur3.mp3","title":"Parshas Lech Lecha - Rabbi Cohen","client_item_id":"lech_lecha"}],"metadata":{"title":"Rabbi Cohen Weekly Parsha Series","description":"Shiurim from Fall 2024"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go json_format
package main

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

func main() {

	url := "https://api.sofer.ai/v1/transcriptions/batch-files"

	payload := strings.NewReader("{\n  \"content_type\": \"json\",\n  \"json_items\": [\n    {\n      \"audio_url\": \"https://example.com/shiur1.mp3\",\n      \"title\": \"Parshas Bereishis - Rabbi Cohen\",\n      \"client_item_id\": \"bereishis\"\n    },\n    {\n      \"audio_url\": \"https://example.com/shiur2.mp3\",\n      \"title\": \"Parshas Noach - Rabbi Cohen\",\n      \"client_item_id\": \"noach\"\n    },\n    {\n      \"audio_url\": \"https://example.com/shiur3.mp3\",\n      \"title\": \"Parshas Lech Lecha - Rabbi Cohen\",\n      \"client_item_id\": \"lech_lecha\"\n    }\n  ],\n  \"metadata\": {\n    \"title\": \"Rabbi Cohen Weekly Parsha Series\",\n    \"description\": \"Shiurim from Fall 2024\"\n  }\n}")

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

	req.Header.Add("Authorization", "Bearer <apiKey>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

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

url = URI("https://api.sofer.ai/v1/transcriptions/batch-files")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"content_type\": \"json\",\n  \"json_items\": [\n    {\n      \"audio_url\": \"https://example.com/shiur1.mp3\",\n      \"title\": \"Parshas Bereishis - Rabbi Cohen\",\n      \"client_item_id\": \"bereishis\"\n    },\n    {\n      \"audio_url\": \"https://example.com/shiur2.mp3\",\n      \"title\": \"Parshas Noach - Rabbi Cohen\",\n      \"client_item_id\": \"noach\"\n    },\n    {\n      \"audio_url\": \"https://example.com/shiur3.mp3\",\n      \"title\": \"Parshas Lech Lecha - Rabbi Cohen\",\n      \"client_item_id\": \"lech_lecha\"\n    }\n  ],\n  \"metadata\": {\n    \"title\": \"Rabbi Cohen Weekly Parsha Series\",\n    \"description\": \"Shiurim from Fall 2024\"\n  }\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.sofer.ai/v1/transcriptions/batch-files")
  .header("Authorization", "Bearer <apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"content_type\": \"json\",\n  \"json_items\": [\n    {\n      \"audio_url\": \"https://example.com/shiur1.mp3\",\n      \"title\": \"Parshas Bereishis - Rabbi Cohen\",\n      \"client_item_id\": \"bereishis\"\n    },\n    {\n      \"audio_url\": \"https://example.com/shiur2.mp3\",\n      \"title\": \"Parshas Noach - Rabbi Cohen\",\n      \"client_item_id\": \"noach\"\n    },\n    {\n      \"audio_url\": \"https://example.com/shiur3.mp3\",\n      \"title\": \"Parshas Lech Lecha - Rabbi Cohen\",\n      \"client_item_id\": \"lech_lecha\"\n    }\n  ],\n  \"metadata\": {\n    \"title\": \"Rabbi Cohen Weekly Parsha Series\",\n    \"description\": \"Shiurim from Fall 2024\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.sofer.ai/v1/transcriptions/batch-files', [
  'body' => '{
  "content_type": "json",
  "json_items": [
    {
      "audio_url": "https://example.com/shiur1.mp3",
      "title": "Parshas Bereishis - Rabbi Cohen",
      "client_item_id": "bereishis"
    },
    {
      "audio_url": "https://example.com/shiur2.mp3",
      "title": "Parshas Noach - Rabbi Cohen",
      "client_item_id": "noach"
    },
    {
      "audio_url": "https://example.com/shiur3.mp3",
      "title": "Parshas Lech Lecha - Rabbi Cohen",
      "client_item_id": "lech_lecha"
    }
  ],
  "metadata": {
    "title": "Rabbi Cohen Weekly Parsha Series",
    "description": "Shiurim from Fall 2024"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp json_format
using RestSharp;

var client = new RestClient("https://api.sofer.ai/v1/transcriptions/batch-files");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"content_type\": \"json\",\n  \"json_items\": [\n    {\n      \"audio_url\": \"https://example.com/shiur1.mp3\",\n      \"title\": \"Parshas Bereishis - Rabbi Cohen\",\n      \"client_item_id\": \"bereishis\"\n    },\n    {\n      \"audio_url\": \"https://example.com/shiur2.mp3\",\n      \"title\": \"Parshas Noach - Rabbi Cohen\",\n      \"client_item_id\": \"noach\"\n    },\n    {\n      \"audio_url\": \"https://example.com/shiur3.mp3\",\n      \"title\": \"Parshas Lech Lecha - Rabbi Cohen\",\n      \"client_item_id\": \"lech_lecha\"\n    }\n  ],\n  \"metadata\": {\n    \"title\": \"Rabbi Cohen Weekly Parsha Series\",\n    \"description\": \"Shiurim from Fall 2024\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift json_format
import Foundation

let headers = [
  "Authorization": "Bearer <apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "content_type": "json",
  "json_items": [
    [
      "audio_url": "https://example.com/shiur1.mp3",
      "title": "Parshas Bereishis - Rabbi Cohen",
      "client_item_id": "bereishis"
    ],
    [
      "audio_url": "https://example.com/shiur2.mp3",
      "title": "Parshas Noach - Rabbi Cohen",
      "client_item_id": "noach"
    ],
    [
      "audio_url": "https://example.com/shiur3.mp3",
      "title": "Parshas Lech Lecha - Rabbi Cohen",
      "client_item_id": "lech_lecha"
    ]
  ],
  "metadata": [
    "title": "Rabbi Cohen Weekly Parsha Series",
    "description": "Shiurim from Fall 2024"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sofer.ai/v1/transcriptions/batch-files")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```

### jsonl_format

Upload a manifest as JSONL (one JSON object per line)

**Request**

```json
{
  "content_type": "jsonl",
  "jsonl": "{\"audio_url\": \"https://example.com/shiur1.mp3\", \"title\": \"Shiur 1\", \"client_item_id\": \"shiur_1\"}\n{\"audio_url\": \"https://example.com/shiur2.mp3\", \"title\": \"Shiur 2\", \"client_item_id\": \"shiur_2\"}"
}
```

**Response**

```json
{
  "batch_file_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "item_count": 2,
  "size_bytes": 128,
  "created_at": "2024-01-15T09:30:00Z",
  "status": "VALID"
}
```

**SDK Code**

```python jsonl_format
import requests

url = "https://api.sofer.ai/v1/transcriptions/batch-files"

payload = {
    "content_type": "jsonl",
    "jsonl": "{\"audio_url\": \"https://example.com/shiur1.mp3\", \"title\": \"Shiur 1\", \"client_item_id\": \"shiur_1\"}
{\"audio_url\": \"https://example.com/shiur2.mp3\", \"title\": \"Shiur 2\", \"client_item_id\": \"shiur_2\"}"
}
headers = {
    "Authorization": "Bearer <apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript jsonl_format
const url = 'https://api.sofer.ai/v1/transcriptions/batch-files';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <apiKey>', 'Content-Type': 'application/json'},
  body: '{"content_type":"jsonl","jsonl":"{\"audio_url\": \"https://example.com/shiur1.mp3\", \"title\": \"Shiur 1\", \"client_item_id\": \"shiur_1\"}\n{\"audio_url\": \"https://example.com/shiur2.mp3\", \"title\": \"Shiur 2\", \"client_item_id\": \"shiur_2\"}"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go jsonl_format
package main

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

func main() {

	url := "https://api.sofer.ai/v1/transcriptions/batch-files"

	payload := strings.NewReader("{\n  \"content_type\": \"jsonl\",\n  \"jsonl\": \"{\\\"audio_url\\\": \\\"https://example.com/shiur1.mp3\\\", \\\"title\\\": \\\"Shiur 1\\\", \\\"client_item_id\\\": \\\"shiur_1\\\"}\\n{\\\"audio_url\\\": \\\"https://example.com/shiur2.mp3\\\", \\\"title\\\": \\\"Shiur 2\\\", \\\"client_item_id\\\": \\\"shiur_2\\\"}\"\n}")

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

	req.Header.Add("Authorization", "Bearer <apiKey>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

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

url = URI("https://api.sofer.ai/v1/transcriptions/batch-files")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"content_type\": \"jsonl\",\n  \"jsonl\": \"{\\\"audio_url\\\": \\\"https://example.com/shiur1.mp3\\\", \\\"title\\\": \\\"Shiur 1\\\", \\\"client_item_id\\\": \\\"shiur_1\\\"}\\n{\\\"audio_url\\\": \\\"https://example.com/shiur2.mp3\\\", \\\"title\\\": \\\"Shiur 2\\\", \\\"client_item_id\\\": \\\"shiur_2\\\"}\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.sofer.ai/v1/transcriptions/batch-files")
  .header("Authorization", "Bearer <apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"content_type\": \"jsonl\",\n  \"jsonl\": \"{\\\"audio_url\\\": \\\"https://example.com/shiur1.mp3\\\", \\\"title\\\": \\\"Shiur 1\\\", \\\"client_item_id\\\": \\\"shiur_1\\\"}\\n{\\\"audio_url\\\": \\\"https://example.com/shiur2.mp3\\\", \\\"title\\\": \\\"Shiur 2\\\", \\\"client_item_id\\\": \\\"shiur_2\\\"}\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.sofer.ai/v1/transcriptions/batch-files', [
  'body' => '{
  "content_type": "jsonl",
  "jsonl": "{\\"audio_url\\": \\"https://example.com/shiur1.mp3\\", \\"title\\": \\"Shiur 1\\", \\"client_item_id\\": \\"shiur_1\\"}\\n{\\"audio_url\\": \\"https://example.com/shiur2.mp3\\", \\"title\\": \\"Shiur 2\\", \\"client_item_id\\": \\"shiur_2\\"}"
}',
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp jsonl_format
using RestSharp;

var client = new RestClient("https://api.sofer.ai/v1/transcriptions/batch-files");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"content_type\": \"jsonl\",\n  \"jsonl\": \"{\\\"audio_url\\\": \\\"https://example.com/shiur1.mp3\\\", \\\"title\\\": \\\"Shiur 1\\\", \\\"client_item_id\\\": \\\"shiur_1\\\"}\\n{\\\"audio_url\\\": \\\"https://example.com/shiur2.mp3\\\", \\\"title\\\": \\\"Shiur 2\\\", \\\"client_item_id\\\": \\\"shiur_2\\\"}\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift jsonl_format
import Foundation

let headers = [
  "Authorization": "Bearer <apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "content_type": "jsonl",
  "jsonl": "{\"audio_url\": \"https://example.com/shiur1.mp3\", \"title\": \"Shiur 1\", \"client_item_id\": \"shiur_1\"}
{\"audio_url\": \"https://example.com/shiur2.mp3\", \"title\": \"Shiur 2\", \"client_item_id\": \"shiur_2\"}"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sofer.ai/v1/transcriptions/batch-files")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```