# Get the NFT Authenticity Verifying report via API

**NFT Content Authenticity Verifying Service** is secured from unknown users by limiting API calls to those that provide proper authentication accreditations. These credentials are in the form of an API key. This guide shows how to get and use your API Key for the service.

### **I. Request your API Key for 1-month free trial**&#x20;

The API key is a unique identifier that authenticates requests associated with your project for usage and billing purposes. You must have at least one API key associated with your project. Each of these API keys will represent the number of requests you have. Please contact us via email to register for an API Key via this form:&#x20;

[<mark style="color:green;">https://forms.gle/PwKpCFVY91wiffxw8</mark>](https://docs.google.com/forms/d/e/1FAIpQLSf3go-aUekuLyHDLeTGmmRreTi3eG4h6ZW48XsHUgRTjM157Q/viewform)

### **II. Request API for Single NFT Authenticity Verification report**

## Create a report for a NFT

<mark style="color:green;">`POST`</mark> `https://api-aioracle.airight.io/api-key/report`

Body param must have an input file OR address - token\_id

#### Headers

| Name    | Type   | Description                               |
| ------- | ------ | ----------------------------------------- |
| api-key | String | <p>Api key </p><p>Ex: sdf546FGjrDFG56</p> |

#### Request Body

| Name | Type   | Description       |
| ---- | ------ | ----------------- |
| file | String | File image upload |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

Example request:

```
curl --location --request POST 'https://api-aioracle.airight.io/report/nft' 
--form 'file=@"/path/to/file.png" --header 'api-key: sdf546FGjrDFG56'
```

Response body:

<pre><code>{
    "exact_match": [],
    "near_exact": [],
    "semantic": [
        {
                "contract": "0x60f80121c31a0d46b5279700f9df786054aa5ee5",
                "tokenId": "9536",
                "authorAddress": "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb",
                "creation_time": "1657267489316",
                "name": "Lush greenery",
                "description": "",
                "marketName": "OpenSea",
                "market": "https://opensea.io/assets/ethereum/0xbbe0ee73d36b3fb6b688ad24192541c059248188/4668",
                "isVerified": false,
                "image": "https://ipfs.io/ipfs/QmWCoDP4SM5MKMvqAAkaLNEN5TVu9f4m9CQQioWF1VkLDi",
                "score": 0.65
        },       
<strong>     ],
</strong><strong>     "flag_red": false,
</strong>     "flag_consider": true
}
</code></pre>

### III. Request Authenticity Verifying Report for NFT Collection via API with your API key  <a href="#verifying-nft-coollection-api" id="verifying-nft-coollection-api"></a>

2.1. Request for **NFT Collection** Authenticity Verifying report via API

## API for requesting Authenticity Verifying Report of an NFT Collection by contract&#x20;

<mark style="color:green;">`POST`</mark> `https://api-aioracle.airight.io/report/collection`

Enter the Collection smart contract address and the blockchain it's created on, our system will send you an email including the URL which shows the process of verifying and real-time updated checking results.&#x20;

#### Headers

| Name                                      | Type   | Description                                                                       |
| ----------------------------------------- | ------ | --------------------------------------------------------------------------------- |
| api-key<mark style="color:red;">\*</mark> | String | <p>Your API Key (provided by aiRight) </p><p>Ex: <code>sdf546FGjrDFG56</code></p> |

#### Request Body

| Name                                       | Type   | Description                                                                                              |
| ------------------------------------------ | ------ | -------------------------------------------------------------------------------------------------------- |
| email<mark style="color:red;">\*</mark>    | String | <p>Email to receive the report URL</p><p>Ex: <code><abc@gmail.com></code></p>                            |
| chain<mark style="color:red;">\*</mark>    | String | <p>The blockchain that the contract created on </p><p>Ex: <code>ethereum, polygon,</code> ...</p>        |
| contract<mark style="color:red;">\*</mark> | String | <p>Contract address of Collection </p><p>Ex: <code>0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae</code></p> |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
 url: "https://api-aioracle.airight.io/report/collection/status/8-qw34rt"
}
```

{% endtab %}
{% endtabs %}

```
Example request:
curl --location --request POST 'https://api-aioracle.airight.io/report/collection' \
--header 'api-key: sdf546FGjrDFG56' \
--header 'Content-Type: application/json' \
--data-raw '{
    "contract": "0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae",
    "chain": "ethereum",
    "email": "user@airight.io"
}'
```

Response body:

```
{
 url: “https://api-aioracle.airight.io/report/collection/status/8-qw34rt”
}
```

If collection is verified, response body (there will be no **“Verification Process Status”** step):

```
{
 "isVerified": true,
 "marketName": "OpenSea"
}
```

2.2.  Request checking the **Verification Process Status**

## Request check the Status of Verification Process for NFT collection above

<mark style="color:blue;">`GET`</mark> `https://api-aioracle.airight.io/report/collection/status/{id}`

