Back
Back

TrueFoundry

Connect Resemble AI to TrueFoundry's AI Gateway — manage voice synthesis alongside your LLMs and embeddings from a single control plane with centralized auth, cost tracking, and full observability.

How it works

YOUR APP
TrueFoundry AI Gateway
Client request authenticated and routed via the unified gateway control plane
+
RESEMBLE AI
Voice Synthesis
Resemble TTS called server-side with managed credentials and full request tracing
+
YOUR APP
Cost and observability
Usage captured per team — character count, synthesis time, latency and exported via OTEL
OUTPUT
Governed voice output
Synthesized audio returned to client with enterprise-grade auth, routing, and visibility

Overview

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.

Features

Native TTS pass-through

Resemble's full API surface — voice UUIDs, Chatterbox Turbo, HD synthesis, audio timestamps — routes through TrueFoundry unchanged. No OpenAI-format mapping required.

Centralized auth and access control

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.

Unified cost tracking

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.

Full request tracing

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.

TTS failover with Virtual Models

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.

Production-scale performance

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.

Use cases

  • Route Resemble TTS traffic through TrueFoundry's AI Gateway alongside LLM and embedding workloads
  • Enforce per-team and per-user access controls on voice synthesis in multi-tenant AI platforms
  • Track Resemble voice spend against team budgets in the same dashboard as LLM cost
  • Trace voice agent calls end-to-end — from LLM completion through TTS synthesis to agent action
  • Configure failover from Resemble to a secondary TTS provider for production resilience
  • Migrate existing Resemble integrations to gateway-managed auth with a single base URL change

Quick start

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>

Related integrations

Get complete generative AI security
Book a demo with our team and build it your way.