Inworld Realtime
InworldRealtime selects Inworld’s Realtime API (wss://api.inworld.ai/v1/realtime) as an end-to-end speech-to-speech engine. Pass it as the engine on phone.agent(...) and Patter wires the audio stream straight through — no separate STT or TTS.
Inworld’s Realtime API is OpenAI-Realtime-compatible: Inworld documents an “OpenAI Realtime migration” path where the event schema, the session structure, and the client/server events match OpenAI’s Realtime API, so migrating is a matter of swapping the endpoint and the credentials. Under the hood InworldRealtime reuses Patter’s v1 realtime adapter and overrides only the endpoint and the defaults, so every feature gate in the call handler — barge-in, truncate, tool calling, first message, reassurance — fires for Inworld with no per-provider branches.
Beta. The engine is validated against the OpenAI-compatible Realtime session
shape; it has not yet been exercised against a live phone call. Confirm the exact
model id and audio formats your Inworld account accepts before going to
production.
Install
INWORLD_API_KEY in your environment (or pass api_key). This is the Inworld Realtime key, sent as Authorization: Bearer <key>.
Constructor
Usage
Pass the engine as theengine on phone.agent(...):
Session options
All optional with safe defaults; unset knobs are omitted from the wire so Inworld applies its own server defaults.Tool calling
Function tools declared onphone.agent(tools=[...]) work exactly as they do on OpenAI Realtime — Patter’s tool bridge forwards the model’s response.function_call_arguments.done events and returns your results as conversation.item.create + response.create. The built-in transfer_call and end_call tools are auto-injected into every agent, so an Inworld agent can hand off or hang up out of the box.
Telephony audio
The engine negotiatesg711_ulaw @ 8 kHz in both directions, which is the native Twilio / Telnyx / Plivo wire format, so carrier audio is forwarded pass-through with no resample chain. If your Inworld deployment only accepts PCM, construct the adapter with audio_format="pcm16".
Not wired into prewarm
Unlike the OpenAI engines, Inworld sessions are not parked during the ringing window:warmup() is a no-op and open_parked_connection() raises, so a call always takes the cold connect() path. Expect the first audible word roughly 300 ms later than an equivalent prewarmed OpenAI Realtime call.
When to use Inworld Realtime vs alternatives
Rates
Inworld publishes no separate Realtime rate on inworld.ai/pricing (checked 2026-08-24), so the adapter meters against the sameinworld pricing key as Inworld TTS — the On-Demand character rate. Override it per project with Patter(pricing={"inworld": {"price": ...}}) once your account’s Realtime rate is known. See Metrics for the full rate table.
Notes
- Beta — spec-validated, not yet live-call-validated. Pin the exact model id from your Inworld dashboard in production.
- The default
inworld-realtimemodel id is a placeholder for the OpenAI-compatible endpoint; Inworld does not publish a canonical Realtime model id. - Input transcription defaults to the OpenAI-compatible
whisper-1field value. If your Inworld deployment rejects it, pass a differentinput_audio_transcription_modelto the adapter.
What’s Next
Engines
All engines side by side.
Inworld TTS
The pipeline-mode Inworld voice.
Agents
System prompts, tools, first messages.
Tools
Function calling inside a realtime session.

