Guides
SDK
Official TypeScript and Python SDKs. Both wrap the OpenAI-compatible HTTP API with typed helpers for routing, fallbacks, caching, and streaming.
Configuration
| Property | Type | Description |
|---|---|---|
apiKeyreq | string | Your GROUNDROCK key. Defaults to GROUNDROCK_KEY env. |
baseURL | string | Override the default edge (https://api.groundrock.dev/v1). |
timeout | number | Request timeout in ms. Default: 60000. |
maxRetries | number | Retries per provider before falling back. Default: 2. |
defaultModel | string | Model used when calls omit the model field. |
Instrumentation
The SDK emits OpenTelemetry traces out of the box. Point it at your collector:
ts
import { Groundrock } from "@groundrock/sdk";
const ai = new Groundrock({
otel: { endpoint: "https://otel.your-company.com/v1/traces" },
});