POST
/
v1
/
recipes
/
generate
curl --request POST \
  --url https://api.mrcook.app/v1/recipes/generate \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "prompt": "Cheesburger with Bacon",
  "language": "en",
  "preference": "<string>"
}'
{
  "success": true,
  "data": {
    "id": "018ff556-a36a-7cb8-95a1-a2ac02da3e93",
    "title": "Spicy Bacon Cheddar Cheeseburger with Pickles",
    "description": "Add a spicy kick to the classic American cheeseburger by introducing some heat to the flavors. This burger features a juicy beef patty with a melted cheddar cheese and crispy bacon, combined with a spicy twist to elevate the taste.",
    "servings": "4 servings",
    "preparationTime": 15,
    "cookingTime": 15,
    "cuisine": "American",
    "ingredients": [
      "500 grams ground beef",
      "4 slices bacon",
      "4 slices cheddar cheese",
      "4 hamburger buns",
      "4 tablespoons mayonnaise",
      "4 leaves lettuce",
      "1 tomato, sliced",
      "8 slices pickles",
      "..."
    ],
    "instructions": [
      "Season the ground beef with salt, pepper, and cayenne pepper or hot sauce. Mix well until evenly distributed.",
      "Form the beef into 4 patties, slightly larger than the buns.",
      "...",
      "Cover with the top bun and serve immediately."
    ],
    "language": "en"
  }
}

Authorizations

x-api-key
string
header
required

How to get your API key: https://docs.mrcook.app/api/api-key

Body

application/json
prompt
string
required

The recipe prompt. This can either be a recipe name, description or a list of ingredients. The more details you provide, the better the recipe will be.

Required string length: 1 - 2500
Example:

"Cheesburger with Bacon"

language
enum<string>
default:en

The language to generate the recipe in

Available options:
en,
de,
es,
fr,
pt-BR,
ru,
nl,
it,
nb,
sv,
tr
Example:

"en"

preference
string

Optional dietary preferences (e.g. 'vegetarian', 'vegan', 'gluten-free', 'dairy-free')

Response

200
application/json
Successfully generated recipe.
success
boolean
required
data
object
required