Skip to Content

API Documentation

Recipe API
v1.0.0
This API handles user authentication, API token management, and recipe-related operations. It supports advanced recipe search functionality using embedding similarity, as well as AI-generated recipe creation. Ideal for use in cooking apps, meal planners, and culinary recommendation engines. ## Features - Register/login/logout endpoints for user authentication - API token lifecycle (create, list, delete) - Weighted search by recipe name, ingredients, and steps - Fine-grained similarity search using tokenized fields with weight multipliers - AI-powered recipe generation from prompt input ## Usage Examples To search for a recipe: ```json { "name": "Tomato Soup", "ingredients": ["tomato", "basil"], "steps": ["Boil water", "Add tomatoes"], "nameWeight": 0.5, "ingredientsWeight": 0.3, "stepsWeight": 0.2 } ``` To generate a recipe: `POST /recipes/generate?prompt=Create a gluten-free dessert using coconut flour`

Auth

3
POST/auth/login
Login
Authenticate a user using email and password.

Responses

POST/auth/register
Register
Register a new user account.

Responses

POST/auth/logout
Logout
Logout the current authenticated user.

Responses

Tokens

3
GET/tokens/
Find All Tokens
Retrieve all API tokens for the current user.

Responses

POST/tokens/
Create Token
Generate a new API token for authenticated access.

Responses

DELETE/tokens/{token_id}
Delete Token
Delete a specific API token by ID.

Parameters

token_idpathrequired
Type: integer

Responses

Other

3
GET/recipes/search/by-name
Search Recipe By Name
Search recipes by exact or partial name match.

Parameters

namequery
Type: string

Responses

POST/recipes/search
Search Recipes
Search for the most similar recipe based on various weighted fields.

Request Body

$ref: #/components/schemas/RecipeSearchParams

Responses

POST/recipes/similar
Similar Recipes
Find recipes based on detailed weighted similarity input.

Request Body

$ref: #/components/schemas/SimilaritySearchParams

Responses

Last updated on