> For clean Markdown of any page, append `.md` to the page URL. > For a complete documentation index, see https://docs.sarvam.ai/llms.txt. > For full documentation content in one file, see https://docs.sarvam.ai/llms-full.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server. # Batch - Start Job POST https://api.sarvam.ai/speech-to-text/job/v1/{job_id}/start Start processing a speech to text bulk job after all audio files have been uploaded Reference: https://docs.sarvam.ai/api-reference/speech-to-text/stt/job/start ## Authentication - `api-subscription-key` header (required) — API Key authentication via header ## Request ### Path parameters - `job_id` (string, required) — The unique identifier of the job ### Query parameters - `ptu_id` (integer, optional, nullable) ### Headers - `api-subscription-key` (string, optional, default: ) — Your unique subscription key for authenticating requests to the Sarvam AI Speech-to-Text API. [Here are the steps to get your api key](https://docs.sarvam.ai/api-reference-docs/authentication#obtaining-your-api-subscription-key) ## Response ### 200 Successful Response - `job_state` (enum, required) — Job State - Allowed values: `Accepted`, `Pending`, `Running`, `Completed`, `Failed` - `created_at` (string, required) — Created At - `updated_at` (string, required) — Updated At - `job_id` (string, required) — Job Id - `storage_container_type` (enum, required) — Storage Container Type - Allowed values: `Azure`, `Local`, `Google`, `Azure_V1` - `total_files` (integer, optional, default: 0) — Total Files - `successful_files_count` (integer, optional, default: 0) — Success Count - `failed_files_count` (integer, optional, default: 0) — Failed Count - `error_message` (string, optional, default: ) — Error Message - `job_details` (list of TaskDetail, optional) — Job details at file level. ## Errors ### 400 Bad Request Error Bad Request - `error` (ErrorDetails, required) — Error details ### 403 Forbidden Error Forbidden - `error` (ErrorDetails, required) — Error details ### 422 Unprocessable Entity Error Unprocessable Entity - `error` (ErrorDetails, required) — Error details ### 429 Too Many Requests Error Quota Exceeded - `error` (ErrorDetails, required) — Error details ### 500 Internal Server Error Internal Server Error - `error` (ErrorDetails, required) — Error details ### 503 Service Unavailable Error Service Overloaded - `error` (ErrorDetails, required) — Error details ## Types ### TaskDetail - `inputs` (list of TaskFileDetails, optional) - `outputs` (list of TaskFileDetails, optional) - `state` (enum, optional) - Allowed values: `Success`, `API Error`, `Internal Server Error` - `error_message` (string, optional, nullable) - `exception_name` (string, optional, nullable) ### ErrorDetails - `message` (string, required) — Message describing the error - `code` (enum, required) — Error code for the specific error that has occurred. Refer to the error code documentation for more details. - Allowed values: `invalid_request_error`, `internal_server_error`, `unprocessable_entity_error`, `insufficient_quota_error`, `invalid_api_key_error`, `authentication_error`, `rate_limit_exceeded_error`, `not_found_error` - `request_id` (string, optional, default: ) — Unique identifier for the request. Format: date_UUID4 ### TaskFileDetails - `file_name` (string, required) - `file_id` (string, required) ## Examples **Response** ```json { "job_state": "Running", "created_at": "2025-01-01T10:00:00Z", "updated_at": "2025-01-01T10:01:00Z", "job_id": "job_9f8b7c6d5e4a3b2c1d0e", "storage_container_type": "Azure_V1", "total_files": 1, "successful_files_count": 0, "failed_files_count": 0 } ``` **SDK Code** ```python speechToTextJob_start_example import requests url = "https://api.sarvam.ai/speech-to-text/job/v1/job_id/start" headers = {"api-subscription-key": ""} response = requests.post(url, headers=headers) print(response.json()) ``` ```javascript speechToTextJob_start_example const url = 'https://api.sarvam.ai/speech-to-text/job/v1/job_id/start'; const options = {method: 'POST', headers: {'api-subscription-key': ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go speechToTextJob_start_example package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.sarvam.ai/speech-to-text/job/v1/job_id/start" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("api-subscription-key", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby speechToTextJob_start_example require 'uri' require 'net/http' url = URI("https://api.sarvam.ai/speech-to-text/job/v1/job_id/start") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["api-subscription-key"] = '' response = http.request(request) puts response.read_body ``` ```java speechToTextJob_start_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.sarvam.ai/speech-to-text/job/v1/job_id/start") .header("api-subscription-key", "") .asString(); ``` ```php speechToTextJob_start_example request('POST', 'https://api.sarvam.ai/speech-to-text/job/v1/job_id/start', [ 'headers' => [ 'api-subscription-key' => '', ], ]); echo $response->getBody(); ``` ```csharp speechToTextJob_start_example using RestSharp; var client = new RestClient("https://api.sarvam.ai/speech-to-text/job/v1/job_id/start"); var request = new RestRequest(Method.POST); request.AddHeader("api-subscription-key", ""); IRestResponse response = client.Execute(request); ``` ```swift speechToTextJob_start_example import Foundation let headers = ["api-subscription-key": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.sarvam.ai/speech-to-text/job/v1/job_id/start")! 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() ```