Getting Started
Get VersionR integrated into your app in under 5 minutes.
Create a project
Log in to app.versionr.ai and create a new project. Give it a name and slug — the slug is how the SDK identifies your project.
Create your first prompt
Inside your project, click New Prompt. Give it:
- A name (e.g.
Interviewer System) - A slug (e.g.
interviewer-system) — this is what you’ll reference in your code
Write your prompt content. Use {{double_curly_braces}} for any dynamic values:
You are an experienced technical interviewer.
Your candidate is {{candidate_name}}, applying for a {{job_role}} role.
Difficulty level: {{difficulty}}.
Conduct a professional but friendly interview.Click Save Version — this creates v1 of your prompt.
Deploy to an environment
On the Versions tab, click Deploy → development on v1. Your prompt is now live in the development environment.
Get your API key
In your project, go to the API Keys tab and create a key. Copy it — you’ll only see it once.
Install the SDK
npm install versionr
# or
pnpm add versionr
# or
yarn add versionrFetch your prompt
import { VersionR } from 'versionr'
const pd = new VersionR({
apiKey: process.env.VERSIONR_API_KEY,
})
// Fetch the active prompt for the development environment
const prompt = await pd.get('interviewer-system', { env: 'development' })
console.log(prompt.content)
// → "You are an experienced technical interviewer..."Render with variables
const rendered = await pd.render('interviewer-system', {
env: 'development',
variables: {
candidate_name: 'Eoin',
job_role: 'Senior Engineer',
difficulty: 'hard',
},
})
console.log(rendered.content)
// → "You are an experienced technical interviewer.
// Your candidate is Eoin, applying for a Senior Engineer role.
// Difficulty level: hard...."Pass it to your LLM
import OpenAI from 'openai'
const openai = new OpenAI()
const response = await openai.chat.completions.create({
model: rendered.model, // model is versioned alongside your prompt
temperature: rendered.temperature,
messages: [
{ role: 'system', content: rendered.content },
{ role: 'user', content: userMessage },
],
})What’s next?
- Deploy to production — promote a version to production
- Log results — send results back to VersionR for visibility
- A/B testing — split traffic between two prompt variants
- SDK Reference — full API reference
SDK reliability — if VersionR is unreachable, the SDK returns a cached version of your prompt and never crashes your app. See error handling.