---
title: "Authentication"
description: "Send your API key with every request, and keep it on your server."
---

> Documentation Index
> Fetch the complete documentation index at: https://api.whyviral.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

Send your key as a Bearer token in `Authorization`, or in `x-api-key`. Keys start with `wv_`.

```http
Authorization: Bearer wv_…
# or
x-api-key: wv_…
```

Make keys in WhyViral under [Settings → API keys](https://whyviral.ai/settings#api-keys). A key is shown only once, when you create it.

## Keep keys secret

Keep keys on your server: never in a web page, an app you ship or a public repository. Anyone with a key can spend your credits, read what your projects hold and create report links.

If one leaks, revoke it in [Settings → API keys](https://whyviral.ai/settings#api-keys). From then on, requests with it answer 401 `INVALID_API_KEY`.

## Base URL

Every path is relative to `https://whyviral.ai/api/v1`. Requests and answers are JSON, and every time is ISO 8601 in UTC.

Source: https://api.whyviral.ai/authentication/index.mdx
