Skip to main content
SpaceTime OS
Developer Portal
Get API Key
spacetime-os.com/developers
Developer Portal v2.0

Build on SpaceTime OS

The infrastructure security platform with 118+ data sources, real-time threat intelligence, and autonomous response — now with a full REST API, Python & TypeScript SDKs, and a 27-tool MCP server for AI-native agent integration.

Get API KeyView on GitHub
10
API Endpoints
27
MCP Tools
118+
Data Connectors
15ms
P99 Latency
99.97%
Uptime SLA

Quick Start

From zero to your first API call in under 3 minutes.

1

Get API Key

Free tier — no credit card

get-api-key.sh
curl -X POST https://api.spacetime-os.com/v1/auth/keys \
  -H "Content-Type: application/json" \
  -d '{ "email": "you@org.gov", "tier": "free" }'

# Response:
{
  "api_key": "sk-spacetime-xxxx...",
  "tier": "free",
  "rate_limit": "10/min"
}
Create Free Account
2

Install SDK

Python or TypeScript

install.sh
# Python
pip install spacetime-os

# TypeScript / Node
npm install @spacetime-os/sdk

# Verify installation
python -c "import spacetime_os; print(spacetime_os.__version__)"
# → 2.1.0
Requires Python 3.9+ or Node 18+
3

Make First Call

Threat score in seconds

first_call.py
import spacetime_os as st

client = st.Client(api_key="sk-spacetime-...")

# Score a threat target
result = client.threat_score(
    target="185.220.101.45",
    target_type="ip",
    context="maritime"
)

print(result.composite_score)  # → 84
print(result.severity)         # → CRITICAL
print(result.matched_signatures)
# → ['APT40', 'VOLT-TYPHOON']

API Reference

10 production-ready endpoints. Click any card to expand the full spec.

Base URL:api.spacetime-os.com/v1
Version:v2.0
27 Tools AvailableAgent-Native

MCP Server — Agent-Native Integration

SpaceTime OS ships a 27-tool MCP server that lets any AI agent — Claude, GPT, Gemini, or your custom agent — interact with the platform natively. No REST wrappers. No prompt engineering for API calls. Agents call tools directly with structured inputs and get structured outputs back.

1. Install the MCP Server

install-mcp.sh
pip install spacetime-os[mcp]

# Or run directly without install
uvx spacetime-os-mcp

2. Add to Claude Desktop config

claude_desktop_config.json
{
  "mcpServers": {
    "spacetime-os": {
      "command": "python",
      "args": ["-m", "spacetime_os.mcp_server"],
      "env": {
        "SPACETIME_API_KEY": "sk-spacetime-..."
      }
    }
  }
}

3. Or use with any MCP-compatible agent

mcp_client_example.py
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client

server_params = StdioServerParameters(
    command="python",
    args=["-m", "spacetime_os.mcp_server"],
    env={"SPACETIME_API_KEY": "sk-spacetime-..."}
)

async with stdio_client(server_params) as (r, w):
    async with ClientSession(r, w) as session:
        # List all 27 tools
        tools = await session.list_tools()

        # Call a tool directly
        result = await session.call_tool(
            "get_threat_score",
            {"target": "185.220.101.45", "target_type": "ip"}
        )

Available MCP Tools

27 / 27
query_threatsSearch threats by type, location, severity
get_incidentsList and filter active incidents
create_incidentOpen a new incident from agent context
search_vesselsMaritime vessel search and profile
get_cable_riskReal-time cable proximity risk
get_threat_score7-factor composite threat scoring
get_correlationCross-domain event correlation
dispatch_droneTrigger autonomous drone response
query_data_lakeSQL query over 118+ data connectors
get_connectorsList all available data connectors
provision_free_accountSelf-serve tenant provisioning
get_space_weatherSolar/Kp index with GIC risk
get_internet_healthBGP, RPKI, IODA, Cloudflare status
get_vessel_profileZeroMemory behavioral anomaly profile
get_geopolitical_riskACLED + OFAC + CERT overlay
list_cable_systemsFull global submarine cable registry
get_ais_trackHistorical AIS vessel tracks
get_dark_vesselsCurrently dark / loitering vessels
query_threat_feedCISA KEV + abuse.ch IOC lookup
get_environmental_riskSeismic, tsunami, weather hazards
search_eventsFull-text event search with filters
get_bgp_alertsBGP hijacks and route leaks
get_sensor_dataRaw DAS/fiber optic sensor telemetry
add_watchlistAdd vessels/cables/IPs to watchlist
get_watchlist_alertsAlerts for watchlisted entities
run_playbookExecute a named response playbook
get_api_usageCheck your token quota and usage

