API
Digital Human Configuration
Update a Digital Human
6 min
this documentation explains how to update an existing digital human head configuration using the platform api the process to updating a digital human is very similar to that detailed in create a digital human docid\ hoboropyem9tuenmqcf s except that the put head/update endpoint is used, and instead of using the headvisualid as the primary identifier, the headid generated after creating the digital human is used endpoint url https //platform api unith ai/head/update method put description this endpoint allows you to modify the configuration of a digital human head important note on partial updates the request body for this endpoint should only contain the parameters you wish to update do not include the entire default request body or any fields with "string" as their value sending an empty or incomplete body can lead to unintended configuration changes or errors for a detailed explanation of each available parameter, please refer to the digital human configuration parameters docid\ qi6kwaiqafhoaqaan5nkg update head payload { "id" "3fa85f64 5717 4562 b3fc 2c963f66afa6", "orgpublicid" "string", "name" "string", "alias" "string", "language" "string", "languagespeechrecognition" "string", "ttsprovider" "string", "operationmode" "ttt", "promptconfig" { "system prompt" "string" }, "ttsvoice" "string", "greetings" "string", "voiceflowapikey" "string", "israndomsuggestions" true, "phrases" \[], "suggestions" \[ "string" ], "customwords" {} } example updating an existing digital human's voice to update only the voice and tts provider for an existing digital human, your request body should only contain the id, ttsprovider, and ttsvoice parameters for more information on available voice options and their capabilities, please visit voice connectors docid 7b9hwomcbm mr7ogi7r1e curl x 'put' \\ 'https //platform api unith ai/head/update' \\ h 'accept application/json' \\ h 'authorization bearer yourbearertoken' \\ h 'content type application/json' \\ d '{ "id" "yourheadid", "ttsprovider" "ttsprovider of your choice", "ttsvoice" "voiceid" }' replace yourheadid, ttsprovider of your choice, and voiceid with the appropriate values for your configuration if you are using the get /head/{id} endpoint before updating your digital human, you must first filter out certain parameters from the response this is essential, as including them in the subsequent update will cause the process to fail please follow the instructions below you can use the endpoint /head/{id} to get the complete configuration of your digital human curl x 'get' \\ 'https //platform api unith ai/head/yourheadid' \\ h 'accept application/json' \\ h 'authorization bearer yourbearer' please filter out the following parameters from the response before updating the digital human if any of these parameters are accidentally included in the request, they will be ignored and their values will remain unchanged createdat updatedat publicid promptconfig id documentjsondto documenturl encodedpath iconconfig headvisualid isactive orgid orgpublicid allowedorigins allowediframeorigins videocache conversationsettings splitter expirationseconds ttsstream organisation { id createdat updatedat apikey name publicid alias subscriptiontype slots streaming isactive } headvisualvideourl postervideoimage ttsdisplayname for example, a correct put /head/update request after filtering would look like this { "id" "yourheadid", "name" "digitalhumanname", "alias" "digitalhumanalias", "language" "en us", "languagespeechrecognition" "en us", "phrases" \[ "phrase1", ], "ttsprovider" "yourttsprovider", "operationmode" "oc", "ocprovider" "playground", "promptconfig" { "system prompt" "yoursystemprompt" }, "ttsvoice" "yourttsvoice", "greetings" "hi there!", "voiceflowapikey" null, "customwords" { "ai" "a eye", "unith" "junith" }, "publicurl" "https //xxxxx unith ai/org/headid?api key=06d8axxxxx407d86", "fileurl" null, "pluginoperationalmodeconfig" null, "israndomsuggestions" true, "semanticthreshold" 0 }