# Get started

This guide explains how to integrate the `ojin/oris-portrait` persona model into your applications using either Pipecat or WebSockets

## 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 Persona](/models/oris-portrait/creating-persona.md) or use a [Persona Template](/models/oris-portrait/using-persona-template.md)
3. Save the Persona Configuration ID from the dashboard
4. Integrate with your application using either [Pipecat](#pipecat-integration) or [WebSockets](#websocket-integration)

{% hint style="info" %}
**Staging deployments:** For secure, low-latency video applications, connect to the real-time WebSocket API from a backend server rather than a front-end client (to keep your API key secure and leverage a network transport appropriate for real-time video media delivery under varying network conditions). Typically, WebRTC is used to deliver the final media stream to end users for smooth, reliable, low-latency playback.
{% endhint %}

{% tabs %}
{% tab title="Pipecat" %}

#### Pipecat Integration

[Pipecat](https://github.com/pipecat-ai/pipecat) is a powerful open source framework for building conversational AI pipelines. The `ojin/oris-portrait` model integrates seamlessly with Pipecat through our dedicated `OjinVideoService`.

Clone the pipecat repository and open the ready to use [video-avatar-ojin-video-service example](https://github.com/ojinai/pipecat/blob/add-ojin/examples/video-avatar/video-avatar-ojin-video-service.py).

To start using it, create a python virtual environment on it and install requirements

```bash
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```

Create a `.env` file and add your Ojin credentials along with the API keys for the STT, LLM and TTS services used by the example

```bash
OJIN_API_KEY="your_api_key_here"
OJIN_CONFIG_ID="your_persona_id_here"
DEEPGRAM_API_KEY="your_deepgram_api_key_here"
CARTESIA_API_KEY="your_cartesia_api_key_here"
OPENAI_API_KEY="your_openai_api_key_here"
```

Once configured, run the example and connect with a local WebRTC client (or Daily) to interact with a conversational, human-like avatar

```bash
python examples/video-avatar/video-avatar-ojin-video-service.py
```

**How It Works**

1. The microphone captures speech input
2. Voice Activity Detection identifies speech segments
3. Deepgram transcribes user audio to text (STT)
4. OpenAI generates the assistant's reply (LLM)
5. Cartesia synthesizes the reply to audio (TTS)
6. The OjinVideoService animates your persona based on the TTS audio
7. Video and audio frames are streamed back to the client in real-time

{% hint style="info" %}
You can customize the pipeline by adding or removing components, or by adjusting their parameters to suit your needs.
{% endhint %}
{% endtab %}

{% tab title="WebSocket" %}

#### WebSocket Integration

For WebSocket integration check our [API Reference →](/models/oris-portrait/api.md)
{% endtab %}
{% endtabs %}

## Next Steps

#### API Reference

Dive deeper into the model API for custom integrations

[API Reference →](/models/oris-portrait/api.md)


---

# Agent Instructions: 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:

```
GET https://docs.ojin.ai/models/oris-portrait/integrations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
