Predictions API

Run predictions using pre-trained AI models

The Spice AI Predictions API is made available for research purposes only. By accessing and using the APIs, in addition to the Spice AI Terms, you agree to these terms and conditions.

Spice AI has trained a number of AI models for predictions on blockchain data. These models come with data included, so all you need to get a glimpse of the future is a simple API request.

Perform prediction with AI model

POST https://data.spiceai.io/v1/predictions

The model id should be sent in the JSON payload along with an optional Boolean if you want the historical data returned in the response.

Query Parameters

NameTypeDescription

api_key*

String

The API Key for your Spice app

Headers

NameTypeDescription

Content-Type*

String

application/json

X-API-KEY

String

The API Key for your Spice app

Request Body

NameTypeDescription

model_id*

String

The id of a pre-trained model

return_lookback_data

Bool

Set to true to include the historical lookback data that the model used to make its prediction.

{
    "data": {
        "lookback": [{
            "timestamp": 16152356,
            "value": 1.2633415466991442e-9
        }],
        "forecast": [{
            "timestamp": 16152357,
            "value": 1.2633415424900818e-9
        }],
        "now": 16152356
    },
    "duration_ms":2038
}

Sample request payload

{
    "model_id": "uniswapv3_usdc_eth",
    "return_lookback_data": true
}

Available models

Model IdDescription

uniswapv3_usdc_eth

Short horizon forecasting of Uniswap v3 data for the USDC:ETH 0.05% pool 0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640

uniswapv3_eth_usdt

Short horizon forecasting of Uniswap v3 data for the ETH:USDT 0.05% pool 0x11b815efb8f581194ae79006d24e0d814b7697f6

uniswapv3_wbtc_eth

Short horizon forecasting of Uniswap v3 data for the WBTC/ETH 0.05% pool 0x4585fe77225b41b697c938b018e2ac67ac5a20c0

gasfees_v1

A new Ethereum gas fee prediction model.

Requirements and limitations

  • An API key is required for all predictions.

Last updated