Hive Intelligence
  • Introduction
  • Vision
  • Mission
  • Focus
  • Product
  • Technical Architecture
  • Use Cases
  • Roadmap
  • Why Hive Intelligence?
  • FAQs
  • $HINT Tokenomics
    • Overview of $HINT
    • Distribution and Emission Schedule
  • API Docs
    • Integration Docs
Powered by GitBook
On this page
  • Hive Intelligence API Docs
  • Quickstart
  • API Overview
  • API Endpoint References
  • Endpoint: Execute a Web3 or Blockchain search query
  1. API Docs

Integration Docs

Hive Intelligence API Docs

Quickstart

Use these simple examples to integrate Hive Intelligence Web3 search into your existing stack—no extra libraries needed.

Python

import requests

API_URL = "https://api.hiveintelligence.xyz/v1/search"
API_KEY = "your_api_key_here"

def fetch_hive_results(query):
    headers = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}
    payload = {"prompt": query,
               “temperature”: 0.5, #Optional
                “include_data_sources”: True #Optional
              }    

    response = requests.post(API_URL, json=payload, headers=headers)

    if response.status_code == 200:
        return response.json()
    else:
        return {"error": f"API request failed with status code {response.status_code}"}

# Example usage
query_text = "What are the holdings in my wallet 0x… on BASE chain?"
results = fetch_hive_results(query_text)
print(results)

JavaScript

const API_URL = "https://api.hiveintelligence.xyz/v1/search";  // Replace with actual API URL
const API_KEY = "your_api_key_here";

async function fetchHiveResults(prompt) {
    const response = await fetch(API_URL, {
        method: "POST",
        headers: {
            "Authorization": `Bearer ${API_KEY}`,
            "Content-Type": "application/json"
        },
        body: JSON.stringify({ prompt })
    });

    if (!response.ok) {
        return { error: `API request failed with status code ${response.status}` };
    }

    return response.json();
}

// Example usage
const queryText = "What are the holdings in my wallet 0x… on BASE chain?";
fetchHiveResults(queryText)
    .then(results => console.log(results))
    .catch(error => console.error("Error:", error));

That’s all you need to start using Hive Intelligence APIs.

No need for any additional library installs, and integrates quickly with your existing stack.

API Overview

Credits

  • Free “development” API key for every signup with full support. Upto 10 free API calls/day with development API key, no limits on data or features.

  • Approved Projects/Developers will also get upto 5000 free API credits after successful verification with no credit card required.

  • Pay as you go model for small teams and startups. Customized enterprise plans also available for bulk usage.

Credit Consumption

Your query’s complexity determines its cost.

Complexity
Credits Deducted

Basic

5-25

Medium

25-50

Advanced

50-100

Rate Limits

  • 20 requests per minute.

  • Higher rates may be available on paid plans.


API Endpoint References

Introduction

Easily integrate our APIs with your services.

Base URL

https://api.hiveintelligence.xyz

Authentication

All Hive Intelligence endpoints are authenticated using API keys.

Example (cURL)

curl -X POST https://api.hiveintelligence.xyz/v1/search \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"prompt": "How much $HINT do I hold in my wallet 0x…?"}'

Endpoint: Execute a Web3 or Blockchain search query

Easily integrate our APIs with your services and execute a search query using Hive Search API to retrieve Web3 or Blockchain information.

Request

URL: /v1/search

Method: POST

Authorization:

  • Required: Bearer authentication

  • Format: Bearer <token> where <token> is your Hive API key

  • Example: Bearer YOUR_API_KEY

Request Body Parameters

Parameter
Type
Required
Description

prompt

string

Yes

Natural Language Search Query to execute with Hive Search API

temperature

number

Optional

Controls randomness in the response. Lower values (e.g., 0.2) make responses more deterministic, while higher values (e.g., 0.8) make them more creative.

top_p

number

Optional

Controls diversity via nucleus sampling. Lower values (e.g., 0.5) make responses more focused, while higher values (e.g., 0.9) make them more diverse.

top_k

number

Optional

Limits token selection to the top K most likely tokens. Lower values constrain creativity, higher values allow more exploration.

include_data_sources

boolean

Optional

When set to true, the response will include the data sources used to generate the answer.

Response

The API returns a JSON object with the following structure:

{
  "response": "string or object",
  "isAdditionalDataRequired": null or object,
  "data_sources": ["source1", "source2"]
}

Response Fields

Field
Type
Description

response

string or object

The AI-generated response to the query

isAdditionalDataRequired

null or object

If additional data is required to answer the query, this field contains details about what is needed

data_sources

array

List of data sources used to generate the response (only included when include_data_sources input parameter is set to true)

Error Responses

Status Code
Error Description
Details

400

Invalid request body

The request body is missing or malformed

400

Please provide either prompt or messages, not both

Both prompt and messages were provided

400

Either prompt or messages is required

Neither prompt nor messages were provided

401

API key is required

No API key was provided in the headers

403

Invalid API key

The provided API key is invalid

429

Rate limit reached for today

You've exceeded your daily request limit

500

Internal server error

An unexpected error occurred

Example Request

curl -X POST https://api.hivesearch.io/v1/search \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "What is the current gas price on Ethereum?",
    "temperature": 0.2,
    "include_data_sources": true
  }'

Example Response

{
  "response": "As of the latest data available, the current gas price on Ethereum is approximately 25 Gwei for a standard transaction.",
  "isAdditionalDataRequired": null,
  "data_sources": ["etherscan.io", "ethgas.watch"]
}
PreviousDistribution and Emission Schedule

Last updated 1 month ago