# API Documentation

* The cool thing about FastAPI is that it's self documenting
* Meaning that you don't have to create any sort of API documentation
* This is done by using Swagger UI
* And is accessed by using the base ROOT URL with <mark style="color:orange;">`/docs`</mark>&#x20;

Example:

```markup
http://127.0.0.1:8000/docs
```

* It redirects you to a page with all the documentation

![](/files/4GMCEI1kTZ9zy15xfaZy)

* Additionally this also allows you to see what is required to run the query successfully and try it out from the documentation itself

![](/files/RCQzNzsUmquRUq7SHjOb)

![
](/files/0hBrozkELQT45bMBt9DU)

* There is an alternative documentation tool as well called Redoc
* This can be accessed by using the base URL + <mark style="color:orange;">`/redoc`</mark>

```markup
http://127.0.0.1:8000/redoc
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.arkannis.net/programming/python/frameworks/fastapi/api-documentation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
