Notion AI is a strong artificial intelligence feature that uses GPT-3. It's found within the productivity app Notion. You can use Notion AI within Notion, but there isn't an official API available yet.
This Python client is unofficial, and it helps you use Notion AI in your Python projects.
- Get
token_v2
andscpace_id
from your browser - Copy
.env.example
file to the.env
file - Set
TOKEN_V2
andSPACE_ID
variables in you.env
files
-
Open inspector in your browser
-
Make any request to the Notion AI in the browser
-
Find and copy
token_v2
- Find and copy
spaceId
So far, only the help_me_write
method is available. You can use it to generate text.
from notion_ai.client import notion_ai_client
prompt = "write a haiku poem about a dog in a space with dramatic tone of voice"
result = notion_ai_client.help_me_write(prompt)
The MIT License. Please see License File