Quick Start
Quick Start
Section titled “Quick Start”Get started with the OpenSauce API in just a few minutes.
Prerequisites
Section titled “Prerequisites”Before you begin, you’ll need:
- A GitHub account for authentication
- An OpenSauce account (sign up at dash.os.eura.dev)
- An API key (get one from the dashboard)
Step 1: Get Your API Key
Section titled “Step 1: Get Your API Key”- Go to the OpenSauce Dashboard
- Sign in with your GitHub account
- Navigate to API Keys
- Click Create API Key
- Give your key a name (e.g., “My App - Development”)
- Copy the generated API key (you won’t be able to see it again!)
Step 2: Make Your First Request
Section titled “Step 2: Make Your First Request”Here’s a simple example using JavaScript:
// Get all approved recipesconst 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.
Step 3: Try More Endpoints
Section titled “Step 3: Try More Endpoints”Get a Specific Recipe
Section titled “Get a Specific Recipe”// Get by IDconst response = await fetch('https://api.os.eura.dev/api/v1/recipes/rec_123456');
// Or get by slugconst response = await fetch('https://api.os.eura.dev/api/v1/recipes/spaghetti-carbonara');Search and Filter
Section titled “Search and Filter”// Get recipes with query parametersconst params = new URLSearchParams({ page: '1', limit: '10', q: 'pasta', tag: 'Italian'});
const response = await fetch(`https://api.os.eura.dev/api/v1/recipes?${params}`);Step 4: Submit a Recipe
Section titled “Step 4: Submit a Recipe”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 submissionconst 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)});Next Steps
Section titled “Next Steps”- Authentication Guide - Learn about auth options
- API Reference - Recipes - Full recipes endpoint documentation
- Submitting Recipes Guide - Detailed recipe submission guide
Example Projects
Section titled “Example Projects”Check out these example projects to see how others are using OpenSauce:
- Recipe Blog Starter - Next.js
- Meal Planner - React + Vite
- Mobile App - React Native
Need Help?
Section titled “Need Help?”If you run into any issues, check out our FAQ or join our Discord community for support.