Topic

AI API Hub: Integration, Gateways, Cost, and Risk

An AI API hub covering integration and platform selection for OpenAI, Claude, Gemini, and DeepSeek, self-hosted gateways such as One API, LiteLLM, and New API, plus caching, relay risks, and observability.

  • 11 articles
  • 6 wiki entries
  • 7 gateway pages
Editor's guide

Getting the first call to work takes ten minutes. Everything after that is the real work: unifying calls across models, managing keys, controlling cost, and finding the cause when something breaks. This hub collects our integration, gateway, cost, and risk content in the order you meet it.

Who is this hub for?

Backend developers wiring models into a productTech leads watching API cost structureTeams comparing relay services and self-hosted gateways

On this page

  1. 01Start here: concepts and integration
  2. 02Platform selection: OpenAI, Claude, Gemini, DeepSeek
  3. 03Gateways and self-hosting: One API, LiteLLM, New API
  4. 04Cost and performance
  5. 05Risk, compliance, and observability
  6. 06Directories and lookups

Start here: concepts and integration

API keys, compatible endpoints, gateways, and routing.

Platform selection: OpenAI, Claude, Gemini, DeepSeek

How the official platforms differ, and where to start for each model.

Gateways and self-hosting: One API, LiteLLM, New API

Unify calls across providers and pull keys, limits, logs, and billing into one layer.

Cost and performance

Caching, model tiering, and pricing structure — measure before you optimize.

Risk, compliance, and observability

Relay pitfalls, where your data goes, and how to see what happens in production.

Directories and lookups

The gateway directory, side-by-side comparison, and availability records.

FAQ

Q: Should I call the official API directly or go through a relay?
A: If you can open an official account and handle overseas billing, call the provider directly: the shortest path and the clearest accountability. Relays solve payment and access problems at the cost of an intermediary you do not control — balance, rate limits, and data retention are all on their side. Our relay pitfalls guide lists what to check.
Q: When is a self-hosted AI gateway worth it?
A: When any two of these appear: multiple providers to call through one interface, per-team keys and quotas, or a need for complete call logs and billing records. Our gateway design article covers the pieces to build.
Q: Does an OpenAI-compatible endpoint mean models are interchangeable?
A: Only at the request-format layer. Function calling, multimodal input, streaming details, context length, and rate limits still differ, so any switch needs revalidation. Our article on compatible endpoints explains where they diverge.
Q: API spend is climbing — what should I fix first?
A: Look at the input side first: long system prompts and repeated context usually dominate, so prompt caching and context trimming pay off fastest. Then tier your models and push simple tasks to cheaper ones. Our prompt caching guide shows how.