Browse and add publicly shared voices to your collection.
import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";
const client = new ElevenLabsClient({ apiKey: "your-api-key" });
// Access this API via: client.voicesBrowse publicly shared voices with extensive filtering.
/**
* @param request - Filter and pagination parameters
* @param requestOptions - Optional request configuration
* @returns Paginated list of shared voices
* @throws UnprocessableEntityError if request fails
*/
client.voices.getShared(
request?: VoicesGetSharedRequest,
requestOptions?: RequestOptions
): HttpResponsePromise<GetLibraryVoicesResponse>;
interface VoicesGetSharedRequest {
page_size?: number;
category?: string;
gender?: string;
age?: string;
accent?: string;
language?: string;
locale?: string;
search?: string;
use_cases?: string[];
descriptives?: string[];
featured?: boolean;
min_notice_period_days?: number;
include_custom_rates?: boolean;
include_live_moderated?: boolean;
reader_app_enabled?: boolean;
owner_id?: string;
sort?: string;
page?: number;
}
interface GetLibraryVoicesResponse {
voices: LibraryVoiceResponse[];
has_more: boolean;
last_sort_id?: string;
}
interface LibraryVoiceResponse {
public_owner_id: string;
voice_id: string;
date_unix: number;
name: string;
accent: string;
gender: string;
age: string;
descriptive: string;
use_case: string;
category: string;
language?: string;
locale?: string;
description?: string;
preview_url?: string;
usage_character_count_1_y: number;
usage_character_count_7_d: number;
play_api_usage_character_count_1_y: number;
cloned_by_count: number;
rate?: number;
fiat_rate?: number;
free_users_allowed: boolean;
live_moderation_enabled: boolean;
featured: boolean;
notice_period?: number;
instagram_username?: string;
twitter_username?: string;
youtube_username?: string;
tiktok_username?: string;
image_url?: string;
is_added_by_user?: boolean;
}import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";
const client = new ElevenLabsClient({ apiKey: "your-api-key" });
// Find shared voices by criteria
const sharedVoices = await client.voices.getShared({
gender: "female",
age: "young",
accent: "british",
language: "en",
featured: true,
page_size: 20,
});
// Add a shared voice to your collection
if (sharedVoices.voices.length > 0) {
const voice = sharedVoices.voices[0];
const added = await client.voices.share(
voice.public_owner_id,
voice.voice_id,
{
new_name: "My Copy of " + voice.name,
}
);
console.log("Added voice:", added.voice_id);
}