> For the complete documentation index, see [llms.txt](https://docs.violetlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.violetlabs.com/features/api/generate-an-api-key.md).

# Generate an API key

To generate an API key, navigate to your Company Settings (via the Violet logo in the bottom left-hand corner of your screen), then select **API**.

<figure><img src="https://2091741164-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvrraExym8pNEUvBDoima%2Fuploads%2FTbV15fWeA0h0xgno85f6%2FScreenshot%202026-02-22%20at%209.02.46%20AM.png?alt=media&amp;token=466d544a-7c92-4cb7-99b1-48d87661084c" alt="" width="259"><figcaption></figcaption></figure>

Click <mark style="color:purple;">**+ CREATE API KEY**</mark>. If you wish, you can choose an expiration date for your key, otherwise click <mark style="color:purple;">**CREATE.**</mark> When your key appears, copy it and save it somewhere safe. **You will not be able to access the key again.**

<figure><img src="https://2091741164-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvrraExym8pNEUvBDoima%2Fuploads%2FnZ5xLhgKlNo2YTfuDKZC%2Fimage.png?alt=media&amp;token=3f5bd1f8-7d61-4b5f-8075-fa1f0fd6dd99" alt="" width="563"><figcaption></figcaption></figure>

Next: learn how to use the [Endpoints](/features/api/endpoints.md) to retrieve your Violet data.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.violetlabs.com/features/api/generate-an-api-key.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
