Skip to main content

List favorite voices

Retrieves all voices that the authenticated user has added to their favorites.
resource
string
required
voices
action
string
required
favorites
const response = await ApiService.invoke({
  resource: "voices",
  action: "favorites",
});

Response

favorites
VoiceFavorite[]
Array of favorited voice records.
count
number
Total number of favorited voices.

Retrieves the most frequently used voices across all users.
resource
string
required
voices
action
string
required
popular
data
object
Authentication is optional for this action. Popular voice data is publicly accessible.
const response = await ApiService.invoke({
  resource: "voices",
  action: "popular",
  data: {
    limit: 10,
  },
});

Response

voices
PopularVoice[]
Array of popular voice records, ordered by usage count.
count
number
Total number of voices returned.

Get recent voices

Retrieves voices recently used by the authenticated user.
resource
string
required
voices
action
string
required
recent
data
object
const response = await ApiService.invoke({
  resource: "voices",
  action: "recent",
  data: {
    limit: 5,
  },
});

Response

voices
RecentVoice[]
Array of recently used voice records, ordered by most recent first.
count
number
Total number of voices returned.

Add favorite voice

Adds a voice to the authenticated user’s favorites. If the voice is already favorited, returns the existing record without creating a duplicate.
resource
string
required
voices
action
string
required
add-favorite
id
string
required
The voice ID to add to favorites.
data
object
const response = await ApiService.invoke({
  resource: "voices",
  action: "add-favorite",
  id: "voice-id",
  data: {
    voice_data: {
      name: "Rachel",
      language: "en",
      accent: "American",
    },
  },
});

Response (status 201)

favorite
VoiceFavorite
The newly created favorite record. See the VoiceFavorite object for field details.
If the voice is already favorited, the response returns:
already_favorited
boolean
true when the voice was already in favorites.
voice_id
string
The voice ID that was already favorited.

Remove favorite voice

Removes a voice from the authenticated user’s favorites.
resource
string
required
voices
action
string
required
remove-favorite
id
string
required
The voice ID to remove from favorites.
const response = await ApiService.invoke({
  resource: "voices",
  action: "remove-favorite",
  id: "voice-id",
});

Response

success
boolean
true if the voice was successfully removed from favorites.
voice_id
string
The voice ID that was removed.

Track voice usage

Records that a voice was used. This is a fire-and-forget operation; errors are logged server-side but do not cause the request to fail.
resource
string
required
voices
action
string
required
track-usage
id
string
required
The voice ID to track usage for.
data
object
Authentication is optional. Anonymous usage is tracked when no token is provided.
Track-usage is a fire-and-forget operation. The endpoint always returns { success: true } even if the underlying database write fails. Errors are logged server-side but are never surfaced to the caller, so it is safe to call without awaiting or error-handling.
const response = await ApiService.invoke({
  resource: "voices",
  action: "track-usage",
  id: "voice-id",
  data: {
    context: "agent_creation",
    agentId: "agent-uuid",
  },
});

Response

success
boolean
Always returns true, regardless of whether the tracking write succeeded internally.