Let’s say we want to create an API using FastAPI for document indexing and retrieval which has: