git404hub

what is tollgate-sdk fr?

tollgateai/tollgate-sdk — explained in plain English

Analysis updated 2026-05-18

0TypeScriptAudience · developerComplexity · 2/5LicenseSetup · easy

tl;dr

SDKs that wrap your existing Anthropic, OpenAI, Bedrock, or Gemini client to automatically report live per customer gross margin to the Tollgate service.

vibe map

vibe map loading… check back in a sec.

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Wrap an existing Anthropic client to auto-report token usage per customer.

VIBE 2

Track gross margin per agent and per run across multiple AI providers.

VIBE 3

Attribute AI usage costs to individual customers with a single customerId field.

VIBE 4

Instrument streaming and non-streaming calls to OpenAI, Bedrock, or Gemini.

what's the stack?

TypeScriptPythonNode.js

how it stacks up fr

tollgateai/tollgate-sdk0xradioac7iv/tempfs7vignesh/pgpulse
Stars000
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasymoderatemoderate
Complexity2/53/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min

Requires a Tollgate API key and an existing client for one of the four supported AI providers.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

in plain english

Tollgate SDK is the official set of software libraries for a service called Tollgate, which tracks the gross margin of AI agents in real time. Gross margin here means the difference between what a company pays an AI provider for tokens and what it charges its own customers for that usage, tracked per customer, per agent, and per individual run. The idea is that a company running AI agents on behalf of customers usually knows what it charges customers but does not have an easy way to see, live, exactly how much of that revenue is being eaten up by the underlying token costs from providers like Anthropic, OpenAI, AWS Bedrock, or Google Gemini. Tollgate connects the cost side, which comes from the provider's own token usage, with the revenue side, which comes from the company's own pricing plan configuration, to show that margin as it happens. The SDK is available in TypeScript and Python, published on npm and PyPI respectively. Both versions work the same way: a developer wraps their existing AI provider client, such as an Anthropic or OpenAI client, with a Tollgate wrapper function, and every call made through that wrapped client automatically reports its usage to Tollgate. This works whether the underlying call is streaming or not, and across the four supported providers. Getting started involves installing the package for the chosen language, creating a Tollgate client with an API key, wrapping the existing AI provider client, and attaching a customer identifier to each call so usage can be attributed correctly. The project is released under the MIT license.

prompts (copy fr)

prompt 1
Help me install the Tollgate TypeScript SDK and wrap my existing Anthropic client with it.
prompt 2
Explain how Tollgate combines provider token cost with my own pricing plan to compute gross margin.
prompt 3
Walk me through instrumenting a streaming OpenAI call with the Tollgate Python SDK.
prompt 4
What does the customerId parameter do when wrapping a client with Tollgate?

Frequently asked questions

what is tollgate-sdk fr?

SDKs that wrap your existing Anthropic, OpenAI, Bedrock, or Gemini client to automatically report live per customer gross margin to the Tollgate service.

What language is tollgate-sdk written in?

Mainly TypeScript. The stack also includes TypeScript, Python, Node.js.

What license does tollgate-sdk use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is tollgate-sdk to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is tollgate-sdk for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.