Skip to main content
POST
/
auto
/
agent
Create New Agent
curl --request POST \
  --url https://api.simli.ai/auto/agent \
  --header 'Content-Type: application/json' \
  --header 'x-simli-api-key: <api-key>' \
  --data '
{
  "face_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "Untitled Agent",
  "first_message": "<string>",
  "prompt": "<string>",
  "voice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "voice_model": "sonic-english",
  "owner_id": "<string>",
  "language": "<string>",
  "emotion": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "llm_model": "gpt-4o-mini",
  "llm_endpoint": "https://api.example.com/v1/chat/completions",
  "max_idle_time": 300,
  "max_session_length": 3600,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}
'
import requests

url = "https://api.simli.ai/auto/agent"

payload = {
"face_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Untitled Agent",
"first_message": "<string>",
"prompt": "<string>",
"voice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"voice_model": "sonic-english",
"owner_id": "<string>",
"language": "<string>",
"emotion": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"llm_model": "gpt-4o-mini",
"llm_endpoint": "https://api.example.com/v1/chat/completions",
"max_idle_time": 300,
"max_session_length": 3600,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
headers = {
"x-simli-api-key": "<api-key>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {'x-simli-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
face_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: 'Untitled Agent',
first_message: '<string>',
prompt: '<string>',
voice_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
voice_model: 'sonic-english',
owner_id: '<string>',
language: '<string>',
emotion: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
llm_model: 'gpt-4o-mini',
llm_endpoint: 'https://api.example.com/v1/chat/completions',
max_idle_time: 300,
max_session_length: 3600,
created_at: '2023-11-07T05:31:56Z',
updated_at: '2023-11-07T05:31:56Z'
})
};

fetch('https://api.simli.ai/auto/agent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.simli.ai/auto/agent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'face_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => 'Untitled Agent',
'first_message' => '<string>',
'prompt' => '<string>',
'voice_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'voice_model' => 'sonic-english',
'owner_id' => '<string>',
'language' => '<string>',
'emotion' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'llm_model' => 'gpt-4o-mini',
'llm_endpoint' => 'https://api.example.com/v1/chat/completions',
'max_idle_time' => 300,
'max_session_length' => 3600,
'created_at' => '2023-11-07T05:31:56Z',
'updated_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-simli-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

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

func main() {

url := "https://api.simli.ai/auto/agent"

payload := strings.NewReader("{\n \"face_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"Untitled Agent\",\n \"first_message\": \"<string>\",\n \"prompt\": \"<string>\",\n \"voice_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voice_model\": \"sonic-english\",\n \"owner_id\": \"<string>\",\n \"language\": \"<string>\",\n \"emotion\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"llm_model\": \"gpt-4o-mini\",\n \"llm_endpoint\": \"https://api.example.com/v1/chat/completions\",\n \"max_idle_time\": 300,\n \"max_session_length\": 3600,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n}")

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

req.Header.Add("x-simli-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.simli.ai/auto/agent")
.header("x-simli-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"face_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"Untitled Agent\",\n \"first_message\": \"<string>\",\n \"prompt\": \"<string>\",\n \"voice_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voice_model\": \"sonic-english\",\n \"owner_id\": \"<string>\",\n \"language\": \"<string>\",\n \"emotion\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"llm_model\": \"gpt-4o-mini\",\n \"llm_endpoint\": \"https://api.example.com/v1/chat/completions\",\n \"max_idle_time\": 300,\n \"max_session_length\": 3600,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.simli.ai/auto/agent")

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

request = Net::HTTP::Post.new(url)
request["x-simli-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"face_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"Untitled Agent\",\n \"first_message\": \"<string>\",\n \"prompt\": \"<string>\",\n \"voice_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voice_model\": \"sonic-english\",\n \"owner_id\": \"<string>\",\n \"language\": \"<string>\",\n \"emotion\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"llm_model\": \"gpt-4o-mini\",\n \"llm_endpoint\": \"https://api.example.com/v1/chat/completions\",\n \"max_idle_time\": 300,\n \"max_session_length\": 3600,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "face_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "Untitled Agent",
  "first_message": "<string>",
  "prompt": "<string>",
  "voice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "voice_model": "sonic-english",
  "language": "<string>",
  "emotion": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "llm_model": "gpt-4o-mini",
  "llm_endpoint": "https://api.example.com/v1/chat/completions",
  "max_idle_time": 300,
  "max_session_length": 3600,
  "owner_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "simli_version": 1
}

Authorizations

x-simli-api-key
string
header
required

Body

application/json
face_id
string<uuid>
required
name
string
default:Untitled Agent
required
first_message
string
prompt
string
voice_provider
enum<string>
Available options:
elevenlabs,
cartesia
voice_id
string<uuid>
voice_model
string
Example:

"sonic-english"

owner_id
string

Unique identifier for the owner of the agent

language
string
emotion
string<uuid>
llm_model
string
Example:

"gpt-4o-mini"

llm_endpoint
string

The URL of the custom LLM to use

Example:

"https://api.example.com/v1/chat/completions"

max_idle_time
integer
default:300
max_session_length
integer
default:3600
llm_provider
enum<string>

The provider of the LLM used by the agent

Available options:
openai,
google,
user
created_at
string<date-time>

Timestamp when the agent was created

updated_at
string<date-time>

Timestamp when the agent was updated

Response

Agent created successfully

id
string<uuid>
required

Unique identifier for the agent, generated by the MySQL service

face_id
string<uuid>
required
name
string
default:Untitled Agent
required
first_message
string
required
prompt
string
required
voice_provider
enum<string>
required
Available options:
elevenlabs,
cartesia
voice_id
string<uuid>
required
voice_model
string
required
Example:

"sonic-english"

language
string
required
emotion
string<uuid>
required
llm_model
string
required
Example:

"gpt-4o-mini"

llm_endpoint
string
required

The URL of the custom LLM to use

Example:

"https://api.example.com/v1/chat/completions"

max_idle_time
integer
default:300
required
max_session_length
integer
default:3600
required
owner_id
string
required

Unique identifier for the owner of the agent

llm_provider
enum<string>
required

The provider of the LLM used by the agent

Available options:
openai,
google,
user
created_at
string<date-time>
required

Timestamp when the agent was created

updated_at
string<date-time>
required

Timestamp when the agent was last updated

simli_version
integer

Version of the Simli model used for the face

Example:

1