OpenAI API compatibility

Use OpenAI-compatible LLM APIs in VoxEngine voice AI pipelines.

View as Markdown

In addition to its many native Voice AI clients, Voximplant supports many additional OpenAI-compatible LLM models and deployment options through its Bring your own LLM interface.

Use the Bring your own LLM capability when:

  • You need a specific model not offered via Voximplant’s existing Voice AI clients - dozens of models are provided across several vendors with a growing list.
  • You need hosting of supported models on specific cloud endpoints for data sovereignty, compliance, or cost savings - control how and where models are deployed.
  • You plan to switch between supported providers and want to keep a consistent interface - avoid building custom interfaces for each provider.
  • Easy addition of text-based LLM support - use text-based LLMs to supplement functionality.

The Bring your own LLM capability does have some limitations. Note these caveats:

  • Realtime API support is limited to only a few LLM providers
  • Most model support is via text-based LLMs that require implementing a cascaded pipeline for Voice AI support.
  • While the core API interface is the same, event usage, parameters, and payloads may vary by provider.

We recommend using one of Voximplant’s direct speech-to-speech Voice AI clients when they are available. The existing Voice AI connectors usually provide a simpler implementation when the provider’s built-in voice, language, and agent behavior meet your requirements.

Voximplant’s HTTP requests API, webhooks interface, and WebSocket module can be used to interface with unsupported LLM platforms.

Supported API options

Bring your own LLM is supported across all of OpenAI’s LLM API options.

API optionBest forVoxEngine client
Chat CompletionsExisting chat bot logic, simple streaming text generation, manual conversation historyOpenAI.createChatCompletionsAPIClient()
Responses APINewer agentic workflows, tool use, structured items, longer-running voice flowsOpenAI.createResponsesAPIClient()
Realtime APIDirect speech-to-speech sessions where the model handles audio input and audio outputOpenAI.createRealtimeAPIClient()

Third-party OpenAI compatibility varies considerably by vendor. Always check the provider’s supported endpoints, events, models, and streaming behavior.

Using OpenAI-compatible interfaces

For Chat Completions and Responses, the main integration requirement is specifying the provider’s OpenAI-compatible API root as baseUrl and providing an API key from that provider. OpenAI.createChatCompletionsAPIClient(), OpenAI.createResponsesAPIClient(), and OpenAI.createRealtimeAPIClient() all accept apiKey and optional baseUrl parameters.

You can securely store provider keys in Voximplant Secrets and retrieve them in VoxEngine with VoxEngine.getSecretValue().

Reference examples

API optionScenarioExample Description
Chat CompletionsChat Completions with Together AITogether AI through https://api.together.ai/v1
Responses APIResponses: Deepgram-Groq-InworldDeepgram STT, Groq Responses API, and Inworld TTS
Realtime APIRealtime: Azure OpenAIAzure OpenAI Realtime deployment

Provider options

Provider support changes quickly. Treat this table as implementation guidance, then verify the provider’s current API docs before production use.

ProviderCompletionsResponses APIRealtimeExample base URL
xAI / GrokYesYesOpenAI Realtime-compatiblehttps://api.x.ai/v1
GroqYesYes, betaNot documentedhttps://api.groq.com/openai/v1
FireworksYesYesNot documentedhttps://api.fireworks.ai/inference/v1
SambaNovaYesYesNot documentedhttps://api.sambanova.ai/v1
Google GeminiYesNot documentedNative Live APIhttps://generativelanguage.googleapis.com/v1beta/openai/
Anthropic ClaudeLimitedNot documentedNo audio supporthttps://api.anthropic.com/v1/
Together AIYesNot documentedSpeech APIs onlyhttps://api.together.ai/v1
DeepSeekYesNot documentedNot documentedhttps://api.deepseek.com
MistralYesNot documentedNot documentedhttps://api.mistral.ai/v1
CerebrasLimitedNot documentedNot documentedhttps://api.cerebras.ai/v1
Kimi / MoonshotYesNot documentedNot documentedhttps://api.moonshot.ai/v1
Qwen / Alibaba Cloud Model StudioYesYesQwen-Omni-RealtimeRegion-specific compatible-mode URLs
Azure OpenAI / Microsoft Foundry v1YesYesGPT Realtimehttps://<resource>.openai.azure.com/openai/v1/

Provider examples can change. Confirm the current base URL, supported models, request fields, streaming behavior, and tool support in the provider’s documentation before production use.

Some third-party voice providers advertise OpenAI compatibility, but may use different event names, unsupported events, or different audio behavior. When Voximplant has a dedicated connector for a realtime provider, prefer that connector for production.

Choosing Chat Completions vs Responses vs Realtime

RequirementRecommended option
Use the broadest set of OpenAI-compatible LLM providersChat Completions
Reuse an existing text chatbot prompt and message historyChat Completions
Use newer OpenAI-style agent workflowsResponses API
Use built-in tools, structured response items, or response IDsResponses API, if the provider supports those features
Build a direct OpenAI speech-to-speech voice agentRealtime API
Use a third-party realtime speech providerUse the dedicated Voximplant connector when available
Mix independent STT, LLM, and TTS providersChat Completions or Responses inside a full cascade

Compatibility checklist

Before using a third-party provider in production, verify:

  • The correct baseUrl.
  • The provider supports the API shape you are using: Chat Completions, Responses, or Realtime.
  • The selected model supports streaming.
  • The selected model supports your message format, role names, tools, and structured output settings.
  • Whether the provider supports stored context, previous_response_id, or requires you to resend conversation history.
  • The provider’s timeout, rate limit, and maximum context behavior.
  • The provider’s data retention, logging, and compliance terms.
  • Audio behavior if using a realtime speech API.