Register Site
curl --request POST \
--url https://api.example.com/v1/sites \
--header 'Content-Type: application/json' \
--data '{
"site": {}
}'import requests
url = "https://api.example.com/v1/sites"
payload = { "site": {} }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({site: {}})
};
fetch('https://api.example.com/v1/sites', 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.example.com/v1/sites",
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([
'site' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.example.com/v1/sites"
payload := strings.NewReader("{\n \"site\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/v1/sites")
.header("Content-Type", "application/json")
.body("{\n \"site\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/sites")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"site\": {}\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Sites
POST /v1/sites
Register an area of interest once, screen it once, then ask it questions cheaply for as long as it exists.
POST
/
v1
/
sites
Register Site
curl --request POST \
--url https://api.example.com/v1/sites \
--header 'Content-Type: application/json' \
--data '{
"site": {}
}'import requests
url = "https://api.example.com/v1/sites"
payload = { "site": {} }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({site: {}})
};
fetch('https://api.example.com/v1/sites', 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.example.com/v1/sites",
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([
'site' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.example.com/v1/sites"
payload := strings.NewReader("{\n \"site\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/v1/sites")
.header("Content-Type", "application/json")
.body("{\n \"site\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/sites")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"site\": {}\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Everything else in the API answers about a point. A real project is a
polygon — a parcel, an assemblage, a search area — and screening one
properly means running the full sieve across its extent, which takes minutes,
not milliseconds.
So sites split the work in two. Register the polygon once and pay for the
screen once. After that, questions against the resulting dossier are a single
model call with no re-fetching, at
Registration returns
POST /v1/ask-site.
Register
The body is a GeoJSONPolygon or MultiPolygon in WGS84:
curl -s https://api.mireye.com/v1/sites \
-H "Authorization: Bearer $MIREYE_API_TOKEN" \
-H 'content-type: application/json' \
-d '{
"site": {
"type": "Polygon",
"coordinates": [[
[-96.8020, 32.7740], [-96.7920, 32.7740],
[-96.7920, 32.7800], [-96.8020, 32.7800],
[-96.8020, 32.7740]
]]
}
}'
{
"site_id": "…",
"status": "building",
"message": "Screening this site (runs once). Poll GET /v1/sites/{site_id}."
}
202 building and runs the sieve off the request loop.
Limits: 200,000 acres (about 313 square miles) and 20,000 vertices.
A malformed geometry is a 422 and is rejected before metering, so a bad
polygon costs you nothing.
site_id is a hash of the geometry, which makes registration idempotent —
the same polygon always resolves to the same site, and concurrent
registrations run the sieve exactly once.
Poll
curl -s "https://api.mireye.com/v1/sites/$SITE_ID" \
-H "Authorization: Bearer $MIREYE_API_TOKEN"
{
"site_id": "…",
"status": "ready",
"site_acres": 61.4,
"site_extent": [-96.8020, 32.7740, -96.7920, 32.7800],
"built_at": "2026-08-26T07:31:04+00:00"
}
GET /v1/sites/{site_id} is unmetered — poll it as often as you like.
Statuses are building, ready, and failed; an unknown id is a
404 site_not_found.
What it costs
Registration bills 10 credits on every call past geometry validation, including the idempotent reply for a site that is alreadyready. That is
deliberate: polling registration would otherwise be a free status endpoint,
and the unmetered GET above already is one.
The pattern that saves money: register once, poll the GET, then ask
questions.
POST /v1/ask-site
Ask the registered dossier a question.
Pricing
How sites price against per-point fetches.
Body
application/json
Response
Successful Response