AI Tools
Improve and translate prompts, generate opportunity and success criteria, run LLM chat completions, and manage personal prompt presets through the Talkturo API.
curl https://api.talkturo.com/api/improve-prompt \
-X POST \
-H "Authorization: Bearer tk_live_example_7xk2m9q4" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Write a better onboarding email for new customers."
}'
{
"text": "Write a welcoming onboarding email for new customers that explains the first three steps they should take."
}
curl https://api.talkturo.com/api/translate-prompt \
-X POST \
-H "Authorization: Bearer tk_live_example_7xk2m9q4" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Schedule a follow-up call with the customer next week.",
"targetLanguage": "German"
}'
{
"text": "Planen Sie für nächste Woche einen Folgeanruf mit dem Kunden."
}
curl https://api.talkturo.com/api/generate-opportunity-prompt \
-X POST \
-H "Authorization: Bearer tk_live_example_7xk2m9q4" \
-H "Content-Type: application/json" \
-d '{
"systemPrompt": "Identify opportunities to improve customer retention during support conversations."
}'
{
"text": "Look for statements that indicate churn risk, unresolved concerns, or opportunities to increase customer value."
}
curl "https://api.talkturo.com/api/generate-success-prompt?accountSlug=acme-sales" \
-X POST \
-H "Authorization: Bearer tk_live_example_7xk2m9q4" \
-H "Content-Type: application/json" \
-d '{
"systemPrompt": "Define what a successful customer onboarding conversation should accomplish."
}'
{
"text": "A successful onboarding conversation confirms the customer's goals, explains the next steps, and identifies any unresolved blockers."
}
curl https://api.talkturo.com/api/llm/chat \
-X POST \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.example" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{
"role": "system",
"content": "You summarize sales conversations for account executives."
},
{
"role": "user",
"content": "Summarize the next steps from the conversation."
}
],
"temperature": 0.2
}'
{
"id": "chatcmpl_example_8f21",
"object": "chat.completion",
"created": 1760380800,
"model": "gpt-4o-mini",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "The next steps are to confirm the implementation timeline, send the integration checklist, and schedule a technical review."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 42,
"completion_tokens": 24,
"total_tokens": 66
}
}
curl https://api.talkturo.com/api/prompt-presets \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.example"
{
"success": true,
"data": {
"presets": [
{
"id": "preset_4f8b2c1d",
"user_id": "user_91a2b3c4",
"uid": "user_91a2b3c4",
"title": "Summarize sales calls",
"prompt": "Summarize the customer's goals, objections, and next steps.",
"is_default": 0,
"is_template": 0,
"created_at": "2026-01-14T10:30:00.000Z",
"updated_at": "2026-01-14T10:30:00.000Z"
}
]
}
}
curl https://api.talkturo.com/api/prompt-presets \
-X POST \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.example" \
-H "Content-Type: application/json" \
-d '{
"title": "Extract renewal risks",
"prompt": "Identify renewal risks, supporting evidence, and recommended follow-up actions."
}'
{
"success": true,
"data": {
"preset": {
"id": "preset_8d7e6f5a",
"user_id": "user_91a2b3c4",
"uid": "user_91a2b3c4",
"title": "Extract renewal risks",
"prompt": "Identify renewal risks, supporting evidence, and recommended follow-up actions.",
"is_default": 0,
"is_template": 0,
"created_at": "2026-01-14T11:00:00.000Z",
"updated_at": "2026-01-14T11:00:00.000Z"
}
}
}
curl https://api.talkturo.com/api/prompt-presets/preset_8d7e6f5a \
-X PUT \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.example" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Identify renewal risks, supporting evidence, recommended follow-up actions, and the customer owner."
}'
{
"success": true,
"data": {
"preset": {
"id": "preset_8d7e6f5a",
"user_id": "user_91a2b3c4",
"uid": "user_91a2b3c4",
"title": "Extract renewal risks",
"prompt": "Identify renewal risks, supporting evidence, recommended follow-up actions, and the customer owner.",
"is_default": 0,
"is_template": 0,
"created_at": "2026-01-14T11:00:00.000Z",
"updated_at": "2026-01-14T11:12:00.000Z"
}
}
}
curl https://api.talkturo.com/api/prompt-presets/preset_8d7e6f5a \
-X DELETE \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.example"
{
"success": true,
"data": {
"changes": 1
}
}
curl https://api.talkturo.com/api/prompt-presets/templates \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.example"
{
"success": true,
"data": {
"templates": []
}
}
AI tools and prompt utilities
Use these endpoints to improve prompts, translate prompt text, generate opportunity and success prompts, call approved language models, and manage personal prompt presets.
The prompt utility endpoints accept a Talkturo API key or a Supabase session token. The chat completion and prompt preset endpoints require a Desktop JWT.
Authentication
Use this authentication mode for prompt improvement, translation, and prompt generation endpoints.
curl https://api.talkturo.com/api/improve-prompt \
-X POST \
-H "Authorization: Bearer tk_live_example_7xk2m9q4" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Help me write a concise follow-up email after a product demo."
}'
Talkturo accepts a Talkturo API key, a Supabase bearer session token, or a cookie-based Supabase session. These endpoints do not require an account identifier unless the authentication wrapper requires one for the selected session context.
Use the Supabase access token issued to the authenticated Talkturo Desktop user.
curl https://api.talkturo.com/api/llm/chat \
-X POST \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.example" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{
"role": "user",
"content": "Summarize the key action items from this conversation."
}
]
}'
Desktop JWT endpoints return 401 when the token is missing, empty, invalid, or expired.
Improve a prompt
POST /api/improve-prompt rewrites a prompt for clarity while keeping the result in the detected input language.
Request
Response
curl https://api.talkturo.com/api/improve-prompt \
-X POST \
-H "Authorization: Bearer tk_live_example_7xk2m9q4" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Write a better onboarding email for new customers."
}'
const response = await fetch("https://api.talkturo.com/api/improve-prompt", {
method: "POST",
headers: {
Authorization: "Bearer tk_live_example_7xk2m9q4",
"Content-Type": "application/json"
},
body: JSON.stringify({
prompt: "Write a better onboarding email for new customers."
})
});
const result = await response.json();
console.log(result.text);
A missing prompt returns 400. Failures while generating the improved prompt return 500.
Translate a prompt
POST /api/translate-prompt translates a prompt into the requested language.
Request
German or a language code such as de.Response
curl https://api.talkturo.com/api/translate-prompt \
-X POST \
-H "Authorization: Bearer tk_live_example_7xk2m9q4" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Schedule a follow-up call with the customer next week.",
"targetLanguage": "German"
}'
const response = await fetch("https://api.talkturo.com/api/translate-prompt", {
method: "POST",
headers: {
Authorization: "Bearer tk_live_example_7xk2m9q4",
"Content-Type": "application/json"
},
body: JSON.stringify({
prompt: "Schedule a follow-up call with the customer next week.",
targetLanguage: "German"
})
});
const result = await response.json();
console.log(result.text);
A missing prompt or target language returns 400. Translation failures return 500.
Generate opportunity prompts
POST /api/generate-opportunity-prompt generates an opportunity prompt from a system prompt.
Request
Response
Generate success prompts
POST /api/generate-success-prompt generates a success definition from a system prompt.
Request
Response
API-key callers authenticate with the key's bound account. Session-token callers may need to provide accountSlug. Cookie-session callers may provide accountSlug or teamId as required by the authentication context.
Run chat completions
POST /api/llm/chat provides an OpenAI-compatible chat completion endpoint for Talkturo Desktop clients. The endpoint requires a Desktop JWT and forwards supported request options to the upstream model provider.
Request
-proxied use the corresponding model name without that suffix upstream.gpt-4.1gpt-4.1-proxiedgpt-4ogpt-4o-proxiedgpt-4o-minigpt-4o-mini-proxiedgpt-4.1-nanogpt-4.1-nano-proxiedgpt-5-nanogpt-5-nano-proxiedgpt-4o-mini-transcribetrue, returns an SSE stream. Defaults to false.Other OpenAI chat-completion options are forwarded unchanged when supported by the upstream provider.
Non-streaming response
chat.completion for non-streaming responses.curl https://api.talkturo.com/api/llm/chat \
-X POST \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.example" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{
"role": "user",
"content": "Summarize the next steps from the conversation."
}
]
}'
const response = await fetch("https://api.talkturo.com/api/llm/chat", {
method: "POST",
headers: {
Authorization: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.example",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "gpt-4o-mini",
messages: [
{
role: "user",
content: "Summarize the next steps from the conversation."
}
]
})
});
const completion = await response.json();
console.log(completion.choices[0].message.content);
Streaming response
Set stream to true to receive an SSE response.
const response = await fetch("https://api.talkturo.com/api/llm/chat", {
method: "POST",
headers: {
Authorization: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.example",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "gpt-4o-mini",
messages: [
{
role: "user",
content: "Summarize the next steps from the conversation."
}
],
stream: true
})
});
if (!response.ok || !response.body) {
throw new Error(`Request failed with status ${response.status}`);
}
for await (const chunk of response.body) {
process.stdout.write(new TextDecoder().decode(chunk));
}
The stream uses text/event-stream and contains upstream events in the following format:
data: { ...chunk... }
data: [DONE]
A disallowed model, invalid JSON, or missing messages returns 400. Missing server configuration returns 500. Upstream connection failures return 502.
Manage prompt presets
Prompt presets are personal, reusable prompts managed through the Desktop API. All preset endpoints require a Desktop JWT.
List presets
GET /api/prompt-presets returns the authenticated user's presets. Results are sorted by default status descending and title ascending.
user_id.1 for a default preset and 0 otherwise.1 for a template and 0 otherwise.Create a preset
POST /api/prompt-presets creates a personal preset.
Update a preset
PUT /api/prompt-presets/{id} updates a personal, non-default preset.
At least one of title or prompt must be truthy. Empty strings cannot clear a field. The endpoint only updates presets owned by the authenticated user where is_default is false.
Delete a preset
DELETE /api/prompt-presets/{id} deletes a personal, non-default preset.
1.List prompt templates
GET /api/prompt-presets/templates returns the available prompt templates.
Default presets and templates cannot be updated or deleted through the personal preset endpoints. Attempts to access a missing, unauthorized, default, or template preset return 404.