Documentation
Everything you need to integrate GeoSlicing into your workflow — from uploading your first dataset to building automated spatial pipelines via the API.
The GeoSlicing API is available on the Pro and Enterprise plans. All endpoints require a valid API key passed as a Bearer token.
Quickstart
The fastest way to get started is to upload a file and draw a slice in the browser. If you want to use the API, follow these steps:
1. Get your API key
Go to Settings → API Keys and generate a new key. Store it securely — it won't be shown again.
2. Upload a dataset
curl -X POST https://api.geoslicing.com/v1/upload \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "file=@boreholes.csv" \ -F "name=Mining Project A"
3. Slice it
curl -X POST https://api.geoslicing.com/v1/slice \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"dataset_id": "ds_abc123",
"bbox": [-105.15, 39.65, -104.90, 39.80]
}'
Supported file formats
| Format | Extension | Notes |
|---|---|---|
| CSV with coordinates | .csv | Must include lat/lon or longitude/latitude columns |
| GeoJSON | .geojson .json | FeatureCollection or single Feature |
| Shapefile | .zip | ZIP containing .shp, .shx, .dbf. All CRS supported via PyProj |
| KML / KMZ | .kml .kmz | Google Earth format, including folder structures |
| GeoPackage | .gpkg | OGC standard, multiple layers supported |
| DXF | .dxf | AutoCAD exchange format, georeferenced only |
Authentication
All API requests must include your API key in the Authorization header:
Authorization: Bearer gs_live_xxxxxxxxxxxxxxxxxxxx
Never expose your API key in client-side code or public repositories. Use environment variables.
POST /v1/upload
POSThttps://api.geoslicing.com/v1/upload
Upload a geospatial file. Returns a dataset ID for use in subsequent requests.
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | file | required | The geospatial file to upload. Max 100MB. |
| name | string | Human-readable name for this dataset. | |
| crs | string | EPSG code if not embedded (e.g. "EPSG:27700"). Auto-detected if omitted. |
{
"dataset_id": "ds_abc123",
"name": "Mining Project A",
"feature_count": 47,
"crs": "EPSG:4326",
"bbox": [-105.22, 39.58, -104.78, 39.92],
"attributes": ["id", "depth", "grade", "lithology"],
"created_at": "2026-03-15T10:24:00Z"
}
POST /v1/slice
POSThttps://api.geoslicing.com/v1/slice
Clip a dataset to a geographic extent. Returns clipped GeoJSON and spatial statistics.
| Parameter | Type | Required | Description |
|---|---|---|---|
| dataset_id | string | required | ID from /upload response. |
| bbox | array | [minLng, minLat, maxLng, maxLat] bounding box. | |
| polygon | GeoJSON | Arbitrary polygon geometry for slice. Use instead of bbox for non-rectangular slices. | |
| attributes | array | Subset of attributes to include in response. Default: all. |
POST /v1/analyze
POSThttps://api.geoslicing.com/v1/analyze
Run AI analysis on a slice result. Returns a natural-language insight string streamed via SSE.
| Parameter | Type | Required | Description |
|---|---|---|---|
| slice_id | string | required | ID from /slice response. |
| context | string | Optional domain context (e.g. "gold exploration, Archean greenstone belt"). | |
| stream | boolean | If true, response streams via SSE. Default: false. |
GET /v1/export
GEThttps://api.geoslicing.com/v1/export/{slice_id}/{format}
Download a slice as a file. Supported formats:
geojson, csv, kml, gpkg, pdf.GET /v1/export/sl_xyz789/csv Authorization: Bearer YOUR_API_KEY # Returns: CSV file download with Content-Disposition header