Guides

SDK

Official TypeScript and Python SDKs. Both wrap the OpenAI-compatible HTTP API with typed helpers for routing, fallbacks, caching, and streaming.

Configuration

PropertyTypeDescription
apiKeyreq
stringYour GROUNDROCK key. Defaults to GROUNDROCK_KEY env.
baseURL
stringOverride the default edge (https://api.groundrock.dev/v1).
timeout
numberRequest timeout in ms. Default: 60000.
maxRetries
numberRetries per provider before falling back. Default: 2.
defaultModel
stringModel 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" },
});