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

# API Key

> Authenticate Open API requests with an API Key

export const apiKeyUrl = "https://www.vmeg.ai/open-api-setting";

export const productUrls = JSON.parse('{"home":"https://www.vmeg.ai/home","apiConfiguration":"https://www.vmeg.ai/open-api-setting","signIn":"https://www.vmeg.ai/signIn?redirect=%2Fhome","signInToApiSettings":"https://www.vmeg.ai/signIn?redirect=%2Fopen-api-setting","signUp":"https://www.vmeg.ai/signup","account":"https://www.vmeg.ai/account","helpCenter":"https://www.vmeg.ai/help-center/","pricing":"https://www.vmeg.ai/pricing","myTasks":"https://www.vmeg.ai/my-tasks","myAssets":"https://www.vmeg.ai/my-assets","videoTranslation":"https://www.vmeg.ai/translation","audioTranslation":"https://www.vmeg.ai/audio-translation","cloneVoice":"https://www.vmeg.ai/clone-voice","bookDemo":"https://www.vmeg.ai/book-a-demo/","contactUs":"https://www.vmeg.ai/contact-us/","apiDocs":"https://docs.vmeg.ai"}');

## API Key

All endpoints under `/openapi/v1/**` require an **API Key**.

## Request header

Send your key on **every** request in the HTTP **Authorization** header (not in the query string or request body):

```http theme={null}
Authorization: Bearer <your_api_key>
```

Example with `curl`:

```bash theme={null}
curl "https://api.vmeg.ai/openapi/v1/tasks/list" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Replace `YOUR_API_KEY` with the key from <a href={apiKeyUrl}>API Configuration</a>.

## Scope

Your API Key determines which **tasks**, **materials**, and **cloned voices** you can list, query, and delete. Send only the fields documented for each endpoint.

<Warning>
  Do not expose API Keys in client apps or public repositories. Store keys in environment variables or a secrets manager.
</Warning>

## Create and rotate keys

Create and rotate keys on <a href={apiKeyUrl}>API Configuration</a> on vmeg.ai (sidebar **API** after you sign in). <a href={productUrls.signInToApiSettings}>Sign in</a> if needed.

The same page is where you set your **Webhook URL** and view the **Webhook Secret** VMEG generates for async callbacks.

<Info>
  API Configuration is available on paid plans. See [Pricing](/guides/pricing).
</Info>

## Authentication failures

HTTP status `401` with a JSON body such as:

```json theme={null}
{
  "code": 401,
  "message": "Invalid or missing API Key",
  "data": null
}
```

See [Error codes](/guides/errors) for the full code list.
