### Install ElevenLabs JS Library Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/README.md Install the ElevenLabs Node.js library using npm or yarn. ```bash npm install @elevenlabs/elevenlabs-js # or yarn add @elevenlabs/elevenlabs-js ``` -------------------------------- ### Convert Project Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Starts conversion of a Studio project and all of its chapters. ```APIDOC ## Convert Project ### Description Starts conversion of a Studio project and all of its chapters. ### Method POST ### Endpoint /v1/studio/projects/{projectId}/convert ### Parameters #### Path Parameters - **projectId** (string) - Required - The ID of the project to be converted. #### Request Body - **requestOptions** (ProjectsClient.RequestOptions) - Optional - Options for the request. ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the conversion process has started. ### Response Example ```json { "message": "Project conversion started successfully." } ``` ``` -------------------------------- ### Get Project Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Returns information about a specific Studio project. This endpoint returns more detailed information about a project than `GET /v1/studio`. ```APIDOC ## Get Project ### Description Returns information about a specific Studio project. This endpoint returns more detailed information about a project than `GET /v1/studio`. ### Method GET ### Endpoint /v1/studio/projects/{projectId} ### Parameters #### Path Parameters - **projectId** (string) - Required - The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. #### Query Parameters - **shareId** (string) - Optional - The ID for sharing the project. - **requestOptions** (ProjectsClient.RequestOptions) - Optional - Options for the request. ### Response #### Success Response (200) - **id** (string) - The ID of the project. - **name** (string) - The name of the project. - **createdAt** (string) - The creation timestamp. - **authorId** (string) - The ID of the project author. - **chapters** (Array) - A list of chapters within the project. ### Response Example ```json { "id": "21m00Tcm4TlvDq8ikWAM", "name": "Project 1", "createdAt": "2023-10-20T10:00:00Z", "authorId": "user_id", "chapters": [ { "id": "chapter_id", "name": "Chapter 1", "createdAt": "2023-10-20T10:05:00Z" } ] } ``` ``` -------------------------------- ### client.audioNative.create Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Creates an Audio Native enabled project, optionally starts conversion, and returns the project ID and an embeddable HTML snippet. ```APIDOC ## client.audioNative.create ### Description Creates Audio Native enabled project, optionally starts conversion and returns project ID and embeddable HTML snippet. ### Method APICALL ### Endpoint client.audioNative.create ### Parameters #### Request Body - **request** (ElevenLabs.BodyCreatesAudioNativeEnabledProjectV1AudioNativePost) - Required - The request body for creating an Audio Native project. - **requestOptions** (AudioNativeClient.RequestOptions) - Optional - Options for the create request. ``` -------------------------------- ### client.models.list Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Gets a list of available models. ```APIDOC ## client.models.list ### Description Gets a list of available models. ### Method APICALL ### Endpoint client.models.list ### Parameters #### Request Body - **requestOptions** (ModelsClient.RequestOptions) - Optional - Options for the request. ``` -------------------------------- ### Start Standalone Speech Engine Server Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/README.md Use this to create a dedicated WebSocket server for the Speech Engine when no existing HTTP server is available. It starts a server on the specified port. Requires the SpeechEngine class. ```typescript import { SpeechEngine } from "@elevenlabs/elevenlabs-js"; const server = new SpeechEngine.Server({ port: 3001, engineId: "seng_123", apiKey: process.env.ELEVENLABS_API_KEY, async onTranscript(transcript, signal, session) { const reply = await generateLLMResponse(transcript, { signal }); session.sendResponse(reply); }, }); server.start(); ``` -------------------------------- ### client.pronunciationDictionaries.get Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Get metadata for a pronunciation dictionary. ```APIDOC ## client.pronunciationDictionaries.get ### Description Get metadata for a pronunciation dictionary. ### Method ``` client.pronunciationDictionaries.get(pronunciation_dictionary_id: string): Promise ``` ### Parameters #### Path Parameters - **pronunciation_dictionary_id** (string) - Required - The ID of the pronunciation dictionary to retrieve. ``` -------------------------------- ### Get Project Snapshot Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Returns a specific project snapshot for a given Studio project. ```APIDOC ## Get Project Snapshot ### Description Returns the project snapshot. ### Method `client.studio.projects.snapshots.get(project_id, project_snapshot_id, requestOptions)` ### Parameters #### Path Parameters - **project_id** (string) - Required - The ID of the Studio project. - **project_snapshot_id** (string) - Required - The ID of the project snapshot. #### Query Parameters - **requestOptions** (SnapshotsClient.RequestOptions) - Optional ### Request Example ```typescript await client.studio.projects.snapshots.get("21m00Tcm4TlvDq8ikWAM", "21m00Tcm4TlvDq8ikWAM"); ``` ### Response #### Success Response (200) - **ElevenLabs.ProjectSnapshotExtendedResponseModel** - The response model for the project snapshot. ``` -------------------------------- ### client.studio.projects.chapters.snapshots.stream Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Stream the audio from a chapter snapshot. Use GET /v1/studio/projects/{project_id}/chapters/{chapter_id}/snapshots to return the snapshots of a chapter. ```APIDOC ## client.studio.projects.chapters.snapshots.stream ### Description Stream the audio from a chapter snapshot. Use `GET /v1/studio/projects/{project_id}/chapters/{chapter_id}/snapshots` to return the snapshots of a chapter. ### Method POST (assumed based on the presence of a request body parameter and typical REST patterns for streaming audio) ### Endpoint /v1/studio/projects/{project_id}/chapters/{chapter_id}/snapshots/{chapter_snapshot_id}/stream ### Parameters #### Path Parameters - **project_id** (string) - Required - The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. - **chapter_id** (string) - Required - The ID of the chapter to be used. You can use the [List project chapters](/docs/api-reference/studio/get-chapters) endpoint to list all the available chapters. - **chapter_snapshot_id** (string) - Required - The ID of the chapter snapshot to be used. You can use the [List project chapter snapshots](/docs/api-reference/studio/get-snapshots) endpoint to list all the available snapshots. #### Query Parameters None explicitly mentioned. #### Request Body - **request** (ElevenLabs.studio.projects.chapters.BodyStreamChapterAudioV1StudioProjectsProjectIdChaptersChapterIdSnapshotsChapterSnapshotIdStreamPost) - Required - The request body for streaming chapter audio. - **requestOptions** (SnapshotsClient.RequestOptions) - Optional - Additional request options. ### Request Example ```typescript await client.studio.projects.chapters.snapshots.stream("project_id", "chapter_id", "chapter_snapshot_id"); ``` ### Response #### Success Response (200) - **ReadableStream** - A readable stream of the audio data. ``` -------------------------------- ### List Available Models Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Gets a list of all available models. Supports optional request options. ```typescript await client.models.list(); ``` -------------------------------- ### Get Signed URL for Conversation Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Obtain a signed URL to initiate a conversation with an agent that requires authorization. This is useful for starting new, authorized chat sessions. ```APIDOC ## GET /conversationalAi/conversations/signed-url ### Description Get a signed url to start a conversation with an agent with an agent that requires authorization. ### Method GET ### Endpoint /conversationalAi/conversations/signed-url ### Parameters #### Query Parameters - **agentId** (string) - Required - The ID of the agent to converse with. - **includeConversationId** (boolean) - Optional - Whether to include the conversation ID in the response. - **branchId** (string) - Optional - The ID of the branch to use for the conversation. - **environment** (string) - Optional - The environment for the conversation. ### Response #### Success Response (200) - **conversationId** (string) - The ID of the conversation. - **signedUrl** (string) - The signed URL to start the conversation. ### Request Example ```json { "agentId": "agent_3701k3ttaq12ewp8b7qv5rfyszkz", "includeConversationId": true, "branchId": "branch_id", "environment": "environment" } ``` ### Response Example ```json { "conversationId": "conv_12345", "signedUrl": "https://example.com/signed/url" } ``` ``` -------------------------------- ### Create Project Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Creates a new Studio project, which can be initialized as blank, from a document, or from a URL. ```APIDOC ## Create Project ### Description Creates a new Studio project, it can be either initialized as blank, from a document or from a URL. ### Method POST ### Endpoint /v1/studio/projects ### Parameters #### Request Body - **request** (ElevenLabs.studio.BodyCreateStudioProjectV1StudioProjectsPost) - Required - The project creation data. - **requestOptions** (ProjectsClient.RequestOptions) - Optional - Options for the request. ### Request Example ```json { "name": "My New Project", "description": "Optional description for the project.", "document": { "title": "Document Title", "content": "Content of the document." }, "url": "http://example.com/document.pdf" } ``` ### Response #### Success Response (200) - **id** (string) - The ID of the newly created project. - **name** (string) - The name of the project. - **createdAt** (string) - The creation timestamp. - **authorId** (string) - The ID of the project author. ### Response Example ```json { "id": "new_project_id", "name": "My New Project", "createdAt": "2023-10-20T10:00:00Z", "authorId": "user_id" } ``` ``` -------------------------------- ### Get Usage Metrics (Deprecated) Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Retrieves usage metrics for the current user or workspace. This endpoint is deprecated and a newer alternative should be used. It requires start and end Unix timestamps and allows for breakdown and aggregation configurations. ```typescript await client.usage.get({ startUnix: 1, endUnix: 1, includeWorkspaceMetrics: true, breakdownType: "none", aggregationInterval: "hour", aggregationBucketSize: 1, metric: "credits" }); ``` -------------------------------- ### WhatsApp Accounts - Get Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Get a WhatsApp account. ```APIDOC ## GET WhatsApp Account ### Description Get a WhatsApp account. ### Method GET ### Endpoint /conversationalAi/whatsappAccounts/{phone_number_id} ### Parameters #### Path Parameters - **phone_number_id** (string) - Required - The phone number ID of the WhatsApp account. #### Request Body None ### Response #### Success Response (200) - **[Response Fields]** (object) - Details of the WhatsApp account. ### Request Example ```typescript await client.conversationalAi.whatsappAccounts.get("phone_number_id"); ``` ### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Create Podcast Project with ElevenLabs JS Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Create and auto-convert a podcast project. LLM costs are currently covered, but audio generation costs apply. Future charges will include both LLM and audio generation. ```typescript await client.studio.createPodcast({ modelId: "eleven_multilingual_v2", mode: { type: "conversation", conversation: { hostVoiceId: "aw1NgEzBg83R7vgmiJt6", guestVoiceId: "aw1NgEzBg83R7vgmiJt7" } }, source: { type: "text", text: "This is a test podcast." } }); ``` -------------------------------- ### Get Document Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Get details about a specific documentation making up the agent's knowledge base. ```APIDOC ## get ### Description Get details about a specific documentation making up the agent's knowledge base. ### Method GET ### Endpoint /v1/convai/knowledge_base/documents/{documentation_id} ### Parameters #### Path Parameters - **documentation_id** (string) - Required - The id of a document from the knowledge base. This is returned on document addition. #### Query Parameters - **agentId** (string) - Required - The ID of the agent. ### Request Example ```typescript await client.conversationalAi.knowledgeBase.documents.get("21m00Tcm4TlvDq8ikWAM", { agentId: "agent_id" }); ``` ``` -------------------------------- ### Create Podcast from URL with ElevenLabs Studio Source: https://context7.com/elevenlabs/elevenlabs-js/llms.txt Generate a podcast project from a URL. The content from the provided URL will be used as the source for the podcast. ```typescript // Create podcast from URL const podcastFromUrl = await elevenlabs.studio.createPodcast({ modelId: "eleven_multilingual_v2", mode: { type: "conversation", conversation: { hostVoiceId: "aw1NgEzBg83R7vgmiJt6", guestVoiceId: "aw1NgEzBg83R7vgmiJt7", }, }, source: { type: "url", url: "https://example.com/article", }, }); ``` -------------------------------- ### client.conversationalAi.mcpServers.create Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Create a new MCP server configuration in the workspace. ```APIDOC ## client.conversationalAi.mcpServers.create ### Description Create a new MCP server configuration in the workspace. ### Method ``` await client.conversationalAi.mcpServers.create({ ...params }) -> ElevenLabs.McpServerResponseModel ``` ### Parameters #### Request Body - **request** (ElevenLabs.conversationalAi.McpServerRequestModel) - Required - The MCP server configuration to create. - **requestOptions** (McpServersClient.RequestOptions) - Optional - Options for the request. ``` -------------------------------- ### Get User Information Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Retrieves information about the current user. This is a simple GET request with no parameters other than optional request options. ```typescript await client.user.get(); ``` -------------------------------- ### Create Podcast from Text with ElevenLabs Studio Source: https://context7.com/elevenlabs/elevenlabs-js/llms.txt Create a podcast project using text as the source. This involves specifying model and voice IDs, and providing the text content for the podcast. ```typescript import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js"; const elevenlabs = new ElevenLabsClient(); // Create a podcast from text const podcast = await elevenlabs.studio.createPodcast({ modelId: "eleven_multilingual_v2", mode: { type: "conversation", conversation: { hostVoiceId: "aw1NgEzBg83R7vgmiJt6", guestVoiceId: "aw1NgEzBg83R7vgmiJt7", }, }, source: { type: "text", text: "Today we're discussing the future of AI in creative industries...", }, }); console.log("Podcast project ID:", podcast.projectId); ``` -------------------------------- ### Create Studio Project Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Creates a new Studio project. Projects can be initialized as blank, from a document, or from a URL. Requires a project name. ```typescript await client.studio.projects.create({ name: "name" }); ``` -------------------------------- ### Initialize ElevenLabs Client Source: https://context7.com/elevenlabs/elevenlabs-js/llms.txt Create an instance of the ElevenLabs client using your API key. You can provide the key directly or use the ELEVENLABS_API_KEY environment variable. Custom options like timeout and retries can also be configured. ```typescript import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js"; // Initialize with explicit API key const elevenlabs = new ElevenLabsClient({ apiKey: "YOUR_API_KEY", }); ``` ```typescript // Or use environment variable (ELEVENLABS_API_KEY) const elevenlabs = new ElevenLabsClient(); ``` ```typescript // With custom options const elevenlabs = new ElevenLabsClient({ apiKey: "YOUR_API_KEY", timeoutInSeconds: 120, maxRetries: 3, }); ``` -------------------------------- ### client.workspace.resources.get Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Gets the metadata of a resource by ID. ```APIDOC ## GET /v1/workspace/resources/{resource_id} ### Description Gets the metadata of a resource by ID. ### Method GET ### Endpoint /v1/workspace/resources/{resource_id} ### Parameters #### Path Parameters - **resource_id** (string) - Required - The ID of the target resource. #### Query Parameters - **resourceType** (string) - Required - The type of the resource (e.g., "voice"). #### Request Body - **requestOptions** (ResourcesClient.RequestOptions) - Optional - Options for the request. ### Response #### Success Response (200) - **resource** (ElevenLabs.ResourceMetadataResponseModel) - Metadata of the requested resource. ``` -------------------------------- ### Create Knowledge Base Folder Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Create a new folder to organize your knowledge base documents. Provide a name for the folder. ```typescript await client.conversationalAi.knowledgeBase.documents.createFolder({ name: "name" }); ``` -------------------------------- ### client.conversationalAi.agents.branches.get Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Get information about a single agent branch. ```APIDOC ## client.conversationalAi.agents.branches.get ### Description Get information about a single agent branch. ### Method GET (inferred) ### Endpoint /v1/convai/agents/{agent_id}/branches/{branch_id} ### Parameters #### Path Parameters - **agent_id** (string) - Required - The id of an agent. This is returned on agent creation. - **branch_id** (string) - Required - Unique identifier for the branch. ### Response #### Success Response (200) - **id** (string) - The unique identifier for the agent branch. - **name** (string) - The name of the agent branch. - **description** (string) - The description of the agent branch. - **created_at** (string) - The timestamp when the agent branch was created. - **version_id** (string) - The ID of the version associated with this branch. - **is_archived** (boolean) - Indicates if the branch is archived. - **is_default** (boolean) - Indicates if this is the default branch. - **is_protected** (boolean) - Indicates if the branch is protected. ### Response Example ```json { "id": "agtbranch_0901k4aafjxxfxt93gd841r7tv5t", "name": "Main Branch", "description": "The main development branch", "created_at": "2023-10-26T09:00:00Z", "version_id": "v_abcdef1234567890", "is_archived": false, "is_default": true, "is_protected": true } ``` ``` -------------------------------- ### Create Knowledge Base Document from File Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Use this method to create a new knowledge base document by uploading a file. Ensure the file path is correct. ```typescript await client.conversationalAi.knowledgeBase.documents.createFromFile({ file: fs.createReadStream("/path/to/your/file") }); ``` -------------------------------- ### client.webhooks.create Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Creates a new workspace webhook with the specified settings. ```APIDOC ## client.webhooks.create ### Description Creates a new workspace webhook. ### Method POST ### Endpoint /v1/webhooks ### Parameters #### Request Body - **settings** (object) - Required - Webhook settings including authType, name, and webhookUrl. - **requestOptions** (object) - Optional - Request options for the webhook client. ``` -------------------------------- ### Speech Engine - get Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Retrieve a Speech Engine resource. ```APIDOC ## get ### Description Retrieve a Speech Engine resource. ### Method GET ### Endpoint /v1/speech-engines/{speech_engine_id} ### Parameters #### Path Parameters - **speech_engine_id** (string) - Required - The ID of the Speech Engine to retrieve. #### Query Parameters - **requestOptions** (SpeechEngineClient.RequestOptions) - Required - Options for the request. ### Response #### Success Response (200) - **data** (ElevenLabs.SpeechEngineResponse) - The requested Speech Engine resource. ### Response Example ```json { "data": { "id": "seng_3701k3ttaq12ewp8b7qv5rfyszkz", "name": "Example Engine", "ws_url": "wss://example.com/ws" } } ``` ``` -------------------------------- ### Get Specific Studio Project Chapter Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Retrieves detailed information about a specific chapter within a Studio project. Requires both project and chapter IDs. ```typescript await client.studio.projects.chapters.get("21m00Tcm4TlvDq8ikWAM", "21m00Tcm4TlvDq8ikWAM"); ``` -------------------------------- ### Get User Information Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Retrieves information about the current user. ```APIDOC ## Get User Information ### Description Gets information about the user. ### Method GET ### Endpoint /v1/user ### Parameters No parameters required for this request. ### Response #### Success Response (200) - **id** (string) - The user's unique identifier. - **email** (string) - The user's email address. - **subscription** (object) - Information about the user's subscription plan. - **tier** (string) - The subscription tier (e.g., 'free', 'pro'). - **character_limit_x** (integer) - The character limit for the current billing cycle. - **character_ مصرف** (integer) - The amount of characters consumed in the current billing cycle. - **can_extend_character_limit_x** (boolean) - Whether the character limit can be extended. ### Response Example ```json { "id": "user_id_123", "email": "user@example.com", "subscription": { "tier": "pro", "character_limit_x": 100000, "character_consumed": 5000, "can_extend_character_limit_x": true } } ``` ``` -------------------------------- ### List Projects Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Returns a list of your Studio projects with metadata. ```APIDOC ## List Projects ### Description Returns a list of your Studio projects with metadata. ### Method GET ### Endpoint /v1/studio/projects ### Parameters #### Query Parameters - **requestOptions** (ProjectsClient.RequestOptions) - Optional - Options for the request. ### Response #### Success Response (200) - **projects** (Array) - A list of Studio projects. ### Response Example ```json { "projects": [ { "id": "21m00Tcm4TlvDq8ikWAM", "name": "Project 1", "createdAt": "2023-10-20T10:00:00Z", "authorId": "user_id" } ] } ``` ``` -------------------------------- ### client.audioNative.getSettings Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Retrieves player settings for a specific Audio Native project. ```APIDOC ## client.audioNative.getSettings ### Description Get player settings for the specific project. ### Method APICALL ### Endpoint client.audioNative.getSettings(project_id) ### Parameters #### Path Parameters - **project_id** (string) - Required - The ID of the Studio project. #### Request Body - **requestOptions** (AudioNativeClient.RequestOptions) - Optional - Options for the get settings request. ### Request Example ```typescript await client.audioNative.getSettings("21m00Tcm4TlvDq8ikWAM"); ``` ``` -------------------------------- ### client.conversationalAi.agents.deployments.create Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Creates a new deployment for a conversational AI agent. ```APIDOC ## client.conversationalAi.agents.deployments.create ### Description Creates a new deployment for a conversational AI agent. ### Method POST (inferred) ### Endpoint /v1/convai/agents/{agent_id}/deployments ### Parameters #### Path Parameters - **agent_id** (string) - Required - The id of an agent. This is returned on agent creation. #### Request Body - **branch_id** (string) - Required - The ID of the branch to deploy. - **name** (string) - Required - The name of the deployment. - **description** (string) - Optional - A description for the deployment. ### Response #### Success Response (200) - **id** (string) - The unique identifier for the deployment. - **agent_id** (string) - The ID of the agent associated with this deployment. - **branch_id** (string) - The ID of the branch that was deployed. - **name** (string) - The name of the deployment. - **description** (string) - The description of the deployment. - **created_at** (string) - The timestamp when the deployment was created. - **status** (string) - The current status of the deployment (e.g., 'active', 'inactive'). ### Response Example ```json { "id": "dep_abcdef1234567890", "agent_id": "agent_3701k3ttaq12ewp8b7qv5rfyszkz", "branch_id": "agtbranch_0901k4aafjxxfxt93gd841r7tv5t", "name": "Production Deployment", "description": "Current production version of the agent", "created_at": "2023-10-27T11:00:00Z", "status": "active" } ``` ``` -------------------------------- ### client.voices.pvc.verification.captcha.get Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Get captcha for PVC voice verification. Requires voice_id. ```APIDOC ## client.voices.pvc.verification.captcha.get ### Description Get captcha for PVC voice verification. ### Method GET ### Endpoint /voices/pvc/verification/captcha ### Parameters #### Path Parameters - **voice_id** (string) - Required - Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. #### Request Example ```typescript await client.voices.pvc.verification.captcha.get("21m00Tcm4TlvDq8ikWAM"); ``` ``` -------------------------------- ### client.conversationalAi.mcpServers.list Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Retrieve all MCP server configurations available in the workspace. ```APIDOC ## client.conversationalAi.mcpServers.list ### Description Retrieve all MCP server configurations available in the workspace. ### Method ``` await client.conversationalAi.mcpServers.list() -> ElevenLabs.McpServersResponseModel ``` ### Parameters #### Request Body - **requestOptions** (McpServersClient.RequestOptions) - Optional - Options for the request. ``` -------------------------------- ### client.conversationalAi.knowledgeBase.documents.chunk.get Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Get details about a specific documentation part used by RAG. ```APIDOC ## client.conversationalAi.knowledgeBase.documents.chunk.get ### Description Get details about a specific documentation part used by RAG. ### Method GET ### Endpoint /v1/convai/knowledge_base/documents/{documentation_id}/chunk/{chunk_id} ### Parameters #### Path Parameters - **documentation_id** (string) - Required - The id of a document from the knowledge base. This is returned on document addition. - **chunk_id** (string) - Required - The id of the chunk. ### Response #### Success Response (200) - **chunk_id** (string) - The id of the chunk. - **text** (string) - The text content of the chunk. - **metadata** (object) - Metadata associated with the chunk. - **created_at** (string) - The creation date of the chunk. #### Response Example ```json { "chunk_id": "chunk_123", "text": "This is the content of the chunk.", "metadata": { "source": "file", "name": "My Document" }, "created_at": "2023-01-01T12:00:00Z" } ``` ``` -------------------------------- ### Create Knowledge Base Document from File Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Creates a knowledge base document from an uploaded file. Requires a request object with file details. ```typescript await client.conversationalAi.knowledgeBase.documents.createFromFile({ ...params }); ``` -------------------------------- ### client.conversationalAi.knowledgeBase.documents.summaries.get Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Gets multiple knowledge base document summaries by their IDs. ```APIDOC ## client.conversationalAi.knowledgeBase.documents.summaries.get ### Description Gets multiple knowledge base document summaries by their IDs. ### Method POST ### Endpoint /v1/convai/knowledge_base/documents/summaries ### Parameters #### Request Body - **documentIds** (array) - Required - An array of document IDs for which to retrieve summaries. ### Request Example ```json { "documentIds": ["21m00Tcm4TlvDq8ikWAM", "31n11Udm5UmwEr9jkXBN"] } ``` ### Response #### Success Response (200) - **{document_id}** (object) - An object where keys are document IDs and values are summary objects. - **summary** (string) - The summary of the document. - **metadata** (object) - Metadata associated with the summary. - **created_at** (string) - The creation date of the summary. #### Response Example ```json { "21m00Tcm4TlvDq8ikWAM": { "summary": "This is a summary of the document.", "metadata": { "source": "file", "name": "My Document" }, "created_at": "2023-01-01T12:00:00Z" }, "31n11Udm5UmwEr9jkXBN": { "summary": "Another document summary.", "metadata": { "source": "url", "name": "Another Document" }, "created_at": "2023-01-01T12:05:00Z" } } ``` ``` -------------------------------- ### Get User Subscription Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Retrieves extended information about the user's subscription. ```APIDOC ## Get User Subscription ### Description Gets extended information about the users subscription. ### Method GET ### Endpoint /user/subscription ### Parameters #### Query Parameters - **requestOptions** (SubscriptionClient.RequestOptions) - Optional - Options for the request. ### Response #### Success Response (200) - **subscription** (ElevenLabs.Subscription) - Information about the user's subscription. ``` -------------------------------- ### client.music.compositionPlan.create Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Creates a composition plan for music generation. This operation does not consume credits but is subject to rate limiting. ```APIDOC ## client.music.compositionPlan.create ### Description Create a composition plan for music generation. Usage of this endpoint does not cost any credits but is subject to rate limiting depending on your tier. ### Method POST ### Endpoint /v1/music/plan ### Parameters #### Request Body - **request** (ElevenLabs.music.BodyGenerateCompositionPlanV1MusicPlanPost) - Required - The request body for creating a composition plan. - **requestOptions** (CompositionPlanClient.RequestOptions) - Optional - Options for the request. ### Request Example ```json { "prompt": "A serene ambient track with ocean waves" } ``` ### Response #### Success Response (200) - **id** (string) - The ID of the generated composition plan. - **model** (string) - The music generation model used. - **request_id** (string) - The ID of the request. - **status** (string) - The status of the composition plan generation. ``` -------------------------------- ### Create Pronunciation Dictionary from File Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Creates a new pronunciation dictionary by uploading a lexicon .PLS file. Requires a name for the dictionary. ```typescript await client.pronunciationDictionaries.createFromFile({ name: "name" }); ``` -------------------------------- ### Get Dubbing Resource Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Retrieves the dubbing resource for a given dubbing ID. ```APIDOC ## GET /dubbing/resource/{dubbing_id} ### Description Given a dubbing ID generated from the '/v1/dubbing' endpoint with studio enabled, returns the dubbing resource. ### Method GET ### Endpoint /dubbing/resource/{dubbing_id} ### Parameters #### Path Parameters - **dubbing_id** (string) - Required - ID of the dubbing project. #### Request Body None ### Response #### Success Response (200) - **ElevenLabs.DubbingResource** - The dubbing resource object. ``` -------------------------------- ### Get Test Invocation Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Retrieves a specific test invocation by its unique identifier. ```APIDOC ## GET /conversationalAi/tests/invocations/{test_invocation_id} ### Description Gets a test invocation by ID. ### Method GET ### Endpoint /conversationalAi/tests/invocations/{test_invocation_id} ### Parameters #### Path Parameters - **test_invocation_id** (string) - Required - The id of a test invocation. This is returned when tests are run. #### Request Body None ### Response #### Success Response (200) - **ElevenLabs.GetTestSuiteInvocationResponseModel** - The response object containing details of the test invocation. ``` -------------------------------- ### client.studio.createPodcast Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Create and auto-convert a podcast project. The LLM cost is currently covered by ElevenLabs, but audio generation costs will apply. Future charges will include both LLM and audio generation. ```APIDOC ## client.studio.createPodcast ### Description Create and auto-convert a podcast project. Currently, the LLM cost is covered by us but you will still be charged for the audio generation. In the future, you will be charged for both the LLM and audio generation costs. ### Method ```typescript client.studio.createPodcast({ modelId: "eleven_multilingual_v2", mode: { type: "conversation", conversation: { hostVoiceId: "aw1NgEzBg83R7vgmiJt6", guestVoiceId: "aw1NgEzBg83R7vgmiJt7" } }, source: { type: "text", text: "This is a test podcast." } }); ``` ### Parameters #### Request Body - **request** (ElevenLabs.BodyCreatePodcastV1StudioPodcastsPost) - Required - The request object for creating a podcast. - **requestOptions** (StudioClient.RequestOptions) - Optional - Options for the request. ``` -------------------------------- ### client.conversationalAi.tests.folders.get Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Gets an agent test folder by ID, including its folder path. ```APIDOC ## client.conversationalAi.tests.folders.get ### Description Gets an agent test folder by ID, including its folder path. ### Method ``` client.conversationalAi.tests.folders.get(folder_id: string, requestOptions?: FoldersClient.RequestOptions) ``` ### Parameters #### Path Parameters - **folder_id** (string) - Required - The folder ID. #### Request Options - **requestOptions** (FoldersClient.RequestOptions) - Optional - Options for the request. ### Request Example ```typescript await client.conversationalAi.tests.folders.get("tfld_7301khxdkycse5f88fzjdtrterzm"); ``` ``` -------------------------------- ### Create a New Studio Project Chapter Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Creates a new chapter for a Studio project, either as a blank chapter or from a provided URL. Requires the project ID and chapter details. ```typescript await client.studio.projects.chapters.create("21m00Tcm4TlvDq8ikWAM", { name: "Chapter 1" }); ``` -------------------------------- ### Convert Studio Project Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Initiates the conversion process for a Studio project and all its associated chapters. Requires the project ID. ```typescript await client.studio.projects.convert("21m00Tcm4TlvDq8ikWAM"); ``` -------------------------------- ### Get Convai Dashboard Settings Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Retrieves Convai dashboard settings for the workspace. ```APIDOC ## Get Convai Dashboard Settings ### Description Retrieve Convai dashboard settings for the workspace. ### Method GET ### Endpoint `/conversationalAi/dashboard/settings` ### Parameters #### Path Parameters None #### Query Parameters None ### Request Example ```typescript await client.conversationalAi.dashboard.settings.get(); ``` ### Response #### Success Response (200) - **settings** (object) - The dashboard settings object. ``` -------------------------------- ### Get Conversation Tag Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Retrieves a specific conversation tag by its unique identifier. ```APIDOC ## get ### Description Get a conversation tag by ID. ### Method GET ### Endpoint /conversationalAi/conversations/tags/{tag_id} ### Parameters #### Path Parameters - **tag_id** (string) - Required - The unique identifier of the tag to retrieve. #### Request Body (Not applicable for GET requests) #### Query Parameters - **requestOptions** (object) - Optional - Options for the request. ### Response #### Success Response (200) - **id** (string) - The unique identifier for the tag. - **title** (string) - The title of the tag. - **created_at** (string) - The timestamp when the tag was created. #### Response Example ```json { "id": "tag_abc123", "title": "My New Tag", "created_at": "2023-10-27T10:00:00Z" } ``` ``` -------------------------------- ### MCP Servers - Get Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Retrieve a specific MCP server configuration from the workspace. ```APIDOC ## GET MCP Server ### Description Retrieve a specific MCP server configuration from the workspace. ### Method GET ### Endpoint /conversationalAi/mcpServers/{mcp_server_id} ### Parameters #### Path Parameters - **mcp_server_id** (string) - Required - ID of the MCP Server. #### Request Body None ### Response #### Success Response (200) - **[Response Fields]** (object) - Details of the MCP server configuration. ### Request Example ```typescript await client.conversationalAi.mcpServers.get("mcp_server_id"); ``` ### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### client.textToVoice.createPreviews Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Creates a voice from a text prompt. ```APIDOC ## client.textToVoice.createPreviews ### Description Create a voice from a text prompt. ### Parameters #### Request Body - **outputFormat** (string) - Required - The desired audio output format. - **voiceDescription** (string) - Required - A description of the voice to create. ### Request Example ```typescript await client.textToVoice.createPreviews({ outputFormat: "mp3_22050_32", voiceDescription: "A sassy squeaky mouse" }); ``` ### Response #### Success Response - **audio** (string) - The generated audio as a base64 encoded string. - **voice_id** (string) - The ID of the created voice. ``` -------------------------------- ### ConversationalAi PhoneNumbers Get Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Retrieve details for a specific Phone Number by its ID. ```APIDOC ## ConversationalAi PhoneNumbers Get ### Description Retrieve Phone Number details by ID. ### Method GET ### Endpoint /conversationalAi/phoneNumbers/{phone_number_id} ### Parameters #### Path Parameters - **phone_number_id** (string) - Required - The ID of the phone number to retrieve. ### Request Example ```typescript await client.conversationalAi.phoneNumbers.get("TeaqRRdTcIfIu2i7BYfT"); ``` ### Response #### Success Response (200) - **id** (string) - The ID of the phone number. - **phoneNumber** (string) - The phone number. - **provider** (string) - The provider used. - **label** (string) - The label assigned to the phone number. #### Response Example ```json { "id": "phone_number_id", "phoneNumber": "+1234567890", "provider": "twilio", "label": "My Office Line" } ``` ``` -------------------------------- ### client.workspace.invites.createBatch Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Sends email invitations to join your workspace to the provided emails. Requires all email addresses to be part of a verified domain. If the users don't have an account they will be prompted to create one. If the users accept these invites they will be added as users to your workspace and your subscription using one of your seats. This endpoint may only be called by workspace members with the WORKSPACE_MEMBERS_INVITE permission. ```APIDOC ## POST /v1/workspace/invites/add-bulk ### Description Sends email invitations to join your workspace to the provided emails. Requires all email addresses to be part of a verified domain. If the users don't have an account they will be prompted to create one. If the users accept these invites they will be added as users to your workspace and your subscription using one of your seats. This endpoint may only be called by workspace members with the WORKSPACE_MEMBERS_INVITE permission. ### Method POST ### Endpoint /v1/workspace/invites/add-bulk ### Parameters #### Request Body - **request** (ElevenLabs.workspace.BodyInviteMultipleUsersV1WorkspaceInvitesAddBulkPost) - Required - The request body containing a list of emails to invite. - **requestOptions** (InvitesClient.RequestOptions) - Optional - Options for the request. ### Request Example ```json { "emails": ["emails"] } ``` ### Response #### Success Response (200) - **invites** (ElevenLabs.AddWorkspaceInviteResponseModel) - Details of the created invites. ``` -------------------------------- ### Create AudioNative Project Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Creates an AudioNative enabled project, optionally starts conversion, and returns the project ID and an embeddable HTML snippet. Requires a project name. ```typescript await client.audioNative.create({ name: "name" }); ``` -------------------------------- ### client.conversationalAi.tests.folders.create Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Creates a folder for organizing agent tests. ```APIDOC ## client.conversationalAi.tests.folders.create ### Description Creates a folder for organizing agent tests. ### Method ``` client.conversationalAi.tests.folders.create(params: { request: ElevenLabs.conversationalAi.tests.BodyCreateAgentTestFolderV1ConvaiAgentTestingFoldersPost, requestOptions?: FoldersClient.RequestOptions }) ``` ### Parameters #### Request Body - **request** (ElevenLabs.conversationalAi.tests.BodyCreateAgentTestFolderV1ConvaiAgentTestingFoldersPost) - Required - The request body for creating an agent test folder. #### Request Options - **requestOptions** (FoldersClient.RequestOptions) - Optional - Options for the request. ### Request Example ```typescript await client.conversationalAi.tests.folders.create({ name: "name" }); ``` ``` -------------------------------- ### Get Tool Executions Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Retrieves a paginated list of tool executions for a specified tool. ```APIDOC ## GET /conversationalAi/tools/executions/{tool_id} ### Description Get paginated list of tool executions for a specific tool. ### Method GET ### Endpoint /conversationalAi/tools/executions/{tool_id} ### Parameters #### Path Parameters - **tool_id** (string) - Required - ID of the requested tool. #### Query Parameters - **cursor** (string) - Optional - Cursor for pagination. - **pageSize** (number) - Optional - Number of items per page. - **isError** (boolean) - Optional - Filter by error status. - **agentId** (string) - Optional - Filter by agent ID. - **branchId** (string) - Optional - Filter by branch ID. - **startTime** (number) - Optional - Start time for filtering. - **endTime** (number) - Optional - End time for filtering. #### Request Body None ### Response #### Success Response (200) - **ElevenLabs.GetToolExecutionsPageResponseModel** - The response object containing paginated tool executions. ``` -------------------------------- ### Create Pronunciation Dictionaries for a Studio Project Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Creates pronunciation dictionaries for a project, marking text for reconversion. Requires the project ID and a dictionary locator object. ```typescript await client.studio.projects.pronunciationDictionaries.create("21m00Tcm4TlvDq8ikWAM", { pronunciationDictionaryLocators: [{ pronunciationDictionaryId: "pronunciation_dictionary_id" }] }); ``` -------------------------------- ### client.environmentVariables.get Source: https://github.com/elevenlabs/elevenlabs-js/blob/main/reference.md Get a specific environment variable by its ID. Requires the environment variable ID. ```APIDOC ## client.environmentVariables.get ### Description Get a specific environment variable by ID. ### Method `client.environmentVariables.get(env_var_id: string, requestOptions?: EnvironmentVariablesClient.RequestOptions): ElevenLabs.EnvironmentVariableResponse` ### Parameters #### Path Parameters * **env_var_id** (string) - Required - The ID of the environment variable. #### Request Body * **requestOptions** (EnvironmentVariablesClient.RequestOptions) - Optional ### Request Example ```typescript await client.environmentVariables.get("env_var_id"); ``` ```