Skip to content

Integration

SDKs & APIs

Drop in one of our official SDKs for zero-latency local evaluation, or call the REST API directly from any language or runtime — your stack, your choice.

Client libraries

20+ languages supported

TypeScript — local evaluation
import { TrustyGorilla } from "@trustygorilla/sdk" const tg = new TrustyGorilla({ sdkKey: process.env.TG_KEY }) // Synchronous, local — zero network on the hot pathconst flag = tg.isOn("new-checkout", {  userId: user.id,  plan: user.plan,  country: req.geo.country,}) // Typed remote config valueconst limit = tg.getNumber("max_upload_mb", { default: 10 })

Local evaluation

Zero added latency to your requests

SDKs bootstrap with your full rule set and keep it in memory. Flag evaluation is a local hash lookup — microseconds, not milliseconds. No network call on your hot path.

<1µs

Eval time

~40KB

SDK bundle

20+

Languages

Evaluation model

  1. 1

    SDK initialises

    Downloads your project's rule set once and caches it locally.

  2. 2

    Stream keeps it fresh

    Edge sends a delta whenever any flag changes — no polling.

  3. 3

    Evaluate locally

    isOn() reads the local cache. No HTTP, no DNS, no TLS — just memory.

  4. 4

    Context targeting

    Pass any user attributes. Rules evaluate deterministically in-process.

REST API

Works from any stack

Use the REST API when an SDK isn't available, for server-side edge workers, or to build custom tooling. Bearer-token auth, JSON everywhere.

Core endpoints
GET/v1/flags/:key
POST/v1/flags/batch
GET/v1/config/:key
POST/v1/events
GET/v1/flags
cURL
curl -X POST https://api.trustygorilla.com/v1/flags/batch \  -H "Authorization: Bearer $TG_SERVER_KEY" \  -H "Content-Type: application/json" \  -d '{    "context": { "userId": "u_123", "plan": "pro" },    "keys": ["new-checkout", "dark-mode", "beta-search"]  }' # Response{  "new-checkout": true,  "dark-mode": false,  "beta-search": true}

Integrate in five minutes

Install the SDK, add your key, and evaluate your first flag. That's it.

  • No credit card required
  • Free forever tier