Skip to main content

API Reference

Unified Compute

The primary Hive API. All compute types go through one endpoint.

POST /v1/compute

Submit a compute job with one or more steps.

Full documentation

curl -X POST https://gns-browser-production.up.railway.app/v1/compute \
-H "Content-Type: application/json" \
-d '{"requester_pk":"YOUR_PK","h3_cell":"871e9a0ecffffff","steps":[{"id":"ask","type":"inference","messages":[{"role":"user","content":"Hello"}]}]}'

GET /v1/compute/:jobId

Retrieve a completed job by ID.

GET /v1/compute/recent?limit=50

List recent compute jobs.


Tile Rendering

MapLibre GL JS and flutter_map compatible. No API key required.

Full documentation

GET /v1/tiles/{h3_cell}/{zoom}/{style}.{format}

Serve a map tile. Styles: osm-bright, dark, satellite, terrain, osm-standard.

curl -o tile.png https://gns-browser-production.up.railway.app/v1/tiles/871e9a0ecffffff/15/osm-bright.png

GET /v1/tiles/grid/{cell}/{zoom}/{style}?rings=1

JSON grid of tile URLs for a cell and surrounding rings.

GET /v1/tiles/stats?hours=24

Hourly tile serving statistics.


Satellite Imagery

Sentinel-2 L2A via Element84 Earth Search. Free, no API key.

Full documentation

GET /v1/imagery/scenes?cell={h3}&from={date}&to={date}&cloud={%}&limit={n}

Search recent Sentinel-2 scenes.

GET /v1/imagery/ndvi?cell={h3}&from={date}&to={date}

Calculate NDVI for an H3 cell.

curl "https://gns-browser-production.up.railway.app/v1/imagery/ndvi?cell=871e9a0ecffffff"

POST /v1/imagery/process

Run a named operation (ndvi, cloud_mask, scene_search, atmospheric_correction).


MobyDB (Proof Layer)

Full documentation

POST /mobydb/sync

Workers push local records to central storage.

POST /mobydb/epochs

Workers push epoch seals.

GET /mobydb/query?cell={h3}&epoch_start={n}&epoch_end={n}&collection={type}&limit={n}

Query records across all workers.

GET /mobydb/proof/{record_id}

Verify a record's Merkle proof. Returns record, epoch seal, and verification status.


Inference Audit Trail

GET /hive/inference/recent?limit=50

Recent inference audit logs.

GET /hive/inference/stats?hours=24

Hourly aggregated inference statistics.


OpenAI-Compatible (Legacy)

These endpoints remain available for backward compatibility.

POST /v1/chat/completions

Standard OpenAI-compatible chat completion. Drop-in replacement.

from openai import OpenAI

client = OpenAI(
api_key="YOUR_HIVE_API_KEY",
base_url="https://hive.geiant.com/v1",
)

response = client.chat.completions.create(
model="phi-3-mini",
messages=[{"role": "user", "content": "Hello"}],
)

GET /v1/models

List available models in the swarm.


Jurisdiction Headers

Optional headers for geographic enforcement on any request:

HeaderDescription
x-hive-jurisdictionRestrict to workers in this jurisdiction (EU, US, IT)
x-hive-h3-cellTarget a specific H3 cell
x-hive-min-tierMinimum worker trust tier
x-hive-delegation-certBase64 delegation certificate

Pricing

Compute TypeUnitPrice (GNS)
Inference (Hive)Per token0.00001
Inference (Groq)Per token0 (subsidized)
Tile (cache hit)Per tile0.00001
Tile (cache miss)Per tile0.0001
Image processingPer megapixel0.001
Sensor fusionPer cell-epoch0.0005
Merkle proofPer proof0.0001

Subscription tiers

TierPriceInferenceTilesImagery
Free (GCRUMBS)$050 msg/day @haiShared cache
Hive Pro$29/moUnlimitedUnlimited, custom styles100 scenes/mo
Hive Enterprise€490–1,490/moPrivate workers, SLAPrivate tile serverUnlimited
Hive Maps APIUsage-basedPay-per-tile

Error codes

HTTPCodeMeaning
400invalid_modelModel not available
400invalid_cellMalformed H3 cell
401unauthorizedMissing or invalid API key
503no_workersNo eligible workers. Retry or remove jurisdiction constraint
504job_timeoutJob not completed within timeout