Getting Started

This guide will walk you through setting up your first ModelRelay project.

Prerequisites

  • A ModelRelay account (sign up)
  • An API key from at least one AI provider (Anthropic, OpenAI, etc.)

Step 1: Create a Project

  1. Log in to the ModelRelay dashboard
  2. Click New Project
  3. Enter a name for your project
  4. Click Create

Step 2: Configure Provider Keys

Add your AI provider API keys:

  1. Go to your project settings
  2. Click Provider Keys
  3. Add keys for each provider you want to use

Step 3: Create an API Key

Generate a secret key for your backend:

  1. Go to API Keys in your project
  2. Click Create Key
  3. Copy the key (it won’t be shown again)

Step 4: Make Your First Request

Install the SDK and make a request:

npm install @modelrelay/sdk
import { ModelRelay } from '@modelrelay/sdk';

const mr = new ModelRelay({
  apiKey: process.env.MODELRELAY_API_KEY,
});

const response = await mr.responses.create({
  model: 'claude-sonnet-4-20250514',
  input: 'What is the capital of France?',
});

console.log(response.output);
// "The capital of France is Paris."

Next Steps