Authentication
Every request needs an API key. Keys are free and do not require an account.
Send your API key in the X-API-Key header of every request. Requests without a key, or with an invalid or revoked one, return401.
curl -H "X-API-Key: YOUR_API_KEY" https://genshin-api.REPLACE_ME.workers.dev/api/v1/characters/hu-taoGet a key
Generate one right here. It is saved in this browser so the "Try it" boxes use it.
Your key
Or from your own code:
POST
/api/v1/keysCreate an API keyThe body is optional; name (up to 100 characters) helps you tell your keys apart.
curl -X POST https://genshin-api.REPLACE_ME.workers.dev/api/v1/keys \
-H "Content-Type: application/json" \
-d '{"name": "My app"}'{
"key": "gsk_2QSgew_974-epiNyu5-S95ed9s5H1et71ygdx6_SrV4",
"prefix": "gsk_2QSgew_9",
"name": "My app",
"createdAt": "2026-11-18T14:28:59.982Z"
}Revoke a key
Send a DELETE request authenticated with the key you want to revoke. It stops working immediately (within a minute at most).
DELETE
/api/v1/keysRevoke the key sent in the headercurl -X DELETE -H "X-API-Key: YOUR_API_KEY" https://genshin-api.REPLACE_ME.workers.dev/api/v1/keys{
"revoked": true,
"revokedAt": "2026-11-20T09:12:41.513Z"
}