> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryelixir.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK Guide

> Learn how to use the Elixir SDKs

## Available SDKs

We currently support the following SDKs:

| SDK                                                  | Examples                                                                                                                                                                               | Requirements      |
| ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |
| [Python SDK](https://github.com/tryelixir/elixir-py) | [Vapi Bot](https://github.com/tryelixir/elixir-py/tree/main/examples/apps/vapi-chatbot), [Pipecat Bot](https://github.com/tryelixir/elixir-py/tree/main/examples/apps/pipecat-chatbot) | Must use Python 3 |

Please reach out to the Elixir team if you need support for your language. In the meantime, you can work with our API directly.

## Installation

<CodeGroup>
  ```shell Python SDK theme={null}
  pip install elixir-ai
  ```
</CodeGroup>

## SDK Functionality

The following is a list of SDK methods with examples on how they can be invoked.

### Initialization

Instruments calls to LLM and Retrieval services. See more info in our Tracing docs.

**Method:** `init`

**Usage Examples:**

<CodeGroup>
  ```python Python theme={null}
  # import Elixir
  from elixir import Elixir

  Elixir.init()
  ```
</CodeGroup>

***

### Track Conversation

Associates a trace with a specific conversation. This populates the conversation table in the dashboard and allows you to see the transcript and call analytics for the full conversation.

**Method:** `track_conversation`

**Parameters:**

* `conversation_id` **(String)**: ID of the conversation the current trace should be associated with.
* `conversation_properties` **(Object)** *\[optional]*: Custom properties to add to the conversation.

**Usage Examples:**

<CodeGroup>
  ```python Python theme={null}
  conversation_id = "12345"
  conversation_properties = {
      "topic": "Scheduling",
      "bot_name": "Alice",
  }

  Elixir.track_conversation(conversation_id, conversation_properties)
  ```
</CodeGroup>

***

### Track User

Matches traces and corresponding conversation with a provided user ID.

**Method:** `track_user`

**Parameters:**

* `user_id` **(String)**: ID of the user the current trace should be associated with.
* `user_properties` **(Object)** *\[optional]*: Custom properties to add to the user.

**Usage Examples:**

<CodeGroup>
  ```python Python theme={null}
  user_id = "usr-8234DFT6-9823"
  user_properties = {
      "name": "White Oaks Auto Dealership",
      "plan": "Enterprise",
  }

  Elixir.track_user(user_id, user_properties)
  ```
</CodeGroup>

***

### Upload Audio

Sends a recording link or audio file to Elixir and ties it to a provider conversation ID.

**Method:** `upload_audio` Async

**Parameters:**

* `conversation_id` **(String)**: ID of the conversation the audio file should be tied to.
* `audio_url` **(String)** *\[optional]*: Publicly accessible link to hosted recording.
* `audio_buffer` **(Bytes)** *\[optional]*: Bytes object containing audio file. Use audio\_buffer and audio\_content\_type if you can't send an audio\_url.
* `audio_content_type` **(String)** *\[optional]*: Content type of the provided audio\_buffer.

**Usage Examples:**

<CodeGroup>
  ```python Python (With URL) theme={null}
  conversation_id = "12345"
  audio_url = "https://example.com/path/to/your/audiofile.wav"

  await Elixir.upload_audio(
      conversation_id=conversation_id,
      audio_url=audio_url
  )
  ```

  ```python Python (File Upload) theme={null}
  conversation_id = "12345"
  audio_file = "path/to/audiofile.wav"
  audio_content_type = "audio/wav"  # The MIME type of the audio file

  # Read the audio file into a bytes object
  with open(audio_file_path, "rb") as audio_file:
      audio_buffer = audio_file.read()

  await Elixir.upload_audio(
      conversation_id=conversation_id,
      audio_buffer=audio_buffer,
      audio_content_type=audio_content_type
  )
  ```
</CodeGroup>
