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
- Log in to the ModelRelay dashboard
- Click New Project
- Enter a name for your project
- Click Create
Step 2: Configure Provider Keys
Add your AI provider API keys:
- Go to your project settings
- Click Provider Keys
- Add keys for each provider you want to use
Step 3: Create an API Key
Generate a secret key for your backend:
- Go to API Keys in your project
- Click Create Key
- 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
- Authentication - Learn about API key types
- Customer Tokens - Issue tokens for your users
- Streaming - Stream responses in real-time