---
title: "Moda"
description: "Forward Respan LLM events to Moda via the gateway for product analytics and observability."
---

[Moda](https://www.moda.run/) is a product analytics platform that helps you understand user behavior. Connect it with Respan to forward LLM call events to Moda and monitor LLM performance alongside your product analytics.

<Accordion title="Set up Respan">
Create an account at [platform.respan.ai](https://platform.respan.ai) and grab an [API key](https://platform.respan.ai/platform/gateway/api-keys). For gateway, also add [credits](https://platform.respan.ai/platform/gateway/credits) or a [provider key](https://platform.respan.ai/platform/gateway/api-keys?providers=1).
</Accordion>

<Tabs>
<Tab title="Gateway">

<Note>The Moda integration runs through the Respan gateway. Pass your Moda credentials in `moda_integration` and Respan forwards LLM events to your Moda project.</Note>

Paste this into your coding agent:

```text
Help me set up Respan tracing with the Moda integration.
Follow https://www.respan.ai/docs/integrations/moda.md
```

## Setup

<Steps>
<Step title="Create your Moda account">

Go to [Moda](https://www.moda.run/) and create an account. From your Moda project settings, grab your Moda API key and host.

</Step>

<Step title="Set environment variables">

```bash
export RESPAN_API_KEY="YOUR_RESPAN_API_KEY"
export MODA_API_KEY="YOUR_MODA_API_KEY"
export MODA_BASE_URL="YOUR_MODA_ENDPOINT"
```

</Step>

<Step title="Add moda_integration to your request body">

```python
import os
import requests

response = requests.post(
    "https://api.respan.ai/api/chat/completions",
    headers={
        "Content-Type": "application/json",
        "Authorization": f"Bearer {os.environ['RESPAN_API_KEY']}",
    },
    json={
        "model": "gpt-4.1-nano",
        "messages": [{"role": "user", "content": "Hello"}],
        "moda_integration": {
            "moda_api_key": os.environ["MODA_API_KEY"],
            "moda_base_url": os.environ["MODA_BASE_URL"],
        },
    },
)
print(response.json())
```

</Step>

<Step title="Build a dashboard in Moda">

Once connected, create dashboards in Moda to monitor LLM performance and track key metrics.

</Step>
</Steps>

</Tab>
</Tabs>
