Credits: This project is a fork of Notion2API, originally created and authored by GALIAIS (© 2026). All credit for the original work goes to the original author. This fork is maintained by hugevo.
Notion-Sub2API is a local service that helps you connect to Notion AI through a simple API. It gives you:
- OpenAI-style API endpoints
- A web admin page for setup and account control
- Support for multiple accounts
- Local SQLite storage for data and session state
- Support for streaming replies
- Support for attachments like images, PDFs, and CSV files
Use it when you want one local place to manage access, test requests, or connect other tools to Notion AI.
Notion-Sub2API is designed to run in Docker. There is no standalone Windows build — all you need is Docker.
Open config.docker.json and update the key values before starting (see 🔧 Configuration below).
docker compose up -d --buildFor a production-style setup:
docker compose -f docker-compose.prod.yml up -d --buildIn your browser, go to:
http://127.0.0.1:8787/admin
Use this page to sign in, manage accounts, and check service status.
curl http://127.0.0.1:8787/healthzIf the page returns a healthy status, the service is running.
docker compose logs -fTo stop the service:
docker compose downBefore you start the container, edit config.docker.json and set these values:
-
api_keyThis is the key used for the OpenAI-style API. -
admin.passwordThis is the password for the WebUI login. -
upstream_base_urlThis is the address of the upstream site. -
upstream_originThis is the origin header used for upstream requests. -
Account pool settings Use these to add more than one account and switch between them.
After the container starts, use these local addresses:
- API:
http://127.0.0.1:8787/v1/* - Health check:
http://127.0.0.1:8787/healthz - WebUI:
http://127.0.0.1:8787/admin
/v1/models/v1/chat/completions/v1/responses/admin/healthz
- Send chat requests through OpenAI-style endpoints
- Use streaming responses
- Manage several accounts in one place
- Refresh login state
- Send file-based requests with images, PDFs, and CSV files
- Store data locally in SQLite
- Use the built-in admin page instead of editing files by hand
Notion-Sub2API stores local data in SQLite. This helps keep:
- Account records
- Session state
- Service status
- Local runtime data
The data lives inside the container's data/ volume. Back up that volume if you want your settings and sessions to persist across updates.
- Confirm the container is still running (
docker compose ps) - Check that no other service on the host uses port
8787 - Refresh the page after a few seconds
- Try
http://127.0.0.1:8787/healthzfirst
- Confirm the
admin.passwordvalue inconfig.docker.json - Make sure you are using the right account
- Clear saved browser data for
127.0.0.1
- Check
api_key - Check
upstream_base_url - Check
upstream_origin - Make sure your account is still signed in (check the admin page)
- Inspect the logs with
docker compose logs -f
- Use a strong WebUI password
- Do not share your local API key with other people
- Stop the container when you do not need it (
docker compose down) - Back up the
data/volume before you change settings
- Edit
config.docker.json - Run
docker compose up -d --build - Open
http://127.0.0.1:8787/admin - Sign in
- Check the health page
- Send your first API request
This repository is a maintained fork of the original Notion2API project by GALIAIS.
- Original project: Prudential-flathead401/Notion2API
- Original author & copyright holder: © 2026 GALIAIS
- Fork maintainer: hugevo
The original project is licensed under the MIT License, which permits modification and redistribution. This fork continues under the same MIT License while preserving credit to the original author.
This project is a fork of Notion2API, originally authored by GALIAIS (© 2026).
- Original author: GALIAIS — Prudential-flathead401/Notion2API
- Fork maintainer: hugevo
All original work remains the intellectual property of its respective author. This fork is distributed under the same MIT License as the original project. See LICENSE for details.