# Minimal API

*noun*

say it: **“MIN-ih-mul AY-PEE-EYE”** **/ˈmɪnɪməl ˌeɪ piː ˈaɪ/**

An ASP.NET Core style where each endpoint is mapped straight to a function, without controller classes.

## What is **Minimal API**?

A **minimal API** maps each endpoint straight to a function with `MapGet`, `MapPost` and so on, with no controller classes. It is short, fast and the default in new templates.

```csharp
app.MapGet("/recipes/{id:int}", async (int id, IRecipeRepository recipes) =>
    await recipes.FindAsync(id) is { } recipe ? Results.Ok(recipe) : Results.NotFound());
```

## In a sentence

- “Our small service is a **minimal API**: three MapGet lines in Program.cs.”

Level: Apprentice · [More ASP.NET Core terms at this level](https://www.ask-codey.com/glossary?category=aspnet-core&level=2)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/minimal-api
