This page will help you get started with Cyan's new API.
For our SDK, please head to Installing SDK.

With the acquired API key, send requests in any language. Here is a quick start example:

curl --location --request POST 'https://api.usecyan.com/bnpl/pricer' \
--header 'X-API-KEY: 2D3ZUF-Yv02X-8ymaq5qVbeNoKW8nS-pz-1uPkiynSI' \
--header 'Content-Type: application/json' \
--data-raw '{
    "nfts": [
        {
            "address": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
            "tokenId": "3758"
        }
    ]
}'
const request = require('request');
const options = {
  'method': 'POST',
  'url': 'https://api.usecyan.com/bnpl/pricer',
  'headers': {
    'x-api-key': '2D3ZUF-Yv02X-8ymaq5qVbeNoKW8nS-pz-1uPkiynSI',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "nfts": [
      {
        "address": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
        "tokenId": "3758"
      }
    ]
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
import requests
import json

url = "https://api.usecyan.com/bnpl/pricer"

payload = json.dumps({
  "nfts": [
    {
      "address": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
      "tokenId": "3758"
    }
  ]
})
headers = {
  'x-api-key': '2D3ZUF-Yv02X-8ymaq5qVbeNoKW8nS-pz-1uPkiynSI',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
const axios = require('axios');
const data = JSON.stringify({
  "nfts": [
    {
      "address": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
      "tokenId": "3758"
    }
  ]
});

const config = {
  method: 'post',
  url: 'https://api.usecyan.com/bnpl/pricer',
  headers: { 
    'x-api-key': '2D3ZUF-Yv02X-8ymaq5qVbeNoKW8nS-pz-1uPkiynSI', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

❗️

Warning

It is recommended to make API calls from your server. We are not responsible for any damages caused by lost or exposed API keys.

Get your API key

Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.

You can request a Cyan API key from Request for API Token.

Using the API key

The API key must be included in the request header, as follows:

X-API-Key: <YOUR_API_KEY>

API key used for demos: 2D3ZUF-Yv02X-8ymaq5qVbeNoKW8nS-pz-1uPkiynSI