Skip to main content

List voices

Retrieves all available voices from the voice library.
resource
string
required
voices
action
string
required
list
data
object
Any filter or pagination parameters supported by the voice library are forwarded as-is.
const response = await ApiService.invoke({
  resource: "voices",
  action: "list",
});

Response

Returns voice library data forwarded directly from the upstream voice service.

List shared voices

Retrieves voices from the shared voice library.
resource
string
required
voices
action
string
required
list-shared
data
object
Any filter or pagination parameters supported by the voice library are forwarded as-is.
const response = await ApiService.invoke({
  resource: "voices",
  action: "list-shared",
});

Response

Returns shared voice library data forwarded directly from the upstream voice service.

Search voices

Searches the voice library by one or more search terms.
resource
string
required
voices
action
string
required
search
data
object
required
const response = await ApiService.invoke({
  resource: "voices",
  action: "search",
  data: {
    terms: ["Rachel", "American", "calm"],
  },
});

Response

Returns matching voice data forwarded directly from the upstream voice service.

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.

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.