telnyx-ai-assistants-c…
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
Access Telnyx LLM inference APIs, embeddings, and AI analytics for call insights and summaries. This skill provides Java SDK examples.
Claude Code
$ npx -y skills add team-telnyx/ai --skill telnyx-ai-inference-java --agent claude-code
Codex
$ npx skills add team-telnyx/ai --skill telnyx-ai-inference-java -a codex -y
Cursor
$ npx skills add team-telnyx/ai --skill telnyx-ai-inference-java -a cursor -y
Gemini CLI
$ npx skills add team-telnyx/ai --skill telnyx-ai-inference-java -a gemini-cli -y
GitHub Copilot
$ npx skills add team-telnyx/ai --skill telnyx-ai-inference-java -a github-copilot -y
OpenCode
$ npx skills add team-telnyx/ai --skill telnyx-ai-inference-java -a opencode -y
Windsurf
$ npx skills add team-telnyx/ai --skill telnyx-ai-inference-java -a windsurf -y
name: telnyx-ai-inference-java description: >- Access Telnyx LLM inference APIs, embeddings, and AI analytics for call insights and summaries. This skill provides Java SDK examples. metadata: author: telnyx product: ai-inference language: java generated_by: telnyx-openapi-pipeline
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
<!-- Maven -->
<dependency>
<groupId>com.telnyx.sdk</groupId>
<artifactId>telnyx</artifactId>
<version>6.95.0</version>
</dependency>
// Gradle
implementation("com.telnyx.sdk:telnyx:6.95.0")import com.telnyx.sdk.client.TelnyxClient; import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient; // fromEnv() reads TELNYX_API_KEY and TELNYX_PUBLIC_KEY (the public key is required for // client.webhooks().unwrap() — webhook verification) TelnyxClient client = TelnyxOkHttpClient.fromEnv();
All examples below assume `client` is already initialized as shown above.
All API calls can fail with network errors, rate limits (429), validation errors (422), or authentication errors (401). Always handle errors in production code:
import com.telnyx.sdk.errors.TelnyxServiceException;
try {
var result = client.messages().send(params);
} catch (TelnyxServiceException e) {
System.err.println("API error " + e.statusCode() + ": " + e.getMessage());
if (e.statusCode() == 422) {
System.err.println("Validation error — check required fields and formats");
} else if (e.statusCode() == 429) {
// Rate limited — wait, then retry the request (bounded exponential backoff)
Thread.sleep(1000);
// ...retry the call here (give up after a few attempts)
}
throw e; // Re-throw: a failed request must never look like success to the caller
}Common error codes: `401` invalid API key, `403` insufficient permissions, `404` resource not found, `422` validation error (check field formats), `429` rate limited (retry with exponential backoff).
Transcribe speech to text. This endpoint is consistent with the [OpenAI Transcription API](https://platform.openai.com/docs/api-reference/audio/createTranscription) and may be used with the OpenAI JS or Python SDK.
`POST /ai/audio/transcriptions`
import com.telnyx.sdk.models.ai.audio.AudioTranscribeParams;
import com.telnyx.sdk.models.ai.audio.AudioTranscribeResponse;
AudioTranscribeParams params = AudioTranscribeParams.builder()
.model(AudioTranscribeParams.Model.DISTIL_WHISPER_DISTIL_LARGE_V2)
.build();
AudioTranscribeResponse response = client.ai().audio().transcribe(params);Returns: `duration` (number), `segments` (array[object]), `text` (string), `words` (array[object])
Retrieve a list of all AI conversations configured by the user. Supports [PostgREST-style query parameters](https://postgrest.org/en/stable/api.html#horizontal-filtering-rows) for filtering. Examples are included for the standard metadata fields, but you can filter on any field in the metadata JSON object.
`GET /ai/conversations`
import com.telnyx.sdk.models.ai.conversations.ConversationListParams; import com.telnyx.sdk.models.ai.conversations.ConversationListResponse; ConversationListResponse conversations = client.ai().conversations().list();
Returns: `created_at` (date-time), `id` (uuid), `last_message_at` (date-time), `metadata` (object), `name` (string)
Creates a new AI conversation, the container for messages exchanged with an assistant, and returns the created conversation.
`POST /ai/conversations`
Optional: `metadata` (object), `name` (string)
import com.telnyx.sdk.models.ai.conversations.Conversation; import com.telnyx.sdk.models.ai.conversations.ConversationCreateParams; Conversation conversation = client.ai().conversations().create();
Returns: `created_at` (date-time), `id` (uuid), `last_message_at` (date-time), `metadata` (object), `name` (string)
Aggregate conversation insights by specified fields
`GET /ai/conversations/conversation-insights/aggregates`
var response = client.ai().conversations().conversationInsights().retrieveAggregates();
Returns: `record_count` (integer)
Returns a paginated list of your insight template groups. Groups organize related insight templates that are applied together when analyzing conversations.
`GET /ai/conversations/insight-groups`
import com.telnyx.sdk.models.ai.conversations.insightgroups.InsightGroupRetrieveInsightGroupsPage; import com.telnyx.sdk.models.ai.conversations.insightgroups.InsightGroupRetrieveInsightGroupsParams; InsightGroupRetrieveInsightGroupsPage page = client.ai().conversations().insightGroups().retrieveInsightGroups();
Returns: `created_at` (date-time), `description` (string), `id` (uuid), `insights` (array[object]), `name` (string), `webhook` (string)
Creates a new insight template group for organizing related insight templates, and returns the created group.
`POST /ai/conversations/insight-groups` — Required: `name`
Optional: `description` (string), `webhook` (string)
import com.telnyx.sdk.models.ai.conversations.insightgroups.InsightGroupInsightGroupsParams;
import com.telnyx.sdk.models.ai.conversations.insightgroups.InsightTemplateGroupDetail;
InsightGroupInsightGroupsParams params = InsightGroupInsightGroupsParams.builder()
.name("my-resource")
.build();
InsightTemplateGroupDetail insightTemplateGroupDetail = client.ai().conversations().insightGroups().insightGroups(params);Returns: `created_at` (date-time)
This repo is the one-stop shop for AI Agents and AI-first developers building with Telnyx — everything an agent needs to build production-grade applications and manage its account, from signup to funding.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.