Prerequisites
Before you start, you need:- A Moda API key — get one from the Moda dashboard
- An API key from your LLM provider — OpenAI or Anthropic
- Python 3.9+ or Node.js 18+
Step 1: Install the SDK
Install the Moda SDK along with your LLM provider’s client library:Step 2: Make your first request
ReplaceYOUR_MODA_API_KEY and your provider API key with your actual keys.
Step 3: Try a different provider
Moda works the same way with Anthropic. Initialize Moda, use the provider client as normal, and Moda captures everything automatically.Step 4: View your conversations
After running the code above, open the Moda dashboard to see your conversations. Each LLM call is automatically logged with the full request, response, model, and token usage.Troubleshooting
| Problem | Solution |
|---|---|
| Data not appearing in the dashboard | Make sure moda.init() is called before creating the LLM client, and call moda.flush() before your process exits. |
ModuleNotFoundError: No module named 'moda' | Run pip install moda-ai (the package name is moda-ai, not moda). |
Cannot find module 'moda-ai' | Run npm install moda-ai in your project directory. |