What are FastAPI's two default interactive documentation UIs and URL paths?

This tests whether you know FastAPI's built-in auto-generated docs. A strong answer names Swagger UI at /docs and ReDoc at /redoc, then notes the OpenAPI schema at /openapi.json. A weak answer confuses these with external tools or custom routes.
What's really being asked
This question checks if you have hands-on experience with FastAPI beyond reading a README. It tests whether you know that FastAPI automatically generates interactive API documentation from your Python type hints and path operation definitions. The interviewer wants to see that you understand the framework ships with two distinct documentation interfaces by default and that you know where to find them.
The full answer
A good answer hits four things in order. First, name Swagger UI as the first interactive documentation interface and state its default path is /docs. Second, name ReDoc as the alternative documentation interface and state its default path is /redoc. Third, mention that both are generated from the OpenAPI schema which is automatically available at /openapi.json. Fourth, note that these are enabled by default with zero configuration and are derived from your route definitions, Pydantic models, and type annotations.
The mistakes people make
A red flag is confusing Swagger UI with external tools like Postman or Insomnia. Another red flag is saying the docs are at custom paths like /api/docs without clarifying those are configurable overrides. Some candidates mention only one UI or mix up the names and paths. Saying you disabled them in production without explaining why or how is also a warning sign unless the role specifically requires that hardening.
What usually comes next
An interviewer might ask how to disable or customize the documentation URLs. They might ask what information the OpenAPI schema contains. They could ask how to add authentication to the docs or how to self-host the Swagger UI static assets. Another common follow-up is asking how these auto-generated docs improve API consistency across a team.
A concrete example
If you create a FastAPI app with a single GET endpoint at /items/{item_id} that returns an Item Pydantic model, you can start the server and navigate to http://localhost:8000/docs to see Swagger UI with a Try It Out button. You can also visit http://localhost:8000/redoc to see the same API presented in ReDoc's three-panel layout. Both read from http://localhost:8000/openapi.json, which contains the full OpenAPI specification including your path parameters, response models, and validation constraints.
Interview question
After starting a new FastAPI application with no extra configuration, which documentation interfaces and paths are available by default?
- a.Swagger UI at /docs and ReDoc at /redocCorrect
- b.Swagger UI at /swagger and ReDoc at /redoc
- c.ReDoc at /docs and Swagger UI at /redoc
- d.Postman at /docs and ReDoc at /redoc
Why? this is the answer
FastAPI automatically serves Swagger UI at /docs and ReDoc at /redoc from the OpenAPI schema with zero configuration. Option B is tempting because the tool is named Swagger, but the default path is /docs rather than /swagger.
Just read this? Test yourself on what you have been reading.
Read the original → fastapi.tiangolo.com
- #fastapi
- #openapi
- #swagger
- #python
- #documentation
You just looked this up. Could you explain it out loud?
That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on fastapi — each one lists the topics its interview covers.
See open roles