> For the complete documentation index, see [llms.txt](https://docs.ojin.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ojin.ai/models/introduction/integrations.md).

# Get started

Build a real-time **Ojin** avatar in minutes — the same flow drives both [Oris Portrait](/models/oris-portrait.md) and [Oris Presence](/models/oris-presence.md). Pick the integration that fits your stack — we recommend the **Python SDK** or **Pipecat**. The raw WebSocket API is there when you need low-level control.

## Prerequisites

1. An Ojin account with an active API key — if you don't have one, [get your API key](/getting-started/authentication.md).
2. [Create a custom persona](/models/introduction/creating-persona.md) or use a [Persona Template](/models/introduction/using-persona-template.md).
3. A `config_id` (your Persona Configuration ID) from the [dashboard](https://ojin.ai/dashboard).

{% hint style="info" %}
**Production deployments:** the realtime transport is a WebSocket for **server-to-server** use over a stable connection. Drive it from a backend server (ideally in **US East**, near Ojin's inference) to keep your API key secure and latency low, then deliver the final media to end users over a transport built for real-time video (typically WebRTC). The Python SDK and Pipecat integration are designed to run server-side.
{% endhint %}

{% tabs %}
{% tab title="Python SDK" %}

### Python SDK

The [`ojin-client`](https://pypi.org/project/ojin-client/) SDK is the fastest way to drive Ojin from your own code — it streams a synchronized talking-avatar video from the TTS audio you feed it.

```bash
pip install "ojin-client[stv]"
```

```python
import os
from ojin.stv import OjinSTVClient

client = OjinSTVClient(
    api_key=os.environ["OJIN_API_KEY"],
    config_id=os.environ["OJIN_CONFIG_ID"],  # your Oris Portrait or Oris Presence config
)
# Feed TTS audio with client.say(...) — or start_turn() + send_tts_audio() to stream —
# and consume the synced 25 fps audio + video from client.output_stream().
```

**Full walkthrough →** [**Build with the Python SDK**](/models/build-with-python-sdk.md)**.**
{% endtab %}

{% tab title="Pipecat" %}

### Pipecat

Drop an Ojin face into a [Pipecat](https://github.com/pipecat-ai/pipecat) voice agent with the [`pipecat-ojin`](https://pypi.org/project/pipecat-ojin/) package. `OjinVideoService` is the one stage that turns a voice agent into a video-call avatar — it sits right after your TTS and lip-syncs to it:

```
transport.input() -> STT -> LLM -> TTS -> OjinVideoService -> transport.output()
```

```bash
pip install pipecat-ojin
```

```python
from pipecat_ojin import OjinVideoService, OjinVideoSettings

avatar = OjinVideoService(
    OjinVideoSettings(
        api_key="OJIN_API_KEY",
        config_id="OJIN_CONFIG_ID",   # your Oris Portrait or Oris Presence config
        image_size=(512, 512),         # must match the transport's video_out size
    )
)
```

#### How it works

1. The microphone captures speech input
2. Voice Activity Detection identifies speech segments
3. Your **STT** service transcribes user audio to text
4. Your **LLM** generates the assistant's reply
5. Your **TTS** service synthesizes the reply to audio
6. `OjinVideoService` animates your persona from that TTS audio
7. Synchronized video and audio frames stream back to the client in real time

A complete, runnable voice + avatar agent (browser WebRTC or Daily) lives in [`pipecat-ojin/examples/ojin-bot`](https://github.com/ojinai/pipecat-ojin/tree/main/examples/ojin-bot). You bring the STT / LLM / TTS services for the pipeline.
{% endtab %}

{% tab title="WebSocket (advanced)" %}

### WebSocket (advanced)

For low-level control, connect directly to the real-time WebSocket API and implement the binary protocol yourself. See the [API Reference (advanced) →](/models/introduction/api.md).
{% endtab %}
{% endtabs %}

## Next Steps

* [**Build with the Python SDK →**](/models/build-with-python-sdk.md) — install, auth, events, and the full quickstart
* [**API Reference (advanced) →**](/models/introduction/api.md) — the raw WebSocket protocol for custom integrations


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ojin.ai/models/introduction/integrations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
