# Allium Explorer Run Async (Raw SQL)

> Allium Explorer Run Async (Raw SQL) is a paid API for AI agents from agents.allium.so, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-13).

Submits a raw SQL query for asynchronous execution against Allium's onchain blockchain data explorer

## Facts

- Endpoint: POST https://agents.allium.so/api/v1/explorer/queries/run-async
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agents-allium-so-52986032
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0hmr1-MMA6-APc5tx7paH

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agents-allium-so-52986032 -d '<json body>'
```

Example prompt: Run this SQL query against Allium's onchain explorer asynchronously: SELECT wallet_address, SUM(amount_usd) as total_volume FROM transactions WHERE chain = 'ethereum' AND block_timestamp >= '2024-01-01' GROUP BY wallet_address ORDER BY total_volume DESC LIMIT 100

## When to prefer this

Use this endpoint when you need to run a fully custom, arbitrary SQL query against Allium's onchain blockchain data — for example, complex aggregations, multi-table joins, or bespoke analytics not covered by Allium's pre-built endpoints for balances, prices, or transaction history. Prefer this over saved-query endpoints when the query is ad-hoc or unique to your use case.

## Known failure modes

- Invalid SQL syntax returns a parse error
- Query references non-existent table or column names
- Query times out for excessively complex or large scans
- Insufficient USDC balance to cover the $0.01 per-call fee
- Rate limiting if too many concurrent async jobs submitted
- Job ID not found when polling if expired or invalid

## How this service works

API request: /api/v1/explorer/queries/run-async

## Output

Returns an async job ID that can be polled for status and results; once complete, delivers tabular onchain data rows matching the submitted SQL query against Allium's blockchain data warehouse

## Example request

```json
{
 "parameters": {
  "sql": "SELECT chain, COUNT(*) as transaction_count FROM transactions WHERE chain = 'ethereum' LIMIT 10",
  "chain": "ethereum"
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "bodyType",
    "body",
    "method"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {
      "parameters": {
       "type": "object",
       "description": "Key-value map of query parameter substitutions",
       "additionalProperties": {
        "type": "string"
       }
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "run_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agents-allium-so-52986032/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.allium.so](https://www.zero.xyz/host/agents.allium.so/llms.txt)
