mathusan
02/24/2026, 11:12 PMVapi Support Bot
02/24/2026, 11:13 PMpython
# After calling OpenAI's Responses API:
openai_response = ... # your OpenAI Responses API call
formatted_response = {
"output": [
{
"role": "assistant",
"content": [{"type": "output_text", "text": openai_response['output'][0]['content'][0]['text']}],
"status": "completed",
"type": "message"
}
]
}
return jsonify(formatted_response)
Format your backend's response as above to ensure Vapi compatibility.
For more details, see the [Vapi Custom LLM integration guide](https://docs.vapi.ai/customization/custom-llm/using-your-server).
Source:
- [Using Your Server (Vapi Custom LLM)](https://docs.vapi.ai/customization/custom-llm/using-your-server)Zayan @ UNITZERO
02/24/2026, 11:34 PMChiranjeet Mishra
03/04/2026, 12:10 PMresponses.create(), you’ll need a thin compatibility layer in your backend that:
1. Calls the Responses API
2. Extracts the final assistant text
3. Returns a Chat Completions–formatted response back to Vapi
For non-streaming, your backend must return a payload shaped like:
• object: "chat.completion"
• choices[0].message.role = "assistant"
• choices[0].message.content = "<final text>"
For streaming, you must emit SSE chunks formatted as:
• object: "chat.completion.chunk"
• Tokens inside choices[0].delta.content
If you return the raw Responses API structure, Vapi will not parse it correctly.
If you want zero-risk and no additional glue code, continuing with Chat Completions is the simplest path. If you’d like the benefits of the Responses API, implementing a small translation layer will ensure compatibility.