curl --request POST \
--url https://api.messari.io/ai/v1/agent/compute \
--header 'Content-Type: application/json' \
--header 'X-Messari-API-Key: <api-key>' \
--data '
{
"query": "What is the market cap of Bitcoin?"
}
'import requests
url = "https://api.messari.io/ai/v1/agent/compute"
payload = { "query": "What is the market cap of Bitcoin?" }
headers = {
"X-Messari-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Messari-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'What is the market cap of Bitcoin?'})
};
fetch('https://api.messari.io/ai/v1/agent/compute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.messari.io/ai/v1/agent/compute",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => 'What is the market cap of Bitcoin?'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Messari-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.messari.io/ai/v1/agent/compute"
payload := strings.NewReader("{\n \"query\": \"What is the market cap of Bitcoin?\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Messari-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.messari.io/ai/v1/agent/compute")
.header("X-Messari-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"What is the market cap of Bitcoin?\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.messari.io/ai/v1/agent/compute")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Messari-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"What is the market cap of Bitcoin?\"\n}"
response = http.request(request)
puts response.read_body{
"error": null,
"data": {
"results": [
{
"dataset": "asset",
"query": "SELECT asset.name, asset.symbol, asset.circulating_marketcap_usd, asset.latest_price_time FROM asset WHERE asset.asset_id = '1e31218a-e44e-4285-820c-8282ee222035' LIMIT 1;",
"columns": [
"NAME",
"SYMBOL",
"CIRCULATING_MARKETCAP_USD",
"LATEST_PRICE_TIME"
],
"query_result": "[[\"Bitcoin\",\"BTC\",\"1285476589284\",\"2026-08-17\"]]"
}
]
},
"metadata": {
"trace_id": "9e741d30-e05a-496d-a409-f87856aef133"
}
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}Run the Compute agent
Runs Messari’s Compute agent standalone over Messari’s quantitative datasets. Returns each executed SQL query in results, with query_result rows, the columns naming each row position, and truncated reporting that the row cap was reached. error carries the agent’s explanation when a run produces no usable result. There is no synthesized answer: this endpoint computes, and the caller writes the answer. The SQL and column names reflect Messari’s internal schema, which may change without notice: read them, do not parse them. Requires an authenticated Enterprise user holding the ai_toolkit_permission API permission. Limited to 30 requests per minute per user.
curl --request POST \
--url https://api.messari.io/ai/v1/agent/compute \
--header 'Content-Type: application/json' \
--header 'X-Messari-API-Key: <api-key>' \
--data '
{
"query": "What is the market cap of Bitcoin?"
}
'import requests
url = "https://api.messari.io/ai/v1/agent/compute"
payload = { "query": "What is the market cap of Bitcoin?" }
headers = {
"X-Messari-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Messari-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'What is the market cap of Bitcoin?'})
};
fetch('https://api.messari.io/ai/v1/agent/compute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.messari.io/ai/v1/agent/compute",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => 'What is the market cap of Bitcoin?'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Messari-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.messari.io/ai/v1/agent/compute"
payload := strings.NewReader("{\n \"query\": \"What is the market cap of Bitcoin?\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Messari-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.messari.io/ai/v1/agent/compute")
.header("X-Messari-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"What is the market cap of Bitcoin?\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.messari.io/ai/v1/agent/compute")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Messari-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"What is the market cap of Bitcoin?\"\n}"
response = http.request(request)
puts response.read_body{
"error": null,
"data": {
"results": [
{
"dataset": "asset",
"query": "SELECT asset.name, asset.symbol, asset.circulating_marketcap_usd, asset.latest_price_time FROM asset WHERE asset.asset_id = '1e31218a-e44e-4285-820c-8282ee222035' LIMIT 1;",
"columns": [
"NAME",
"SYMBOL",
"CIRCULATING_MARKETCAP_USD",
"LATEST_PRICE_TIME"
],
"query_result": "[[\"Bitcoin\",\"BTC\",\"1285476589284\",\"2026-08-17\"]]"
}
]
},
"metadata": {
"trace_id": "9e741d30-e05a-496d-a409-f87856aef133"
}
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}Authorizations
Body
One natural language question naming the metric, the entity, and the time range.
"What is the market cap of Bitcoin?"

