# Introduction to the API service | NiamonX API

# 🔐 How to Create and Use Your NiamonX API Key

This guide explains how to create your API key, keep it secure, and start making requests to the **NiamonX API v2**.

---

## 1. Requirements

To generate an API key, you must have an **active paid plan**.  
Free-tier users **cannot** create or use API keys.

[![image.png](https://wiki.niamonx.io/uploads/images/gallery/2025-11/scaled-1680-/rHkjPpQMkyXyW7CZ-image.png)](https://wiki.niamonx.io/uploads/images/gallery/2025-11/rHkjPpQMkyXyW7CZ-image.png)

---

## 2. Creating an API Key

Visit the official key generation page:

👉 **[https://dash.niamonx.io/api-key](https://dash.niamonx.io/api-key)[<span aria-hidden="true" class="ms-0.5 inline-block align-middle leading-none"><svg class="block h-[0.75em] w-[0.75em] stroke-current stroke-[0.75]" data-rtl-flip="" fill="currentColor" height="20" viewbox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M14.3349 13.3301V6.60645L5.47065 15.4707C5.21095 15.7304 4.78895 15.7304 4.52925 15.4707C4.26955 15.211 4.26955 14.789 4.52925 14.5293L13.3935 5.66504H6.66011C6.29284 5.66504 5.99507 5.36727 5.99507 5C5.99507 4.63273 6.29284 4.33496 6.66011 4.33496H14.9999L15.1337 4.34863C15.4369 4.41057 15.665 4.67857 15.665 5V13.3301C15.6649 13.6973 15.3672 13.9951 14.9999 13.9951C14.6327 13.9951 14.335 13.6973 14.3349 13.3301Z"></path></svg></span>](https://dash.niamonx.io/api-key)**

Once your subscription is active, click **“Create API Key.”**

[![image.png](https://wiki.niamonx.io/uploads/images/gallery/2025-11/scaled-1680-/ZrNpkhLzcquF7sX8-image.png)](https://wiki.niamonx.io/uploads/images/gallery/2025-11/ZrNpkhLzcquF7sX8-image.png)

> ⚠️ **Important:**  
> After generation, the key **will not be displayed again.**  
> It is securely stored in the database as a **SHA-256 hash**, meaning even NiamonX staff cannot recover it.

Keep your key safe — store it in an encrypted password manager or an environment variable.

[![image.png](https://wiki.niamonx.io/uploads/images/gallery/2025-11/scaled-1680-/6rIpOAijHqCILvCE-image.png)](https://wiki.niamonx.io/uploads/images/gallery/2025-11/6rIpOAijHqCILvCE-image.png)

---

## 3. API Key Dashboard Information

After creating the key, you will see the following details:

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-status-created%3A-%E2%80%94-la"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`<span class="hljs-string">Status</span><span class="hljs-attr">Created:</span> <span class="hljs-string">—</span><span class="hljs-attr">Last used:</span> <span class="hljs-string">—</span><span class="hljs-attr">Revoked:</span> <span class="hljs-literal">no</span>`</div></div>These fields update automatically as you start using your key.

---

## 4. Main Endpoint

All API requests go through the main entry point:

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-post-https%3A%2F%2Fdash.ni"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`<span class="hljs-variable constant_">POST</span> <span class="hljs-symbol">https:</span>/<span class="hljs-regexp">/dash.niamonx.io/api</span><span class="hljs-regexp">/v2/</span>`</div></div>---

## 5. Example Request

### Basic Health Check (`gl_ping`)

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-post-https%3A%2F%2Fdash.ni-1"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`POST https://dash.niamonx.io/api/v2/gl_ping`</div></div>**Headers:**

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-content-type%3A-applic"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`<span class="hljs-attribute">Content-Type</span>: application/json<span class="hljs-attribute">X-API-Key</span>: YOUR_API_KEY`</div></div>**Body:**

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-%7B-%22ip%22%3A-%221.1.1.1%22-%7D"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`<span class="hljs-punctuation">{</span>  <span class="hljs-attr">"ip"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"1.1.1.1"</span><span class="hljs-punctuation">}</span>`</div></div>---

## 6. Possible Responses

<div class="_tableContainer_1rjym_1" id="bkmrk-http-code-descriptio"><div class="group _tableWrapper_1rjym_13 flex w-fit flex-col-reverse" tabindex="-1"><table class="w-fit min-w-(--thread-content-width)" data-end="1958" data-start="1505"><thead data-end="1532" data-start="1505"><tr data-end="1532" data-start="1505"><th data-col-size="sm" data-end="1517" data-start="1505">HTTP Code</th><th data-col-size="md" data-end="1532" data-start="1517">Description</th></tr></thead><tbody data-end="1958" data-start="1562"><tr data-end="1639" data-start="1562"><td data-col-size="sm" data-end="1572" data-start="1562">**200**</td><td data-col-size="md" data-end="1639" data-start="1572">✅ `success: true, data: {...}` — request completed successfully</td></tr><tr data-end="1693" data-start="1640"><td data-col-size="sm" data-end="1650" data-start="1640">**400**</td><td data-col-size="md" data-end="1693" data-start="1650">❌ Invalid input data (validation error)</td></tr><tr data-end="1737" data-start="1694"><td data-col-size="sm" data-end="1704" data-start="1694">**401**</td><td data-col-size="md" data-end="1737" data-start="1704">🚫 Invalid or missing API key</td></tr><tr data-end="1784" data-start="1738"><td data-col-size="sm" data-end="1748" data-start="1738">**403**</td><td data-col-size="md" data-end="1784" data-start="1748">⛔ The requested tool is disabled</td></tr><tr data-end="1825" data-start="1785"><td data-col-size="sm" data-end="1795" data-start="1785">**404**</td><td data-col-size="md" data-end="1825" data-start="1795">❓ Unknown tool or endpoint</td></tr><tr data-end="1874" data-start="1826"><td data-col-size="sm" data-end="1836" data-start="1826">**405**</td><td data-col-size="md" data-end="1874" data-start="1836">⚙️ Method not allowed (use `POST`)</td></tr><tr data-end="1958" data-start="1875"><td data-col-size="sm" data-end="1885" data-start="1875">**429**</td><td data-col-size="md" data-end="1958" data-start="1885">⏳ Cooldown or daily request limit exceeded (message from ToolService)</td></tr></tbody></table>

</div></div>---

## 7. Security Recommendations

- Never share your API key publicly (including screenshots or code samples).
- Rotate keys regularly if you suspect any compromise.
- Use **environment variables** to store keys in production systems.
- Always use **HTTPS** when communicating with the API.

---

✅ **You’re ready to start!**  
With your key securely stored and your first test request working, you can now explore the full NiamonX API toolkit.