Avatars
User and brand avatar management.
Access it as client.avatars on a Strongly client, or the same path on AsyncStrongly with await. All methods exist on both with identical signatures.
Quick start
from strongly import Strongly
client = Strongly()
# List (auto-paginates as you iterate) # filters: name
for avatar in client.avatars.list():
print(avatar.id)
Methods
Core
list
list(*, name: str | None = None) -> SyncPaginator[Avatar]
List the avatars you may use.
Parameters
name(str | None, optional): Only the avatar with exactly this name.
create
create(*, name: str, description: str | None = None, type: str | None = None, image_url: str | None = None, config: Mapping[str, Any] | None = None) -> Avatar
Create an avatar.
retrieve
retrieve(avatar_id: str) -> Avatar
Retrieve a single avatar by id.
update
update(avatar_id: str, *, name: str | None = None, description: str | None = None, image_url: str | None = None, config: Mapping[str, Any] | None = None) -> Avatar
Update an avatar and return the updated record.
delete
delete(avatar_id: str) -> None
Delete an avatar. Raises on failure; returns nothing.
Other
preview
preview(avatar_id: str, *, options: Mapping[str, Any] | None = None) -> dict[str, Any]
Render a preview of the avatar.
Parameters
options(Mapping[str, Any] | None, optional): Optional free-form preview/render options forwarded to the rendering backend.
upload_source
upload_source(avatar_id: str, file: str | Path | BinaryIO) -> dict[str, Any]
Upload the source asset an avatar renders from.
A stylized 3D avatar takes a VRM or glTF model; an animated portrait or
real-time lip-sync avatar takes a portrait image. The first upload moves
a new avatar on from preprocessing.
Parameters
avatar_id(str): The avatar's ID.file(str | Path | BinaryIO): A path or an open binary file.
Returns
dict[str, Any]:url,key,bucket,sizeandfield(sourceModelorsourceImage, the avatar field it set).