THROUGHPUTS

SDKs

Official THROUGHPUTS clients and OpenAI SDK compatibility.

The fastest path is to use the OpenAI SDK in your language — THROUGHPUTS is OpenAI-compatible, so changing the baseURL is all you need.

If you want a first-party client, THROUGHPUTS ships official SDKs for Python, TypeScript, and Go.

OpenAI SDK compatibility

If you already use the OpenAI SDK, keep using it:

from openai import OpenAI

client = OpenAI(
    api_key="thp_live_xxx",
    base_url="https://api.throughputs.dev/v1",  # only change
)

That's the entire migration. Every method works the same way.

What the first-party SDKs add

  • Typed responses for THROUGHPUTS-specific headers (X-Throughputs-Cost-Usd, X-Throughputs-Model, etc).
  • Automatic fallback chains via model_fallback parameter.
  • Spend tracking helpers — accumulate X-Throughputs-Cost-Usd across calls.
  • Retries with jitter tuned for THROUGHPUTS rate limits.

Use them when you need first-party features. Use the OpenAI SDK when you want zero new dependencies.

On this page