Authentication

Bearer token auth on all endpoints. Keys are scoped per tenant with optional IP allowlists.

API Key Format

auth-header.sh
# Include in every request header:
Authorization: Bearer sk-spacetime-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Example with curl:
curl https://api.spacetime-os.com/v1/threat-score \
  -H "Authorization: Bearer sk-spacetime-..." \
  -H "Content-Type: application/json"

Environment Variable (recommended)

.env + usage
# .env
SPACETIME_API_KEY=sk-spacetime-...

# Python — auto-discovered from env
import spacetime_os as st
client = st.Client()  # no key arg needed

# TypeScript — auto-discovered from env
import { SpaceTimeClient } from '@spacetime-os/sdk'
const client = new SpaceTimeClient()

Error Codes

CODEMEANINGACTION
401Invalid or missing API keyCheck Authorization header
403Endpoint not in your tierUpgrade plan
429Rate limit exceededRetry after X-RateLimit-Reset
422Invalid request parametersCheck parameter schema
500Internal server errorRetry with backoff

Rate Limits & Plans

Free$0
Rate limit10 / min
Monthly calls1,000
Starter$49/mo
Rate limit60 / min
Monthly calls50,000
MOST POPULAR
Professional$299/mo
Rate limit300 / min
Monthly calls500,000
EnterpriseCustom
Rate limit1,000 / min
Monthly callsUnlimited

Response headers on every call:

X-RateLimit-LimitYour tier's per-minute limit
X-RateLimit-RemainingCalls left in current window
X-RateLimit-ResetUnix timestamp for window reset
X-Request-IdUnique request ID for support

SDKs & Integration Methods

Multiple integration paths — choose what fits your stack.

🐍

Python SDK

spacetime-os on PyPI
PyPI
python_sdk.py
pip install spacetime-os

import spacetime_os as st

client = st.Client()

# Async support
import asyncio

async def run():
    async with st.AsyncClient() as c:
        score = await c.threat_score("185.220.101.45")
        vessel = await c.vessel_profile("413123456")
        risk = await c.cable_risk(lat=35.67, lon=139.65)

asyncio.run(run())
Python 3.9+Async/awaitType hintsAuto-retry
📘

TypeScript SDK

@spacetime-os/sdk on npm
npm
ts_sdk.ts
npm install @spacetime-os/sdk

import { SpaceTimeClient } from '@spacetime-os/sdk'

const client = new SpaceTimeClient({
  apiKey: process.env.SPACETIME_API_KEY
})

// Fully typed responses
const score = await client.threatScore({
  target: '185.220.101.45',
  targetType: 'ip',
  context: 'maritime'
})

console.log(score.compositScore)  // number
console.log(score.severity)       // 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL'
TypeScript-firstNode 18+Browser supportTree-shakeable

MCP Server

Model Context Protocol · 27 tools
NEW
mcp-setup.sh
pip install spacetime-os[mcp]

# In Claude Desktop config:
{
  "mcpServers": {
    "spacetime-os": {
      "command": "python",
      "args": ["-m", "spacetime_os.mcp_server"],
      "env": { "SPACETIME_API_KEY": "sk-..." }
    }
  }
}

# Claude can now natively call:
# "Score this IP for threat level: 185.220.101.45"
# "Find dark vessels near cable APCN-2"
# "Check internet health for AS4837"
Claude DesktopCustom agentsGPT plugins27 tools

REST API

Direct HTTP — any language
Docs
rest-api.sh
# Works with curl, fetch, httpx, axios, Go net/http, etc.
BASE="https://api.spacetime-os.com/v1"
KEY="sk-spacetime-..."

# Bash / curl
curl "$BASE/threat-score?target=185.220.101.45&target_type=ip" \
  -H "Authorization: Bearer $KEY" | jq .

# JavaScript fetch
const res = await fetch(`${BASE}/vessel-profile?mmsi=413123456`, {
  headers: { Authorization: `Bearer ${KEY}` }
})
const data = await res.json()

# Go
req, _ := http.NewRequest("GET", base+"/cable-risk", nil)
req.Header.Set("Authorization", "Bearer "+key)
OpenAPI 3.1JSON responsesHTTPS onlyCORS enabled