UNPKG

@elevenlabs/n8n-nodes-elevenlabs

Version:

Official ElevenLabs node for n8n

32 lines 1.04 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.listSearch = void 0; exports.listSearch = { async listVoices() { const voicesResponse = await this.helpers.httpRequestWithAuthentication.call(this, 'elevenLabsApi', { method: 'GET', url: 'https://api.elevenlabs.io/v2/voices', }); const returnData = voicesResponse.voices.map((voice) => ({ name: voice.name, value: voice.voice_id, })); return { results: returnData, }; }, async listModels() { const modelsResponse = await this.helpers.httpRequestWithAuthentication.call(this, 'elevenLabsApi', { method: 'GET', url: 'https://api.elevenlabs.io/v1/models', }); const returnData = modelsResponse.map((model) => ({ name: model.name, value: model.model_id, })); return { results: returnData, }; }, }; //# sourceMappingURL=utils.js.map