#### Path Parameters

| Name                                 | Type   | Description                                                                                                        |
| ------------------------------------ | ------ | ------------------------------------------------------------------------------------------------------------------ |
| id<mark style="color:red;">\*</mark> | String | <p>ID report + random string (get from the URL sent to your registered email) </p><p>Ex: <code>8-qw34rt</code></p> |

#### Headers

| Name                                      | Type   | Description                                                                       |
| ----------------------------------------- | ------ | --------------------------------------------------------------------------------- |
| api-key<mark style="color:red;">\*</mark> | String | <p>Your API Key (provided by aiRight) </p><p>Ex: <code>sdf546FGjrDFG56</code></p> |

{% tabs %}
{% tab title="200: OK Status of verifying NFTs of the contract and summary on the confidence level of those NFTs" %}

```javascript
{
    status: "N/A|process|done",
    total_supply: int,
    number_verified: int,
    summary: {
      red: {
        number: int,
        rate: float,
        nft: ["tokenid", "tokenid",...],
      },
      consider: {
        number: int,
        rate: float,
        nft: [],
      },
      reliable: {
        number: int,
        rate: float,
      }
  },
}
```

{% endtab %}
{% endtabs %}

*Variable explanation:*

* `status`: The status of the verifying process

`N/A`: Have not been processed verifying collection yet&#x20;

`process`: In processing verifying collection

`done`: Have done verifying collection

* `total_supply`: Total NFT of the collection
* `number_verified`: The number of checked NFTs of the collection
* `Summary`: Displays scoring the confidence level of this NFT, data will return:

`red`:  Red-flag level: the NFTs exact-duplicate, near exact-duplicate with or have a similarity score of more than 0.9 with NFTs of the other contracts => highly potential fake/forged/infringed NFT

`number`: the number of checked NFTs in the red-flag level

`rate`: the rate (%) of Red flag NFT on the total number of checked NFT in collections&#x20;

`nft`: list of NFT in Red-flag level,&#x20;

`tokenid:` The ID of the NFT in the contract

`consider`: Consider level: the NFTs have a similarity score of more than 0.55 with the NFTs of the other contracts

`Reliable`: Reliable level: the NFTs have no exact-duplicate, near exact-duplicate results and have a similarity score of less than 0.55 with NFTs of the other contracts.&#x20;

### Get your report after the Verifying process done

Our system will send another email informing you that the verifying process has been done along with a `json.` file aggregating details of checking results for each checked NFT in the collection.&#x20;

**👉🏻 Data will return in `detail`:**&#x20;

`Tokenid`: ID of the checked NFTs of the checking contract

`exact_match`: list of NFTs of other contracts found as exact-duplicated with checked NFT

`near-exact`: list of NFTs of other contracts found as near-duplicated with checked NFT

`semantic`: list of NFTs of other contracts found as edit-copied or in the same concept with checked NFT

