TrueFoundry's AI Gateway is the control layer enterprise teams use to govern model traffic across LLMs, embeddings, and now voice. Resemble AI integrates as a first-class TTS provider through TrueFoundry's native SDK pass-through — preserving Resemble's full API surface while adding centralized authentication, per-team access control, unified cost tracking, and request tracing.
Teams already routing LLM and embedding traffic through TrueFoundry can add Resemble's /synthesize and /stream endpoints to the same gateway path with no client code changes beyond a base URL swap. Every Resemble request flows through TrueFoundry's proxy with identity verification, rate limiting, and full trace capture, making voice generation as observable and governable as the rest of the AI stack.
Resemble's full API surface — voice UUIDs, Chatterbox Turbo, HD synthesis, audio timestamps — routes through TrueFoundry unchanged. No OpenAI-format mapping required.
Authenticate with a single TrueFoundry API key. Resemble credentials are stored server-side and never exposed to clients. Per-team and per-user access scopes apply to voice traffic just like LLM traffic.
Capture TTS usage — character counts, synthesis duration, model — against each team and user. Feed voice spend into the same dashboards and budget controls already covering chat completions and embeddings.
Every Resemble call emits a trace span with provider, model, input size, response duration, and synthesis time. Traces export via OTEL to Arize, Langfuse, LangSmith, or any configured backend.
Map a virtual model ID to Resemble and one or more fallback TTS providers. Priority-based routing fails over on errors or timeouts without client code changes — keeping voice agents resilient in production.
TrueFoundry's gateway adds approximately 3ms of latency and handles 350+ RPS on 1 vCPU. Stateless pods scale horizontally to handle enterprise voice traffic at any volume.
Add Resemble as a Custom Endpoint in the TrueFoundry AI Gateway dashboard. Point your existing Resemble client at the gateway's /proxy-api route and authenticate with your TrueFoundry API key — your Resemble token is handled server-side.
<pre>import base64
import os
import requests
GATEWAY_BASE_URL = "{GATEWAY_BASE_URL}"
TFY_API_KEY = os.environ.get("TFY_API_KEY", "your-tfy-api-key")
URL = f"{GATEWAY_BASE_URL}/proxy-api/{providerAccountName}/{endpointName}/"
HEADERS = {
"Authorization": f"Bearer {TFY_API_KEY}",
"Content-Type": "application/json",
"Accept-Encoding": "identity",
}
BODY = {
"voice_uuid": "55592656",
"data": "Hello from Resemble via TrueFoundry.",
}
response = requests.post(URL, headers=HEADERS, json=BODY, timeout=120)
response.raise_for_status()
audio_b64 = response.json()["audio_content"]
with open("output_audio.wav", "wb") as f:
f.write(base64.b64decode(audio_b64))
</pre>