Blockfence API Docs
Back to Homepage
  • Welcome to Blockfence API
  • Quick Start
  • Reference
    • API Reference
      • Enrichment
        • Transaction Simulation
        • Address Enrichment
        • Domain Enrichment
        • AI Interpreter
      • Analysis
        • Address Analysis
        • Domain Analysis
        • Transaction Analysis
      • Monitoring
        • Subscribe to Address Events
        • Subscribe to Domain Events
      • Investigation
        • Domain To Addresses
        • Address to Domains
        • Similar Smart Contracts
        • Domain to Linked Domains
        • Domain to Internal Pages
        • Investigate a URL
  • Terms & Policy
    • API License Agreement
    • Terms & Conditions
    • Privacy Policy
Powered by GitBook
On this page

Was this helpful?

  1. Reference
  2. API Reference
  3. Enrichment

AI Interpreter

Describes a smart contract using OpenAI

Last updated 1 year ago

Was this helpful?

Supported Networks

  • Ethereum: chain_id: "0x1"

  • BSC: chain_id: "0x38"

  • Avalanche: chain_id: "0xa86a"

  • Polygon: chain_id: "0x89"

  • Optimism: chain_id: "0xa"

  • Arbitrum: chain_id: "0xa4b1"

All requests require an API key. Add "x-api-key" to your request header as shown in the example below.

Don't have an API key? Contact us to get one.

Request Body Parameters

Parameter Name
Parameter Type
Comments

chain_id

hex string

Chain ID (e.g. "0x1" for mainnet)

blockchain_address

hex string

Blockchain address

Usage Example

curl https://api.blockfence.io/api/v2/ai_interpreter -X POST -H "Content-Type: application/json" -H "x-api-key: <YOUR API KEY>" -d '
{
    "chain_id": "0x1",
    "blockchain_address": "0x541a2378589e280fdfdde6e53fb5ecf98a853fc2"
}
'
{
    "name": "BunniLpZapIn",
    "description": "This smart contract is a software program that allows cryptocurrency users to invest and earn yield in a secure way. Users can choose to enter or exit the investment at any time, and receive their earnings in either cryptocurrency or tokens. The contract includes various functions for depositing, withdrawing, and converting different types of tokens, and can be interacted with through certain approved addresses. Overall, this contract helps manage and facilitate transactions between parties involved in cryptocurrency investments.",
    "total_tokens": 41912
}
post

Analyze a URL

Body
blockchain_addressstring · hexOptionalExample: 0x8904E3E9eaB00F64458845d32Ea22b2279fda1f7
chain_idstring · hexOptionalExample: 0x1
Responses
200
Successful operation
application/json
403
Forbidden
500
Internal Server Error
post
POST /api/v2/ai_interpreter HTTP/1.1
Host: api.blockfence.io
Content-Type: application/json
Accept: */*
Content-Length: 84

{
  "blockchain_address": "0x8904E3E9eaB00F64458845d32Ea22b2279fda1f7",
  "chain_id": "0x1"
}
{
  "name": "BunniLpZapIn",
  "description": "This smart contract is a software program that allows cryptocurrency users to invest and earn yield in a secure way. Users can choose to enter or exit the investment at any time, and receive their earnings in either cryptocurrency or tokens. The contract includes various functions for depositing, withdrawing, and converting different types of tokens, and can be interacted with through certain approved addresses. Overall, this contract helps manage and facilitate transactions between parties involved in cryptocurrency investments.",
  "total_tokens": 41912
}