# Authentication

The Microshot API uses API keys to authenticate requests.

API keys are managed via the Microshot interface. To view or create one, navigate to your [API Keys](https://app.microshot.io/api-keys):

<figure><img src="/files/HlKdOAI2J2N8on9HV6Cm" alt=""><figcaption></figcaption></figure>

API requests without authentication will fail.

Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, etc.

Add your API key to the `x-api-key` header to access the API endpoints.

```bash
# example cURL request
curl -H 'x-api-key: <your_api_key>' https://api.microshot.io/v1/screenshot?url=https://github.com
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.microshot.io/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
