Overview

Choose the right LLM for your AI agent

What is LLM in D-ID Agents

The Large Language Model (LLM) is the brain of your AI agent. It processes user inputs, generates responses, and determines how your agent behaves during conversations. D-ID provides flexible options to power your agents with different LLM configurations based on your needs.

LLM Options

Built-in Models

Pre-configured and optimized models. Simply choose a model and start building

External API keys

Bring your own API key to use your model using supported provider

Custom LLM

Advanced use case - connect your own hosted model or a provider we don't support using competibale API

Available Built-in Models

D-ID provides several OpenAI models optimized for different scenarios:

ModelDescriptionBest For
gpt-4o-globalLatest GPT-4o with global deploymentProduction applications requiring latest capabilities
gpt-4o-miniCompact GPT-4o variantCost-effective applications with good performance
gpt-4.1GPT-4.1 full modelAdvanced reasoning and complex tasks
gpt-4.1-miniSmaller GPT-4.1 variantBalanced performance and cost
gpt-4.1-nanoUltra-compact GPT-4.1Ultra-low latency, simple interactions

How It Works

When you create an agent, you specify the LLM configuration in the agent payload. D-ID handles the conversation flow, manages message history, and routes requests to your chosen LLM provider. The LLM generates responses that are then converted to speech and animated on your digital avatar.

  1. Built-in Models: D-ID manages everything - simply select a model and configure instructions.
  2. External API Keys: You provide your API keys through the Studio web app (API support coming soon), and D-ID routes requests to your OpenAI or Azure OpenAI subscription.
  3. Custom LLMs: You implement an OpenAI-compatible endpoint, and D-ID sends conversation history to your infrastructure for processing.

Use Cases

  1. Built-in models are ideal for getting started quickly, prototyping, or production applications where you want D-ID to handle infrastructure.
  2. External API keys are perfect for enterprises with existing OpenAI/Azure OpenAI contracts, specific compliance requirements, or cost optimization strategies.
  3. Custom LLMs enable advanced scenarios like proprietary models, specialized fine-tuning, industry-specific knowledge bases, or complete control over data processing and model selection.

Getting Started

Ready to create your agent? Follow the Agent Quickstart to create an agent with built-in LLM models in 3 minutes.

For advanced use cases with custom LLM integration, see the Custom LLM Quickstart and the detailed Custom LLMs guide.

FAQ

Yes, you can update your agent's LLM configuration at any time using the PATCH endpoint. Ongoing sessions will continue with the previous configuration, but new sessions will use the updated LLM.

External OpenAI and Azure OpenAI keys are currently configured through the D-ID Studio web application. API support for managing external keys is coming soon. Your keys are securely encrypted and stored by D-ID.

External OpenAI means you're using OpenAI's hosted models with your own API key - D-ID routes requests to OpenAI on your behalf. Custom LLM means you're hosting and managing your own LLM infrastructure, and D-ID sends requests to your endpoint. Use custom LLM when you need proprietary models or have specific infrastructure requirements.

While streaming is optional, it's strongly recommended for production as it creates a natural conversation flow. Non-streaming mode is useful for debugging but should not be used in production.



What’s Next