Language SDKs
Skip the raw HTTP boilerplate. Install an official geog.ai client and get typed responses, autocomplete, automatic Authorization headers, and built-in async-job polling. The Python and JavaScript clients ship today; a Go client is in preview.
Overview
The quickstart uses raw HTTP (cURL, requests, fetch) so you can see exactly what's on the wire. For day-to-day work, an SDK is faster: one install, a typed client, and you're calling the API.
| Language | Package | Install | Status | Source |
|---|---|---|---|---|
| Python 3.10+ | geog-ai | pip install geog-ai | Stable | python/ |
| JavaScript / Node.js 18+ | @geog-ai/sdk | npm install @geog-ai/sdk | Stable | typescript/ |
| Go 1.21+ | github.com/geog-ai/geog-go | go get github.com/geog-ai/geog-go | Preview | request access |
openapi.yaml. You can produce a client for Ruby, Java, C#, Rust, PHP, Kotlin, Swift, or anything else openapi-generator supports โ see Generate your own client below.
Why use an SDK?
The geog.ai HTTP API is intentionally simple โ a few headers and JSON in, JSON out. The SDKs give you the same calls, but with the rough edges already smoothed off:
Authorization: Bearer โฆ, Content-Type, User-Agent, and X-Idempotency-Key are managed for you.JobResponse<TResult>, SpatialState, error envelopes โ all typed so your IDE autocompletes payload fields.waitForJob() / wait_for_job() call replaces dozens of lines of polling, backoff, and timeout logic.Last-Event-ID on dropped connections. For request-level retries on regular calls, inject a requests.Session with an HTTPAdapter (Python) or wrap calls in your own retry policy (TypeScript).streamPlume() / stream_plume() โ reconnects with Last-Event-ID on dropped connections.register_webhook(), send_webhook_test(), replay_webhook_delivery()). HMAC verification of X-Geog-Signature stays in your handler โ see the 30-second recipe in the API reference.Hello world in every language
Each SDK below has the same shape: install the package, instantiate a GeogClient with your API key, then call any of the documented endpoints. The minimal snippet under each section makes a real call to GET /nearby โ the same endpoint used in step 3 of the quickstart.
geog_test_sk_โฆ) โ it returns realistic synthetic data and never charges your account. Set it as GEOG_API_KEY in your shell before running any of the snippets below.
Already have a registered device? Pass device_id="โฆ" to geog.context() instead โ it returns a fully resolved SpatialState (terrain, meteorology, jurisdiction).
The same code works in plain JavaScript โ just drop the import for a CommonJS require("@geog-ai/sdk"). Already have a registered device? Call geog.context({ device_id: "โฆ" }) for a typed SpatialState (terrain, meteorology, jurisdiction).
.d.ts definitions for every endpoint and the JobResponse<TResult> generic. Plain JavaScript works too โ the typings are optional.
Async-job polling, in one line
Every /simulate/*, /rf/mesh/viability, /rf/optimize/placement and /optimize/* endpoint returns an AsyncJobAccepted envelope (HTTP 202) with a job.id. Without an SDK you'd write a polling loop with backoff and timeout logic. With an SDK it's one call:
The full typed-result pattern (with the JobResponse<TResult> generic and per-endpoint result shapes) is documented in the API reference's Language Clients section.
Auth & configuration
The two production SDKs follow each language's own naming conventions. Read the API key from GEOG_API_KEY in your environment and pass it to the constructor.
TypeScript — new GeogClient(opts)
| Option | Type | Default | Purpose |
|---|---|---|---|
| apiKey | string | required | Bearer token sent on every request. |
| baseUrl | string | https://api.geog.ai/v1 | Override for staging or self-hosted deployments. |
| siteId | string | โ | Forwarded as the X-Site-ID header. |
| timeoutMs | number | 30_000 | Per-request timeout (ms). |
| fetch | typeof fetch | global fetch | Inject your own fetch for Node < 18, edge runtimes, or test mocks. |
Regular requests do not retry automatically โ wrap them in your own retry policy if you need 429 / 5xx resilience. streamPlume() reconnects with exponential backoff (default maxRetries: 5) and replays from Last-Event-ID.
Python — GeogClient(api_key, **opts)
| Option | Type | Default | Purpose |
|---|---|---|---|
| api_key | str | required | Bearer token sent on every request. |
| base_url | str | https://api.geog.ai/v1 | Override for staging or self-hosted deployments. |
| site_id | str | โ | Forwarded as the X-Site-ID header. |
| timeout | float | 30.0 | Per-request timeout in seconds. |
| session | requests.Session | fresh session | Inject a pre-configured session (proxies, retries via HTTPAdapter, etc.). |
Non-streaming Python calls do not retry on their own; pass a requests.Session with a urllib3 Retry policy if you need automatic retries. stream_plume() reconnects with exponential backoff (max_retries=5) and replays from Last-Event-ID on dropped connections.
Generate your own client
For languages we don't ship today, point any OpenAPI generator at openapi.yaml โ every endpoint, parameter, and schema is fully described.
info.version on every release. Re-run your generator whenever the version changes; the response envelopes ({ ok, result, meta } and the JobResponse<TResult> shape) are stable across minor versions.
If you build a community client we'd love to link it from this page โ drop us a line at hello@geog.ai.