HENFOIL · Beginner · Authentication
Authentication
Create and prove a HENFOIL API key (hfk_) step by step.
Automation for HENFOIL uses one product API key. Keys start with hfk_. A key from another product will not work here.
Create your key
- Sign in at hendoi.com/login.
- Open Settings → Generate API key for HENFOIL (or the HENFOIL Developers page).
- Copy the full
hfk_…value once. The server stores a hash; you will not see the full key again. - Put it in your environment:
HENFOIL_API_KEY=hfk_….
How to send the key
Prefer this header on every call:
Authorization: Bearer hfk_…
Or send the raw key (no Bearer) as:
X-Henfoil-Key: hfk_…
Never put the key in the JSON body or in a query string. Never commit it to git.
Prove the key works
Send this GET before any analysis call:
GET https://henfoil.hendoi.com/api/v1/usage
Authorization: Bearer hfk_demo_4c91e2ab8d07
- Replace the demo key with your live key.
- Expect HTTP
200and a usage JSON object. - If you get
401, generate a new key and update every copy.
Python check
pip install henfoil
# set HENFOIL_API_KEY first
from henfoil import Client
print(Client().usage())
JavaScript check
npm install @hendoi/henfoil
import { Client } from "@hendoi/henfoil";
const usage = await new Client().usage();
console.log(usage);
Common mistakes
- Using a HENFOIL
hfk_key (or any other product key) against HENFOIL. - Adding an extra space or newline when pasting the key.
- Calling the wrong host (use
https://henfoil.hendoi.comin production). - Free plan with 0 automation calls left — upgrade or wait for the monthly reset (UTC).
Next: Limits and errors · back to Overview.
