diff --git a/www/kojiweb/api.chtml b/www/kojiweb/api.chtml
index 1a23dbf5..ea2fb3c8 100644
--- a/www/kojiweb/api.chtml
+++ b/www/kojiweb/api.chtml
@@ -3,6 +3,26 @@
API reference (hub version: $koji_version, web version: $koji.__version__)
+Various constants used in API calls can be found in first part of koji module.
+Exceptions which can be raised in python client are just after constants section.
+
+Basic anonymous client in python would look like this:
+
+
+import koji
+
+mytag = "mytag"
+session = koji.ClientSession("$koji_hub_url")
+try:
+ repo_info = session.getRepo(mytag, koji.REPO_STATES["READY"], dist=True)
+ if not repo_info:
+ print(f"There is no active dist repo for {mytag}")
+except koji.GenericError:
+ print(f"Tag {mytag} doesn't exist")
+
+
+List of API calls
#for method in $methods
-
diff --git a/www/kojiweb/index.py b/www/kojiweb/index.py
index 0aac4564..21b0c657 100644
--- a/www/kojiweb/index.py
+++ b/www/kojiweb/index.py
@@ -2517,6 +2517,7 @@ def api(environ):
values = _initValues(environ, 'API', 'api')
server = _getServer(environ)
+ values['koji_hub_url'] = environ['koji.options']['KojiHubURL']
values['methods'] = sorted(server._listapi(), key=lambda x: x['name'])
try:
values['koji_version'] = server.getKojiVersion()