Démo Ceci est une démo en lecture seule. Documentation Acheter ZephAI
New

Gateway v2 is live — one endpoint, every model, streaming tool-calls. Read the changelog

Migration

Move to ZephAI without a rewrite

Three migration paths, in order of effort: base-URL swap, gateway adapter, or full multi-vendor consolidation.

Choose a path

Path 1 · 60 seconds

Base-URL swap

You already use an OpenAI-compatible SDK. Change two values and keep everything else.

  • OpenAI SDKs
  • LangChain, LlamaIndex, Vercel AI SDK
  • Any client that accepts a base URL
Path 2 · hours

Gateway adapter

You have provider-specific features (vision formats, logprobs, beta headers). Map them once behind a thin adapter.

  • 2–3 provider quirks to map
  • Typed errors & retries preserved
  • Shadow traffic first
Path 3 · days

Consolidate vendors

You're integrating N vendors directly. Collapse them into one key, one invoice and failover across listings.

  • Per-vendor SDKs removed
  • Single invoice & telemetry
  • Run with solutions engineering

From the OpenAI SDK

Two values change: the base URL and the API key. Model IDs are ZephAI listing IDs.

# before
client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])
resp = client.chat.completions.create(model="gpt-4o-mini", messages=msgs)

# after
client = OpenAI(
    api_key=os.environ["ZEPHAI_KEY"],
    base_url="https://api.zephai.dev/v1",
)
resp = client.chat.completions.create(model="zeph-nexus-4", messages=msgs)

Works unchanged

  • Chat completions, streaming, tool-calling
  • Embeddings & rerank
  • Images (generation + edit)
  • Audio transcriptions
  • Files, batches, structured outputs

Map these

  • Model IDs → listing IDs (use GET /v1/models)
  • Org header → not needed, use workspace keys
  • Legacy /v1/usage_reports → /v1/usage

From other gateways

Most gateways expose an OpenAI-compatible surface, so path 1 applies. What usually needs attention:

ConceptElsewhereZephAI
AuthBearer keyBearer key (zph_live_ / zph_test_)
Model routingroute / provider fieldmodel: "auto" + fallbacks[]
Spend limitsworkspace creditsper-key spend caps (enforced)
Usage export/usage endpoint/v1/usage + scheduled CSV
Failoverautomatic, hiddenexplicit fallbacks[] + 250 ms budget
Vendor attributionrarely exposedevery response has vendor_id
Tip: run both gateways side by side for a week using metadata tags, then compare cost and latency per feature in the ZephAI console.

From direct vendor APIs

This is the migration with the biggest payoff: N SDKs, N keys, N invoices and N incident channels become one of each.

  1. 1

    Inventory your calls

    List every model you call today, its traffic share and any provider-specific features you rely on.

  2. 2

    Map to listings

    Find equivalents in the catalog; where none exists, keep the vendor's own key as a bring-your-own credential.

  3. 3

    Shadow traffic

    Mirror production requests to ZephAI with metadata.mode: "shadow" and compare responses.

  4. 4

    Cut over by service

    Percentage rollout with rollback thresholds; retire vendor SDKs as each service lands.

Compatibility gaps

Things that are deliberately different — plus the rare ones that need code.

FeatureSupportNotes
logprobsPartialTop-5 only, chat models
Assistants API (threads)Not yetUse /responses with store:false
Fine-tuningBetaLoRA on selected listings
Predicted outputsNot yetQ1 2027
Realtime / WebSocketBetaSSTT + TTS preview
Prompt cachingYesAutomatic, savings passed through
Structured outputsYesJSON schema enforced at gateway

v1 → v2 (breaking)

Gateway v2 shipped September 22, 2026. If you're still on v1, three things changed:

  • One endpoint for all listings. /v1/providers/{vendor}/… collapsed into /v1/… with model selecting the listing.
  • Failover became explicit. Automatic silent retries are replaced by the fallbacks array — you control the budget.
  • Usage API moved. /v1/usage_reports → /v1/usage, removed December 30, 2026.
v1 → v2 diff
# v1
curl https://api.zephai.dev/v1/providers/novalabs/chat/completions \
  -H "Authorization: Bearer $KEY" -d '{"model":"mix-70b", …}'

# v2
curl https://api.zephai.dev/v1/chat/completions \
  -H "Authorization: Bearer $KEY" \
  -d '{"model":"novalab-mix-70b","fallbacks":["zeph-small-2"], …}'
Full release notes

Cutover checklist