# API Dashboard

### Overview

Fradium provides a comprehensive API system for developers to integrate cryptocurrency address analysis and risk scoring into their applications. The system includes API token management, usage tracking, credit-based pricing, and detailed analytics.

### How It Works

The Fradium Developer system uses a **token-based authentication and credit approval model**:

1. **Create an API Token**\
   You generate an API token that authenticates your requests to Fradium’s analysis services.\
   Each token is unique and tied to your account.
   * Tokens can have specific permissions.
   * They can be revoked at any time for security.
2. **Approve API Credits (FRADIUM)**\
   Before your API can process analysis requests, you must allocate a balance (in FRADIUM credits).\
   This is done via the **Approve More FRADIUM** feature, which links to your Fradium wallet.
   * The system calls `icrc2_approve()` to authorize a specific allowance for API usage.
   * Once approved, API calls will deduct credits according to your usage.
3. **Use and Monitor Your API**\
   With a valid token and approved credits, you can start calling Fradium’s endpoints to analyze cryptocurrency addresses.
   * View your **Analyze History** to track past analyses.
   * Use **API Credits** to monitor remaining balance and approval history.

### Getting Started

If you already on Fradium Web Application,  look at the navigation bar at the top and find the **“Developers”** dropdown button. Click it, then select **“API Dashboard”** from the menu.

<figure><img src="https://1767650739-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiQKuIOfs4hZTnOvPlo9o%2Fuploads%2FlRylywkcBWkuhHWHdZZS%2FScreenshot%202025-10-21%20at%2001.15.16.png?alt=media&#x26;token=6c85f9d8-0e5d-4420-bd1e-c6e8e85fbacb" alt=""><figcaption></figcaption></figure>

***

<figure><img src="https://1767650739-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiQKuIOfs4hZTnOvPlo9o%2Fuploads%2F0UIcAX0wnPcGv9GqdNX4%2FScreenshot%202025-10-21%20at%2001.16.30.png?alt=media&#x26;token=576743d0-1052-4a87-bef6-238f76ecdf13" alt=""><figcaption></figcaption></figure>

Welcome to the **Fradium Developer Dashboard** — a central hub for developers integrating with the Fradium API.\
This interface allows you to manage your API tokens, credits, and access history for cryptocurrency address analysis.

<figure><img src="https://1767650739-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiQKuIOfs4hZTnOvPlo9o%2Fuploads%2FkY1ODjn7z4wUQf55kMRD%2FScreenshot%202025-10-21%20at%2001.18.13.png?alt=media&#x26;token=2e916d16-0592-4a6e-9260-90897ac31bc4" alt=""><figcaption></figcaption></figure>

Manage your authentication tokens for API access.\
You can:

* Generate new tokens.
* Revoke unused or compromised tokens.
* Follow best practices listed under the **Security Notice**, such as:
  * Keeping tokens private.
  * Using separate tokens for development and production.
  * Regularly rotating tokens for enhanced security.

<figure><img src="https://1767650739-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiQKuIOfs4hZTnOvPlo9o%2Fuploads%2FsnHlKoEh4Q5PBPw2HItq%2FScreenshot%202025-10-21%20at%2001.18.43.png?alt=media&#x26;token=7c9be389-83b2-47da-977c-438ba7c07b50" alt=""><figcaption></figcaption></figure>

Manage your API spending limit and credit approval.

* **Remaining Approval**: Shows the current allowance available for API calls.
* **Used Amount**: Displays how much of your FRADIUM credit has been consumed.
* **Approve More FRADIUM**: Allows you to increase your API spending limit directly from your Fradium wallet.
* **Approval History**: Keeps a record of past approvals for transparency.

The **API Documentation** section provides everything you need to start integrating the Fradium analysis engine into your own application or service.

<figure><img src="https://1767650739-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiQKuIOfs4hZTnOvPlo9o%2Fuploads%2Fg5gfcqxDYyTIOXlJS9Yw%2FScreenshot%202025-10-21%20at%2001.25.26.png?alt=media&#x26;token=68ef4093-196a-4024-af90-10bf49ba625e" alt=""><figcaption></figcaption></figure>

#### **Base URL**

All Fradium API requests are made to:

```
https://u6s2n-gx777-77774-qaaba-cai.ic0.app
```

This is the **Production URL** — make sure you’re using it in your live integrations.

***

#### **Endpoint: `/analyze-address`**

**Method:** `POST`\
**Description:**\
Analyzes a cryptocurrency address for safety and risk assessment using community consensus models.

***

**Request Example**

**Request Body:**

```json
{
  "address": "ggyuu5-p553t-bgosy-nmprz-lwxz6-betjf-q7rg3-t57ri-5o53q-nkuho-7qe"
}
```

**Headers:**

```bash
Authorization: Bearer <YOUR_API_TOKEN>
Content-Type: application/json
```

***

**Response Example**

If successful, the API returns a result containing the safety assessment:

```json
{
  "success": true,
  "data": {
    "is_safe": true
  }
}
```

**Fields:**

| Field          | Type      | Description                                                                            |
| -------------- | --------- | -------------------------------------------------------------------------------------- |
| `success`      | `boolean` | Indicates if the API call was successful.                                              |
| `data.is_safe` | `boolean` | Returns `true` if the address is considered safe, or `false` if it’s risky or flagged. |

***

#### **How It Works**

1. The client application sends a `POST` request with a target cryptocurrency address.
2. The Fradium API analyzes the address using its community consensus and internal risk evaluation models.
3. The API returns a response indicating whether the address is **safe** or **risky**.
4. Each request consumes **FRADIUM credits**, which are deducted from your API allowance.
5. The analysis result is automatically logged in your **Analyze History** page for future reference.

***

#### **Example Use Case**

You can integrate this API into:

* **Wallet applications** to automatically flag suspicious addresses.
* **Payment processors** to verify that a destination wallet is trustworthy.
* **Exchange platforms** to pre-check transaction safety before sending assets.
