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

# API keys

> Obtain an API key to use AskVideos

## Create an account

First, create an account on [https://app.askvideos.com](https://app.askvideos.com)

## Generate an API key

To generate an API key, select the account icon on the top right of the page and select 'Settings'.

Then, navigate to the 'API keys' section on the left sidebar.

Then select "Create New Secret Key" and enter a name to generate an API key.

The API key can then be shown by clicking the eye icon.

## API key best practices

We recommend the following steps to protect API keys from misuse.

<AccordionGroup>
  <Accordion icon="file" title="Use environment variables">
    Specifying API keys in place can result in unintentional exposure of keys and could make replacement inconveninent.

    ```bash theme={null}
    # .env file
    ASKVIDEOS_API_KEY='example_api_key'
    ```
  </Accordion>

  <Accordion icon="clock" title="Delete unused keys">
    It is good practice to rotate API keys and delete old keys to prevent unintended usage.
    To do so, navigate to the "API keys" page and click on the trash icon to delete an API key.
  </Accordion>
</AccordionGroup>

## Next steps

Now that we have an API key, we can do some cool things with the index.

<CardGroup>
  <Card title="Search for moments" icon="searchengin" href="/quickstart/search">
    Search for specific moments in the video index.
  </Card>

  <Card title="Generate answers" icon="question" href="/quickstart/answer">
    Ask questions and generate answers from video content
  </Card>
</CardGroup>
