Writes a prompt, welcome message and name from your description, then creates a Retell LLM with that prompt and an end_call tool, and a new agent that uses it. This is the dashboard's generate-from-prompt option. Beyond Retell
With an OpenAI key, gpt-4.1 writes the draft. Without one, a template draft is built from keywords in the description (booking, sales, support). Needs keys
Request#
Body#
| Field | Type | Required | Description |
|---|---|---|---|
description |
string | Yes | What the agent should do. 10 to 4000 characters. |
voice_id |
string | No | Voice for the new agent. Default: the agent default. |
Example request#
curl -X POST "https://api.tried.com.au/generate-agent" \
-H "Authorization: Bearer $TRIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "A receptionist for Bright Dental in Sydney that books and reschedules appointments."
}'const res = await fetch("https://api.tried.com.au/generate-agent", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.TRIED_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"description": "A receptionist for Bright Dental in Sydney that books and reschedules appointments."
}),
});
const data = await res.json();import os, requests
res = requests.post(
"https://api.tried.com.au/generate-agent",
headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
json={
"description": "A receptionist for Bright Dental in Sydney that books and reschedules appointments.",
},
)
data = res.json()Response#
201 Created with the new agent (version 0).
Errors#
| Status | When |
|---|---|
400 |
Validation failed. |
401 |
Missing or invalid API key. |
403 |
The key's IP allowlist or scopes reject the request. This route needs the agents scope. |
429 |
Rate limit exceeded. See Rate limits. |
See Errors for the body format.