Skip to content

Quick Start

Get started with the OpenSauce API in just a few minutes.

Before you begin, you’ll need:

  1. Go to the OpenSauce Dashboard
  2. Sign in with your GitHub account
  3. Navigate to API Keys
  4. Click Create API Key
  5. Give your key a name (e.g., “My App - Development”)
  6. Copy the generated API key (you won’t be able to see it again!)

Here’s a simple example using JavaScript:

// Get all approved recipes
const response = await fetch('https://api.os.eura.dev/api/v1/recipes', {
headers: {
'Authorization': `Bearer YOUR_API_KEY`
}
});
const data = await response.json();
console.log(data.recipes);

Replace YOUR_API_KEY with your actual API key.

// Get by ID
const response = await fetch('https://api.os.eura.dev/api/v1/recipes/rec_123456');
// Or get by slug
const response = await fetch('https://api.os.eura.dev/api/v1/recipes/spaghetti-carbonara');
// Get recipes with query parameters
const params = new URLSearchParams({
page: '1',
limit: '10',
q: 'pasta',
tag: 'Italian'
});
const response = await fetch(`https://api.os.eura.dev/api/v1/recipes?${params}`);

To submit a recipe, you’ll need to authenticate with your session cookie:

// First, authenticate via GitHub OAuth
// Then use your session cookie with recipe submission
const recipeData = {
title: 'My Amazing Recipe',
description: 'A delicious dish that everyone will love.',
version: '1.0.0',
difficulty: 'medium',
yield: { amount: 4, unit: 'servings' },
times: {
prepMinutes: 15,
cookMinutes: 30,
totalMinutes: 45
},
tags: ['dinner', 'easy', 'family'],
ingredients: [
{ name: 'Chicken Breast', amount: 2, unit: 'lbs' },
{ name: 'Olive Oil', amount: 2, unit: 'tbsp' }
],
instructions: [
{ step: 1, text: 'Heat oil in a pan over medium heat.' },
{ step: 2, text: 'Add chicken and cook until golden brown.' }
],
media: [],
nutrition: null
};
const response = await fetch('https://api.os.eura.dev/api/v1/recipes', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
// Include your session cookie
'Cookie': 'session=YOUR_SESSION_TOKEN'
},
body: JSON.stringify(recipeData)
});

Check out these example projects to see how others are using OpenSauce:

If you run into any issues, check out our FAQ or join our Discord community for support.