[👉🏻 Understand more about the above types of similarity](https://docs.airight.io/services-and-integration/ai-blockchain-oracle-nft-authenticity-verification/..#the-ai-model-ai-oracle-from-oraichain)

`contract`: contract address of the similar NFT found

`description`: the NFT description

`image`: the image URL of the NFT&#x20;

`market`: the URL to the NFT on the marketplace

`name`: the NFT name

`tokenId`: the ID of this NFT in the contract

`score:` similarity score in comparison with checked NFT measured by AI model

`isVerified`: true => collection has been verified by the organization below, false => collection has not been verified&#x20;

`marketName`: the marketplace that the NFT is being listed on.&#x20;

### **For example:**&#x20;

```
{
  "contract": "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb",
  "chain": "ethereum",
  "status": "done",
  "total_supply": 150,
  "number_verified": 2,
  "summary": {
    "red": {
      "number": 1,
      "rate": 0.6,
      "nft": [
        "40610047128735507369531371678689547884095804282887658682343845465022913314834"
      ]
    },
    "consideration": {
      "number": 0,
      "rate": 0,
      "nft": []
    },
    "reliable": {
      "number": 1,
      "rate": 0.6
    }
  },
  "detail": {
    "29988661540054685624256145304119478717841111267903514459897271889511510441999": {
      "exact_match": [],
      "near_extract": [],
      "sematic": [
        {
          "contract": "0x60f80121c31a0d46b5279700f9df786054aa5ee5",
          "description": "Unlocks full drawing ",
          "image": "ipfs://ipfs/QmdWcS6AhubZ3Tqdhrmrp3C62VSjHjWj35VW3aXttqDq82",
          "market": "https://opensea.io/assets/0x60f80121c31a0d46b5279700f9df786054aa5ee5/28975",
          "name": "Unigirl v1",
          "tokenId": "28975",
          "score": 0.65,
          "isVerified": false,
          "marketName": "OpenSea"
        },
        {
          "contract": "0x60f80121c31a0d46b5279700f9df786054aa5ee5",
          "description": "Big MaKEN ",
          "image": "ipfs://ipfs/QmZmLdRtgxyfSae59hPxY1pwngwN9sDxtTvEU2drpXdCJq/image.png",
          "market": "https://opensea.io/assets/0x60f80121c31a0d46b5279700f9df786054aa5ee5/557046",
          "name": "I'm loving it",
          "tokenId": "557046",
          "score": 0.65,
          "isVerified": false,
          "marketName": "OpenSea"
        }
      ]
    },
    "40610047128735507369531371678689547884095804282887658682343845465022913314834": {
      "exact_match": [
        {
          "contract": "0xd07dc4262bcdbf85190c01c996b4c06a461d2430",
          "description": "",
          "image": "ipfs://ipfs/QmPuJxURAgyFE1H2Qj5u9veEYNMyuhckd9ghKAwiWD28v6/image.jpeg",
          "market": "https://opensea.io/assets/0xd07dc4262bcdbf85190c01c996b4c06a461d2430/643499",
          "name": "Snake of sea ",
          "tokenId": "643499",
          "score": 0.95,
          "isVerified": false,
          "marketName": "OpenSea"
        }
      ],
      "near_extract": [],
      "sematic": [
        {
          "contract": "0x6184f10302cebeea0211f9310225f051cc549626",
          "description": "Galactic Secret Agency is a collection of 10.000 unique Alien Agents. They're lurking, watching and influencing humanity for centuries. Each Alien is unique, generated from over 170 hand drawn assets. Holding one of the agent grant you access to future members-only benefits. Visit our website to learn more about GSA. https://www.GalacticSecretAgency.com",
          "image": "https://galacticsecretagency.com/assets/assets/gsa/avatar/5101.png",
          "market": "https://opensea.io/assets/0x6184f10302cebeea0211f9310225f051cc549626/5101",
          "name": "Agent #5101",
          "tokenId": "5101",
          "score": 0.65,
          "isVerified": true,
          "marketName": "OpenSea"
        }
      ]
    }
  }
}
```
