Quick start
Create a key, describe one link, send a sample for it, read it back, and get an SNR forecast for its next pass. It takes about five minutes and works on the free Explore plan.
Using a dedicated enterprise deployment? Start here for your hosts and keys.
You need a Constellation account and either curl or Python 3.9+ with httpx.
1. Create an API key
Sign in to Platform and open Integrations, API and MCP, choose Create key, then Your own scripts, keep the default Expiration or choose another, and select these four scopes. Your own scripts starts with predictions:read and workflows:write ticked. Also tick config:write, telemetry:write and topology:read. Untick workflows:write unless the key will also run workflows.
| Scope in the Platform | Lets the key | Used in |
|---|---|---|
config:write | Upload, change and read your network config. Live keys only. | Steps 2 and 4 |
telemetry:write | Send telemetry | Step 3 |
topology:read | Read your fleet and its passes | Steps 4 and 5 |
predictions:read | Request forecasts | Step 5 |
See Scopes for the exact endpoints each scope opens.
Copy the secret now: it is shown once. Every command below reads it and your API host from the environment:
- curl
- Python
export CONSTELLATION_API_KEY="cos_live_..."
export CONSTELLATION_API_URL="https://api.constellation.space"
export CONSTELLATION_API_KEY="cos_live_..."
export CONSTELLATION_API_URL="https://api.constellation.space"
import json
import os
from datetime import datetime, timedelta, timezone
import httpx
api = httpx.Client(
base_url=os.environ["CONSTELLATION_API_URL"],
headers={"x-api-key": os.environ["CONSTELLATION_API_KEY"]},
)
2. Describe your link
Save the example document as topology-config.json, with your own station, antenna and satellite, and upload it. It defines the IDs gs-1, ant-1 and sat-1 used below.
- curl
- Python
curl -X PUT "$CONSTELLATION_API_URL/topology/config" \
-H "x-api-key: $CONSTELLATION_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @topology-config.json
with open("topology-config.json") as f:
stored = api.put("/topology/config", json=json.load(f))
print(stored.status_code, stored.json())
Fix anything the response lists in issues. Each one names its field.
3. Send a link sample
Write one record for the link, stamped with the current time.
- curl
- Python
NOW=$(date -u +%Y-%m-%dT%H:%M:%SZ)
curl -X POST "$CONSTELLATION_API_URL/telemetry" \
-H "x-api-key: $CONSTELLATION_API_KEY" \
-H "Content-Type: application/json" \
-d '[{"time": "'"$NOW"'", "ground_station_id": "gs-1", "ground_antenna_id": "ant-1",
"satellite_id": "sat-1",
"fields": {"es_n0_db": 12.5, "elevation_deg": 45.0, "range_m": 1200000.0}}]'
now = datetime.now(timezone.utc)
ack = api.post("/telemetry", json=[{
"time": now.strftime("%Y-%m-%dT%H:%M:%SZ"),
"ground_station_id": "gs-1",
"ground_antenna_id": "ant-1",
"satellite_id": "sat-1",
"fields": {"es_n0_db": 12.5, "elevation_deg": 45.0, "range_m": 1200000.0},
}])
print(ack.status_code, ack.json())
The body is a bare JSON array of records, not an object. A 202 with accepted_count: 1 means the record was written:
{"write_id": "e523302c-5335-4757-bceb-7542a132e74d", "accepted_count": 1, "rejected_count": 0, "rejected_indices": null, "rejections": null}
4. Read it back
Topology returns config, your stored network config, and state, the newest value of each field for every link that reported inside the freshness window. The commands below print state alone.
- curl
- Python
curl -sS -G "$CONSTELLATION_API_URL/topology" \
-H "x-api-key: $CONSTELLATION_API_KEY" \
-d freshness_seconds=900 -d satellite_id=sat-1 | jq '.state'
fleet = api.get("/topology", params={"freshness_seconds": 900, "satellite_id": "sat-1"}).json()
print(json.dumps(fleet["state"], indent=2))
Your link appears in state with the fields you sent, each with its own time in field_times (times are illustrative):
[
{
"measurement": "telemetry_v2",
"time": "2026-10-05T02:58:09Z",
"tags": { "ground_station_id": "gs-1", "ground_antenna_id": "ant-1", "satellite_id": "sat-1" },
"fields": { "es_n0_db": 12.5, "elevation_deg": 45.0, "range_m": 1200000.0 },
"field_times": {
"es_n0_db": "2026-10-05T02:58:09Z",
"elevation_deg": "2026-10-05T02:58:09Z",
"range_m": "2026-10-05T02:58:09Z"
}
}
]
A missing link means the sample is older than freshness_seconds. Send it again with the current time.
5. Forecast its next pass
List the link's passes over the next day, then ask for SNR at the start of the first one. The window starts 5 minutes from now, so the first pass starts in the future even when the satellite is overhead now: a forecast's at must be later than the time the API receives it.
GET /topology/passes is part of workflows. Where workflows are not on, it answers 404 workflows_not_enabled and the command below stops with a message. Then set AT in curl, or at in Python, to a UTC time in the next day when sat-1 is above ant-1, written as YYYY-MM-DDTHH:MM:SSZ, and send only the second call.
- curl
- Python
FROM=$(date -u -v+5M +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -u -d '+5 minutes' +%Y-%m-%dT%H:%M:%SZ)
TO=$(date -u -v+1d +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -u -d '+1 day' +%Y-%m-%dT%H:%M:%SZ)
AT=$(curl -sS -G "$CONSTELLATION_API_URL/topology/passes" \
-H "x-api-key: $CONSTELLATION_API_KEY" \
--data-urlencode "from=$FROM" --data-urlencode "to=$TO" \
-d step_s=60 -d satellite_id=sat-1 | jq -er '.items[0].aos_utc') \
|| echo "No pass listed: set AT yourself, as above"
echo "AT=$AT"
curl -sS -G "$CONSTELLATION_API_URL/predictions" \
-H "x-api-key: $CONSTELLATION_API_KEY" \
-d model_family=snr -d satellite_id=sat-1 --data-urlencode "at=$AT"
start = datetime.now(timezone.utc) + timedelta(minutes=5)
passes = api.get("/topology/passes", params={
"from": start.isoformat(), "to": (start + timedelta(days=1)).isoformat(),
"step_s": 60, "satellite_id": "sat-1",
})
passes.raise_for_status()
at = passes.json()["items"][0]["aos_utc"]
forecast = api.get("/predictions", params={
"model_family": "snr", "satellite_id": "sat-1", "at": at,
}).json()
for item in forecast["items"]:
print(item["ground_antenna_id"], item["value"]["snr_db_p50"])
print(forecast["entity_errors"])
The response has one item per antenna that sees the satellite at at (values are illustrative):
{
"model_family": "snr",
"captured_at": "2026-10-05T02:59:01Z",
"items": [
{
"ground_antenna_id": "ant-1",
"ground_station_id": "gs-1",
"satellite_id": "sat-1",
"target_at": "2026-10-05T08:12:00Z",
"value": { "snr_db_p50": 11.8 },
"predicted_at": "2026-10-05T02:59:01Z",
"model_version": "...",
"feature_view_id": "...",
"model_release_id": "...",
"status": "uncertain",
"reason": "link_budget_only"
}
],
"entity_errors": []
}
snr_db_p50is the predicted SNR in dB.status: "uncertain"withreason: "link_budget_only"marks a forecast that is the link budget alone. On Explore every SNR forecast is. On Operator and above, a forecast has bothnullonce the model has learned from the antenna's telemetry. See Telemetry.- Read
entity_errorsas well asitems. An antenna with no forecast is listed there with a code, not returned as a zero forecast. See Declines.
What else your key can do
| To | Call | Scope |
|---|---|---|
| Send many records at once | POST /telemetry, up to 1,000 records per request | telemetry:write |
| Read how a link changed over time | GET /topology/series | topology:read |
| Run a workflow over a window of passes | POST /predictions | workflows:write |
| Change part of your network config | PATCH /topology/config | config:write |
| Send files that have no dedicated API, in any format | PUT /telemetry/files/{source}/{name} | raw-data:write |
| Forecast weather loss between a station and a satellite at a time you name | GET /predictions with model_family=weather-attenuation and at | predictions:read |
| Run any of these from an AI agent | The MCP server, with the same key | The scopes of each call |
Use an AI agent instead
Any MCP client can run the same loop with the same key. Connect an AI agent has the setup for Claude Code, Claude Desktop, Cursor, VS Code, Codex CLI, Gemini CLI, and Grok Build.
Then ask: "Send a link sample for ant-1 and sat-1 with es_n0_db 12.5, elevation 45 degrees, and range 1,200 km at the current time, then forecast its next pass."
If something fails
| Response | Cause | Fix |
|---|---|---|
401 auth_failed | Key missing, mistyped, or revoked | Check the x-api-key header, or create a new key |
403 insufficient_scope | The key lacks the scope named in required | Create a key with all four scopes from step 1 |
409 no_network_config | No network config is stored | Upload one as in step 2 |
400 invalid_input, reason not_in_network_config | The record names an ID your network config does not hold | Use the IDs from step 2 |
400 at_not_in_future | at is in the past | Send a later at |
404 workflows_not_enabled on GET /topology/passes | Workflows are not on in this deployment | Pick at yourself, as step 5 says |
200 with your antenna in entity_errors | No link at at, or the link lacks RF values | Check the code against Declines |
429 rate_limited or auth_lockout | Too many requests or failed keys | Wait the Retry-After delay. See Errors and limits |
Next steps
- Stream telemetry continuously with the fleet agent, which buffers to disk and keeps the key off your applications.
- Send everything each model reads. Link SNR lists the full SNR input set.
- Explore the demo fleet offline. Download it from Hugging Face as CSV and Parquet files.
Next: connect an AI agent over MCP.