Getting Started

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
curl -H "X-API-Key: YOUR_API_KEY" https://genshin-api.REPLACE_ME.workers.dev/api/v1/characters/hu-tao

Get a key

Generate one right here. It is saved in this browser so the "Try it" boxes use it.

Or from your own code:

POST/api/v1/keysCreate an API key

The body is optional; name (up to 100 characters) helps you tell your keys apart.

cURL
curl -X POST https://genshin-api.REPLACE_ME.workers.dev/api/v1/keys \
  -H "Content-Type: application/json" \
  -d '{"name": "My app"}'
POST /api/v1/keys · 201
{
  "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 header
cURL
curl -X DELETE -H "X-API-Key: YOUR_API_KEY" https://genshin-api.REPLACE_ME.workers.dev/api/v1/keys
DELETE /api/v1/keys · 200
{
  "revoked": true,
  "revokedAt": "2026-11-20T09:12:41.513Z"
}