https://retellai.com/?utm_source=discord&utm_medium=seo logo
I need to add Retell_llm_id to my platform
# ❓・ai-evy-support
m
@AI Evy I need to add Retell_llm_id to my platform. But suddenly it can not find the ID, without any changes made anywhere. Do i need to create the Retell_llm_id in Docs, or just take the llm_id from the agents?
a
Thanks for tagging me @Mrplutus007. I'll look through relevant sources and get back to you shortly.
### Answer You have two options: Option 1: Create a new Retell LLM You can create a new Retell LLM Response Engine using the API, which will return a unique `llm_id`: [(1) ]()
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const llmResponse = await client.llm.create() ;
console.log(llmResponse.llm_id) ;
Option 2: Retrieve existing LLM IDs If you already have Retell LLMs created, you can list them to get the `llm_id`: [(2) ]()
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const llmResponses = await client.llm.list() ;
console.log(llmResponses) ;
Or retrieve a specific one if you know the ID: [(3) ]()
Copy code
javascript
const llmResponse = await client.llm.retrieve('16b980523634a6dc504898cda492e939') ;
console.log(llmResponse.llm_id) ;
Connecting to an Agent When creating a Voice Agent, you attach the
llm_id
via the
response_engine
field with
type: "retell-llm"
and the corresponding
llm_id
. [(4) ]() If the ID suddenly stopped working without changes on your end, double-check that the LLM wasn't deleted or that you're using the correct workspace/API key.
​ To learn more, see the sources I considered: [[1] Create Retell LLM](https://docs.retellai.com/api-references/create-retell-llm) [[2] List Retell LLMs](https://docs.retellai.com/api-references/list-retell-llms) [[3] Get Retell LLM](https://docs.retellai.com/api-references/get-retell-llm) [[4] Create Voice Agent](https://docs.retellai.com/api-references/create-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@User The Llm_id is being used for more then one agent, with creation through a API key
@AI Evy The Llm_id is being used for more then one agent, with creation through a API key
a
Thanks for the follow-up, @Mrplutus007. I'll get back to you soon.
### Answer --- Using the same
llm_id
across multiple agents is supported. When you create a Voice Agent, you reference the LLM via the
response_engine
field: [(1) ]()
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.create({
  response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
  voice_id: '11labs-Adrian',
}) ;
console.log(agentResponse.agent_id) ;
If the
llm_id
suddenly can't be found: 1. Verify the LLM still exists — If deleted (via
client.llm.delete()
) , all agents referencing it would fail to find it. [(2) ]() 2. Check you're using the correct API key — Different API keys may belong to different workspaces, each with their own LLMs. 3. Confirm the
llm_id
string is correct
— Copy it directly from the dashboard or API response to avoid typos. I don't have additional documentation on specific error messages for missing
llm_id
references. If the LLM exists and the API key is correct, consider reaching out via [Contact Sales]() or checking the [Retell GitHub]() for further troubleshooting. Would you like me to provide a general answer on debugging API key or workspace mismatches?
​ To learn more, see the sources I considered: [[1] Create Voice Agent](https://docs.retellai.com/api-references/create-agent) [[2] Delete Retell LLM](https://docs.retellai.com/api-references/delete-retell-llm) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy do i need to choose the llm_id from docs, or take the id that is next to the agent id in the agent section
a
Thanks for the follow-up, @Mrplutus007. I'll get back to you soon.
### Answer --- The
llm_id
and
agent_id
are separate identifiers for different resources. [(1) ]() - **`agent_id`**: Identifies the Voice Agent itself (e.g.,
"oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD"
) - **`llm_id`**: Identifies the Retell LLM Response Engine attached to that agent (e.g.,
"llm_234sdertfsdsfsdf"
) When you create or view an agent, the
llm_id
is found inside the
response_engine
object:
Copy code
json
"response_engine": {
  "type": "retell-llm",
  "llm_id": "llm_234sdertfsdsfsdf",
  "version": 0
}
You can also retrieve all your Retell LLMs directly using: [(2) ]()
Copy code
javascript
const llmResponses = await client.llm.list() ;
console.log(llmResponses) ;
So you need the
llm_id
from within the agent's
response_engine
field (or from the LLM list endpoint) , not the
agent_id
shown next to the agent.
​ To learn more, see the sources I considered: [[1] Create Voice Agent](https://docs.retellai.com/api-references/create-agent) [[2] List Retell LLMs](https://docs.retellai.com/api-references/list-retell-llms) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.