# Acquire your API key

## First things first

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

{% hint style="info" %}
Authentication to the API is performed via [Bearer Authentication](https://swagger.io/docs/specification/authentication/bearer-authentication/).
{% endhint %}

All API requests must be made over [HTTPS](http://en.wikipedia.org/wiki/HTTP_Secure). Calls made over plain HTTP will fail. API requests without authentication will also fail.

## Where to find my API key?

The easiest way to generate and get your API key is to [sign-up on Bloodbath](https://app.bloodbath.io/signup) via our dashboard. Once you've signed up you can go to the [settings section](https://app.bloodbath.io/settings) which will have your key.

![](/files/-MkXst1Sjq3HlUWtcDpO)

You can use this key to communicate will all Bloodbath APIs.

## How to check my API key is valid?

To make sure your API key is valid and working, you can try the ping endpoint via cURL

```
curl <https://api.bloodbath.io/rest/ping> \\
  -H "Authorization: Bearer <Replace this with your API key>"

# OK Response
{
  "received_at": "2021-05-12T00:41:55.733297Z"
}
```


---

# 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.bloodbath.io/getting-started/acquire-your-api-key.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.
