Get Avatars
curl --request GET \
--url https://api.example.com/avatar-profilesimport requests
url = "https://api.example.com/avatar-profiles"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/avatar-profiles', 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.example.com/avatar-profiles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/avatar-profiles"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/avatar-profiles")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/avatar-profiles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyAvatar Profiles
Get Avatars
List reusable AI Avatars available to your organization.
GET
/
avatar-profiles
Get Avatars
curl --request GET \
--url https://api.example.com/avatar-profilesimport requests
url = "https://api.example.com/avatar-profiles"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/avatar-profiles', 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.example.com/avatar-profiles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/avatar-profiles"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/avatar-profiles")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/avatar-profiles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyReturns avatars from your organization’s primary workspace. Avatars created through the API are stored there so AI Avatar tiles in any workspace can use them.
Each avatar includes
Use
status. You can use avatars with pending or processing status immediately; the AI Avatar run waits for processing to finish. Avatars with failed status cannot be used.
Request
curl "https://api.mosaic.so/avatar-profiles" \
-H "Authorization: Bearer mk_your_api_key"
Response
Returns an object withavatar_profiles, an array of avatar profile objects:
| Field | Type | Description |
|---|---|---|
avatar_profiles | array | List of avatar profiles available to your organization. |
avatar_profiles[].id | string UUID | Avatar profile ID. Pass this as avatar_profile_id in an AI Avatar tile. |
avatar_profiles[].video_preview_url | string URL | null | Signed video preview URL. This is null until a preview/reference video is available. |
avatar_profiles[].name | string | Avatar display name. |
avatar_profiles[].status | "pending" | "processing" | "ready" | "failed" | Avatar processing state. ready means the avatar is fully prepared. pending or processing can still be used in an AI Avatar tile; the run waits. failed means the avatar cannot be used. |
avatar_profiles[].status_message | string | null | Error message when status is failed; otherwise null. |
{
"avatar_profiles": [
{
"id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
"video_preview_url": "https://...",
"name": "Founder Avatar",
"status": "ready",
"status_message": null
}
]
}
id as avatar_profile_id in an AI Avatar node.Was this page helpful?
⌘I