List Avatars
curl --request GET \
--url https://api.agenthuman.com/v1/avatars \
--header 'x-api-key: <api-key>'import requests
url = "https://api.agenthuman.com/v1/avatars"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.agenthuman.com/v1/avatars', 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.agenthuman.com/v1/avatars",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-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"
"net/http"
"io"
)
func main() {
url := "https://api.agenthuman.com/v1/avatars"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.agenthuman.com/v1/avatars")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agenthuman.com/v1/avatars")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"public_avatars": [
{
"avatar_id": "PUBLIC/Avatars/sara-office",
"tags": ["female", "professional"],
"preview_url": "https://cdn.agenthuman.com/avatars/sara-office/preview",
"image_url": "https://cdn.agenthuman.com/avatars/sara-office/image"
}
],
"my_avatars": [
{
"avatar_id": "avat_01J8ZK4R2N5M6P7Q8W4T",
"tags": ["user_exclusive", "user_42"],
"preview_url": "https://cdn.agenthuman.com/avatars/avat_01J8ZK4R2N5M6P7Q8W4T/preview",
"image_url": "https://cdn.agenthuman.com/avatars/avat_01J8ZK4R2N5M6P7Q8W4T/image"
}
]
}
{
"success": false,
"error": {
"message": "Unauthorized"
}
}
Avatars
List Avatars
Get public avatars and your own uploaded avatars in one request
GET
/
v1
/
avatars
List Avatars
curl --request GET \
--url https://api.agenthuman.com/v1/avatars \
--header 'x-api-key: <api-key>'import requests
url = "https://api.agenthuman.com/v1/avatars"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.agenthuman.com/v1/avatars', 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.agenthuman.com/v1/avatars",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-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"
"net/http"
"io"
)
func main() {
url := "https://api.agenthuman.com/v1/avatars"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.agenthuman.com/v1/avatars")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agenthuman.com/v1/avatars")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"public_avatars": [
{
"avatar_id": "PUBLIC/Avatars/sara-office",
"tags": ["female", "professional"],
"preview_url": "https://cdn.agenthuman.com/avatars/sara-office/preview",
"image_url": "https://cdn.agenthuman.com/avatars/sara-office/image"
}
],
"my_avatars": [
{
"avatar_id": "avat_01J8ZK4R2N5M6P7Q8W4T",
"tags": ["user_exclusive", "user_42"],
"preview_url": "https://cdn.agenthuman.com/avatars/avat_01J8ZK4R2N5M6P7Q8W4T/preview",
"image_url": "https://cdn.agenthuman.com/avatars/avat_01J8ZK4R2N5M6P7Q8W4T/image"
}
]
}
{
"success": false,
"error": {
"message": "Unauthorized"
}
}
Returns the full library of pre-built public avatars alongside any avatars you have uploaded yourself.
Use
image_url from either list as the avatar_image_url when creating sessions or agents or pass the avatar_id to Preview Avatar.
Response
boolean
Whether the request was successful.
{
"success": true,
"public_avatars": [
{
"avatar_id": "PUBLIC/Avatars/sara-office",
"tags": ["female", "professional"],
"preview_url": "https://cdn.agenthuman.com/avatars/sara-office/preview",
"image_url": "https://cdn.agenthuman.com/avatars/sara-office/image"
}
],
"my_avatars": [
{
"avatar_id": "avat_01J8ZK4R2N5M6P7Q8W4T",
"tags": ["user_exclusive", "user_42"],
"preview_url": "https://cdn.agenthuman.com/avatars/avat_01J8ZK4R2N5M6P7Q8W4T/preview",
"image_url": "https://cdn.agenthuman.com/avatars/avat_01J8ZK4R2N5M6P7Q8W4T/image"
}
]
}
{
"success": false,
"error": {
"message": "Unauthorized"
}
}
⌘I