All API endpoints require authentication using an API key. You can obtain your API key from the Gurubase.io or Gurubase Self-Hosted.

API Key Authentication

Include your API key in the x-api-key header with all requests:

curl --location 'https://api.gurubase.io/api/v1/<guru_slug>/answer' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
    "question": "What is Gurubase?"
}'

Keep your API key secure and never share it publicly. If you believe your API key has been compromised, you can delete it and generate a new one from the dashboard.