Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@ async def create_session_token(
"videoHeight": session_options.video_height,
}

if session_options is not None and session_options.show_ai_avatar_disclosure is not None:
if "sessionOptions" not in payload:
payload["sessionOptions"] = {}
payload["sessionOptions"]["showAIAvatarDisclosure"] = (
session_options.show_ai_avatar_disclosure
)

headers = {
"Authorization": f"Bearer {self._api_key}", # Use API Key here
"Content-Type": "application/json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ class SessionOptions:
validated by Anam; an unsupported pair is rejected with an HTTP 400
rather than silently downgraded.
video_height: Output video frame height in pixels. See ``video_width``.
show_ai_avatar_disclosure: Anam's default is not to render an AI avatar
disclosure watermark. Set to ``True`` to have Anam disclose that the
video contains an AI avatar via a watermark.
"""

video_width: int | None = None
video_height: int | None = None
show_ai_avatar_disclosure: bool | None = None