1. Path Parameters https://fastapi.tiangolo.com/tutorial/path-params/ from fastapi import FastAPI from enum import Enum class ModelName(str, Enum): alexnet = 'alexnet' resnet = 'resnet' lenet = 'lenet' app = FastAPI() @app.get('/models/{model_name}') async def get_model(model_name: ModelName): if model_name is ModelName.alexnet: return {'model_name': model_name, 'message': 'Deep Leraning FTW!'} ..