Skip to main content

Prerequisites

Before you start, you will need:
  • A Moda API key (contact your administrator)
  • An API key from your LLM provider (OpenAI, Anthropic, or AWS credentials)

Step 1: Make your first request

Replace YOUR_MODA_API_KEY and YOUR_OPENAI_KEY with your actual keys:
curl https://api.example.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_MODA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-Provider-Key: YOUR_OPENAI_KEY" \
  -d '{
    "model": "gpt-4o@@openai",
    "messages": [
      {"role": "user", "content": "Hello, how are you?"}
    ]
  }'

Step 2: Try different models

The model field uses a simple format: model-name@@provider
{
  "model": "gpt-4o@@openai",
  "messages": [...]
}

Step 3: View your conversations

After making requests, your conversations are automatically logged. You can view them in the Moda dashboard or query them through the API.

What is next?