Hugging Face API keys
25 community-sourced Hugging Face keys, re-checked against the API. Copy a key below, export it as HF_TOKEN, and send requests to https://api-inference.huggingface.co.
Keys
- hf_YT1CVdlNpZPC1cyWfRJgf4fST6nTkR4lOb
- hf_bBQgBX1dOdKfocoLV4qVPoZ1f1hyrvid0Y
- hf_aAakcdcCPR6I43Cpht7dfEnes6fY4mrKum
- hf_mZgoUzaMPJHCcen5QH9WpCiiQyH2GBZr46
- hf_FxUa583b8pgtGwuG4ypdNHVACh24fTVj1R
- hf_5Z2bGpM6ZQlOfyCWZVTHBKxl3EIgg4B5yQ
- hf_kfYf5aItazWsg4pA249G9NsFnT1u903wk7
- hf_j2MZy8td2iebVilJZsoZTQ1IRgBV5jbvlJ
- hf_XypkcrpBY4omSiN3xF7i5vEpx1kbl8Et8y
- hf_RWuv4pe56MnvWLy2o47ZFx4Vrmq6cWvvBs
- hf_DnwhELX9yjdiu9erjShPkFIJZM3HiBA6sr
- hf_oZ5COx5sLAtTvXT7rd5TsQ4iPBLtoeinRp
- hf_xTqowTu1CANFuSiqlK7aIUotW2z04MEyCu
- hf_UjliS8tazPyKEZcfLGcanNkQcAPCNLvN6K
- hf_fzYDt0xjEhf6JPTUEcRsGfrgu1LSpH7xtX
- hf_3vWLU4cUnrN1Wl115HLePmoS5AHfgT6asm
- hf_zaN2EQv3TCwC8jAwqXiOwwqVEz9vt4zoMq
- hf_X3IXqZ5hUe6ZXL73sXKRi7Tt5ERvSBe6v3
- hf_2JJFfcIpb0fHfvAhRFzyxo8xMa7J2H4nXB
- hf_IGPIetMnOpFk02LPpGglXYWnO3qAXTCBKb
- hf_5u5d4mdQL3XsyTnHyth8tjQSnIguRkCaXj
- hf_YbYMTosmn93bdbWbOjI1v53nhVqSXGhIox
- hf_zhPNULz9fsBmNoE6RrK4pNDIyQPmQ7kAig
- hf_HWjQ6gyMCZ2CfslybfrSALEuZSZUYQYm9m
- hf_G8aIapxoDSlTmzgo42i0d1PAjdrNhxFpmC
Using your Hugging Face key
Export the key as HF_TOKEN, then call the API at https://api-inference.huggingface.co.
export HF_TOKEN="your-key-here"curl
curl https://api-inference.huggingface.co/chat/completions \
-H "Authorization: Bearer $HF_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "meta-llama/Llama-4-Scout-17B-16E-Instruct",
"messages": [{"role": "user", "content": "Say hello"}]
}'Python (OpenAI SDK)
from openai import OpenAI
import os
client = OpenAI(
api_key=os.environ["HF_TOKEN"],
base_url="https://api-inference.huggingface.co",
)
resp = client.chat.completions.create(
model="meta-llama/Llama-4-Scout-17B-16E-Instruct",
messages=[{"role": "user", "content": "Say hello"}],
)
print(resp.choices[0].message.content)Node.js
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.HF_TOKEN,
baseURL: "https://api-inference.huggingface.co",
});
const resp = await client.chat.completions.create({
model: "meta-llama/Llama-4-Scout-17B-16E-Instruct",
messages: [{ role: "user", content: "Say hello" }],
});
console.log(resp.choices[0].message.content);