Get a pixiv token
PixivFE talks to pixiv as a logged-in user. Your "token" is the PHPSESSID cookie pixiv sets when you log in.
WARNING
For a public instance, use a spare account. The Discovery page shows content based on the account's preferences, and pixiv may suspend accounts that send many requests.
1. Log in
Log in to pixiv, or open https://www.pixiv.net/ if you already are.

2. Find the cookie
Press F12 to open developer tools.
| Firefox | Chrome | |
|---|---|---|
| Tab | Storage | Application |
| Sidebar | Cookies → www.pixiv.net | Storage → Cookies → www.pixiv.net |
Copy the value next to PHPSESSID. It looks like 123456_AaBbccDDeeFFggHHIiJjkkllmMnnooPP: your member ID, an underscore, then random characters.
Screenshots
Firefox:


Chrome:


3. Give it to PixivFE
Set PIXIVFE_TOKEN to the value. For several accounts, separate tokens with commas:
PIXIVFE_TOKEN=token1,token2,token3Logging out of pixiv ends the token. Get a new one if PixivFE stops working after you log out.
4. Adjust account settings (optional)
PixivFE works best when the account has:
- Japan as its region
- R-18G content shown
- AI-generated works shown
deploy/prepare-account.sh sets these for you:
./deploy/prepare-account.sh YOUR_TOKENOr set them by hand in pixiv's display settings. To check that R-18G works, open the gore search endpoint and look for R-18G tags in the results.
Chrome steps adapted from Nandaka's PixivUtil2 guide.