export type GetApiAllmodelsV1CustomVoicesVoiceIdArgs = {voice_id: string}; export type GetApiAllmodelsV1CustomVoicesVoiceIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get details of a specific cloned voice by ID. * * GET /allmodels/v1/custom-voices/{voice_id} */ export const getApiAllmodelsV1CustomVoicesVoiceId = async (args: GetApiAllmodelsV1CustomVoicesVoiceIdArgs, options?: GetApiAllmodelsV1CustomVoicesVoiceIdOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/allmodels/v1/custom-voices/${encodeURIComponent(String(args.voice_id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };