Skip to main content
OpenAI’s GPT-5 family is the current generation. gpt-5.4-mini is the default recommendation for most voice agents — it has low time-to-first-token and strong instruction following at a fraction of the cost of the full model.

Quick config

"llm_agent": {
  "agent_type": "simple_llm_agent",
  "agent_flow_type": "streaming",
  "llm_config": {
    "provider": "openai",
    "model": "gpt-5.4-mini",
    "max_tokens": 150,
    "temperature": 0.2
  }
}
To use your own OpenAI API key, connect it at platform.bolna.ai/auth/openai.

Supported models

ModelContextBest forNotes
gpt-5.51M tokensMost demanding reasoning and qualityFlagship; highest cost
gpt-5.41M tokensGeneral-purpose production agentsStrong reasoning, lower cost than 5.5
gpt-5.4-mini400K tokensMost voice agentsRecommended — fastest TTFT, lowest cost
gpt-4.11M tokensPrevious-gen; still availableUse if already deployed
gpt-4.1-mini1M tokensPrevious-gen; still availableUse if already deployed
gpt-4o128K tokensPrevious-gen; still availableUse if already deployed
Recommendation: Start with gpt-5.4-mini. Upgrade to gpt-5.4 or gpt-5.5 when you need complex multi-step reasoning or higher output quality (financial, medical, nuanced escalation).

Key settings

SettingTypeRecommendedDescription
providerstring"openai"Provider name
modelstring"gpt-4.1-mini"Model to use
max_tokensinteger150Cap on response length — keep short for voice
temperaturefloat0.2Lower = more deterministic; good for scripts
agent_flow_typestring"streaming"Always "streaming" for voice

Keep max_tokens short

Voice responses should be 1–3 sentences. max_tokens: 150 (about 100–120 spoken words) is appropriate for most turns. A higher cap doesn’t hurt quality but increases tail latency on long responses.

Writing prompts for voice

Prompts for voice agents differ from chat prompts:
  • Use imperative sentences: “Keep all responses under 3 sentences.”
  • Specify spoken format: “Never use bullet points or markdown — speak in complete sentences.”
  • Define handling for off-topic questions: “If asked something outside your scope, say: ‘I can only help with appointment scheduling today.’”
  • Include the welcome message in the prompt or agent config, not as part of the system prompt instructions.
See Prompting Guide for full guidance.

Function calling

GPT-4.1 and gpt-4.1-mini both support function calling. In Bolna, functions are defined in the Tools Tab and called automatically by the LLM during conversation. See Custom Function Calls for configuration.

FAQ

Use gpt-5.4-mini for most agents. Its time-to-first-token is lowest and cost per call is significantly less. Upgrade to gpt-5.4 when you need stronger reasoning or higher accuracy. Use gpt-5.5 for the most demanding tasks (complex financial/medical, long multi-step tool chains) where quality is the top priority.
Lower max_tokens, use gpt-4.1-mini instead of larger models, and write shorter system prompts (large prompts increase prefill time). See Latency for a full breakdown.
Yes. Connect your OpenAI account at platform.bolna.ai/auth/openai. Costs will be charged to your OpenAI account, not Bolna’s platform wallet (for the LLM component).