> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.resemble.ai/api-reference/recordings/create-recording/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.resemble.ai/_mcp/server. # Create recording POST https://app.resemble.ai/api/v2/voices/{voice_uuid}/recordings Content-Type: multipart/form-data Upload a new recording for voice training Reference: https://docs.resemble.ai/api-reference/recordings/create-recording ## Authentication - `Authorization` header (bearer token, required) — API key from https://app.resemble.ai/hub/api ## Request ### Path parameters - `voice_uuid` (string, required) ### Body (multipart/form-data) This endpoint expects a multipart form containing a file. - `file` (file, required) — Audio file (WAV recommended, 1-12 seconds) - `name` (string, required) — Display name - `text` (string, required) — Transcript of the clip - `emotion` (string, required) — Emotion label - `is_active` (boolean, required) — Include in training - `fill` (boolean, optional) — Include for Resemble Fill ## Response ### 200 Recording created - `success` (boolean, optional) - `item` (VoicesVoiceUuidRecordingsPostResponsesContentApplicationJsonSchemaItem, optional) ## Types ### VoicesVoiceUuidRecordingsPostResponsesContentApplicationJsonSchemaItem ## Examples **Request** ```json { "file": "", "name": "string", "text": "string", "emotion": "string", "is_active": true } ``` **Response** ```json { "success": true, "item": {} } ``` **SDK Code** ```python import requests url = "https://app.resemble.ai/api/v2/voices/voice_uuid/recordings" files = { "file": "open('string', 'rb')" } payload = { "name": "string", "text": "string", "emotion": "string", "is_active": "true", "fill": } headers = {"Authorization": "Bearer "} response = requests.post(url, data=payload, files=files, headers=headers) print(response.json()) ``` ```javascript const url = 'https://app.resemble.ai/api/v2/voices/voice_uuid/recordings'; const form = new FormData(); form.append('file', 'string'); form.append('name', 'string'); form.append('text', 'string'); form.append('emotion', 'string'); form.append('is_active', 'true'); form.append('fill', ''); const options = {method: 'POST', headers: {Authorization: 'Bearer '}}; options.body = form; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://app.resemble.ai/api/v2/voices/voice_uuid/recordings" payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"emotion\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"is_active\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fill\"\r\n\r\n\r\n-----011000010111000001101001--\r\n") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") 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://app.resemble.ai/api/v2/voices/voice_uuid/recordings") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"emotion\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"is_active\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fill\"\r\n\r\n\r\n-----011000010111000001101001--\r\n" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://app.resemble.ai/api/v2/voices/voice_uuid/recordings") .header("Authorization", "Bearer ") .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"emotion\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"is_active\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fill\"\r\n\r\n\r\n-----011000010111000001101001--\r\n") .asString(); ``` ```php request('POST', 'https://app.resemble.ai/api/v2/voices/voice_uuid/recordings', [ 'multipart' => [ [ 'name' => 'file', 'filename' => 'string', 'contents' => null ], [ 'name' => 'name', 'contents' => 'string' ], [ 'name' => 'text', 'contents' => 'string' ], [ 'name' => 'emotion', 'contents' => 'string' ], [ 'name' => 'is_active', 'contents' => 'true' ] ] 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://app.resemble.ai/api/v2/voices/voice_uuid/recordings"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddParameter("undefined", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"emotion\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"is_active\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fill\"\r\n\r\n\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": "Bearer "] let parameters = [ [ "name": "file", "fileName": "string" ], [ "name": "name", "value": "string" ], [ "name": "text", "value": "string" ], [ "name": "emotion", "value": "string" ], [ "name": "is_active", "value": "true" ], [ "name": "fill", "value": ] ] let boundary = "---011000010111000001101001" var body = "" var error: NSError? = nil for param in parameters { let paramName = param["name"]! body += "--\(boundary)\r\n" body += "Content-Disposition:form-data; name=\"\(paramName)\"" if let filename = param["fileName"] { let contentType = param["content-type"]! let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8) if (error != nil) { print(error as Any) } body += "; filename=\"\(filename)\"\r\n" body += "Content-Type: \(contentType)\r\n\r\n" body += fileContent } else if let paramValue = param["value"] { body += "\r\n\r\n\(paramValue)" } } let request = NSMutableURLRequest(url: NSURL(string: "https://app.resemble.ai/api/v2/voices/voice_uuid/recordings")! 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() ```