Developers

One base URL, your existing SDK, and a gateway that treats reliability, latency and honest billing as API features. Everything you need to build is on this page.

Start here

The whole migration

Python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.switchgate.ai/v1",  # the only change
    api_key="sg-live-…",
)

r = client.chat.completions.create(
    model="switchgate/auto",
    messages=[{"role": "user", "content": "Bonjour!"}],
)
  • OpenAI-compatible. Official SDKs in Python, JavaScript, Node.js, Go and plain cURL all work by changing base_url.
  • Framework-friendly. LangChain, LlamaIndex, the Vercel AI SDK and anything else with an OpenAI provider Just Works - point it at the base URL.
  • Exact cost on every response via x-sg-cost and in the usage object - streams included.

Gateway principles

What we optimize for

  • Latency honesty: the gateway adds one hop; we publish its overhead on the status page instead of pretending it's zero.
  • Reliability as a parameter: retries and cross-provider failover are request options (sg_fallbacks), not a sales conversation.
  • Billing you can audit: list price pass-through, one fee at top-up, exact cost per call, cache hits at literally zero.
  • Keys that fail safe: prepaid balances, budgets, model locks, IP and country pins, per-key rate limits, instant revocation.

Ship something this afternoon

Free trial credits and the models list is one authenticated GET away.