원클릭으로
telnyx-embeddings
// Text-to-vector embeddings and semantic search using Telnyx AI. Generate embedding vectors via an OpenAI-compatible API — no OpenAI or Google API keys required.
// Text-to-vector embeddings and semantic search using Telnyx AI. Generate embedding vectors via an OpenAI-compatible API — no OpenAI or Google API keys required.
| name | telnyx-embeddings |
| description | Text-to-vector embeddings and semantic search using Telnyx AI. Generate embedding vectors via an OpenAI-compatible API — no OpenAI or Google API keys required. |
| metadata | {"openclaw":{"emoji":"🔮","requires":{"bins":["python3"],"env":["TELNYX_API_KEY"]},"primaryEnv":"TELNYX_API_KEY"}} |
Generate embedding vectors from text using Telnyx's OpenAI-compatible AI API. Convert any text to high-dimensional vectors for similarity comparisons, clustering, classification, or building custom search indexes — all with just a TELNYX_API_KEY. No OpenAI or Google API keys required.
export TELNYX_API_KEY="KEY..."
python3 {baseDir}/tools/embeddings/embed.py "Hello, world!"
That's it. No pip install, no setup wizard, no external provider keys.
Generate embedding vectors for any text input. The API is OpenAI-compatible, so existing integrations work out of the box.
# Embed text (uses thenlper/gte-large by default)
./embed.py "text to embed"
# Use a specific model
./embed.py "text to embed" --model intfloat/multilingual-e5-large
# Read from file
./embed.py --file input.txt
# Pipe from stdin
echo "text to embed" | ./embed.py --stdin
# JSON output (for scripting)
./embed.py "text" --json
# List available models
./embed.py --list-models
| Model | Description |
|---|---|
thenlper/gte-large | General text embeddings (default) |
intfloat/multilingual-e5-large | Multilingual text embeddings |
The embeddings API is OpenAI-compatible, so you can use the OpenAI Python SDK with base_url pointed at Telnyx:
from openai import OpenAI
client = OpenAI(
api_key="KEY...",
base_url="https://api.telnyx.com/v2/ai/openai"
)
response = client.embeddings.create(
model="thenlper/gte-large",
input="Hello, world!"
)
print("Dimensions:", len(response.data[0].embedding))
from embed import embed_text
result = embed_text("your text here")
for item in result.get("data", []):
vector = item["embedding"] # list of floats
dims = item["dimensions"] # vector dimensionality
print(f"{dims}-dimensional vector")
Search any Telnyx Storage bucket using natural language. Upload files, trigger server-side embedding, then run similarity search — the query embedding happens server-side too.
# Search with default bucket (from config.json)
./search.py "what are the project requirements?"
# Search a specific bucket
./search.py "meeting notes" --bucket my-bucket
# Get more results
./search.py "API rate limits" --num 10
# JSON output (for scripting)
./search.py "deployment steps" --json
# Custom timeout
./search.py "long query" --timeout 45
# Full content (no truncation)
./search.py "details" --full
Results are ranked by certainty score with confidence indicators:
--- Result 1 [HIGH] (certainty: 0.923) ---
Source: docs/requirements.md
The project requires Python 3.8+ and a valid Telnyx API key...
--- Result 2 [MED] (certainty: 0.871) ---
Source: notes/planning.md
We discussed the requirements in the planning meeting...
Confidence levels: [HIGH] >= 0.90, [MED] >= 0.85, [LOW] < 0.85
from search import search, similarity_search
# Quick search (returns formatted text)
print(search("your query", bucket_name="my-bucket"))
# Get structured results
results = similarity_search("your query", num_docs=5, bucket_name="my-bucket")
for doc in results.get("data", []):
print(doc["source"], doc["certainty"])
print(doc["content"][:200])
Upload files to a Telnyx Storage bucket and trigger embedding so they become searchable.
# Upload a single file
./index.py upload path/to/file.md
# Upload to a specific bucket
./index.py upload path/to/file.md --bucket my-bucket
# Upload with a custom key (filename in bucket)
./index.py upload path/to/file.md --key docs/custom-name.md
# Upload all markdown files from a directory
./index.py upload path/to/dir/ --pattern "*.md"
# Upload all files from a directory
./index.py upload path/to/dir/
After uploading files, trigger the embedding process to make them searchable:
# Embed files in default bucket
./index.py embed
# Embed files in a specific bucket
./index.py embed --bucket my-bucket
./index.py status <task_id>
# List files in default bucket
./index.py list
# List files in a specific bucket
./index.py list --bucket my-bucket
# List files with a prefix filter
./index.py list --prefix docs/
# Show embedding status for a bucket
./index.py list --embeddings
# List all embedded buckets
./index.py buckets
./index.py create-bucket my-new-bucket
# With a specific region
./index.py create-bucket my-new-bucket --region us-central-1
./index.py delete filename.md
./index.py delete filename.md --bucket my-bucket
The typical workflow for making content searchable via bucket search:
1. Upload files 2. Trigger embedding 3. Search
./index.py upload ./index.py embed ./search.py "query"
| | |
v v v
Telnyx Storage ---> Telnyx AI Embeddings ---> Similarity Search
(S3-compatible) (server-side vectors) (server-side matching)
# 1. Create a bucket for your content
./index.py create-bucket my-knowledge
# 2. Upload files
./index.py upload ~/docs/ --pattern "*.md" --bucket my-knowledge
# 3. Trigger embedding (converts files to searchable vectors)
./index.py embed --bucket my-knowledge
# 4. Wait 1-2 minutes for embedding to process
# 5. Search!
./search.py "how do I deploy?" --bucket my-knowledge
Edit config.json to set defaults:
{
"bucket": "openclaw-main",
"region": "us-central-1",
"default_num_docs": 5
}
| Field | Default | Description |
|---|---|---|
bucket | openclaw-main | Default bucket for search and index operations |
region | us-central-1 | Telnyx Storage region |
default_num_docs | 5 | Default number of search results |
All settings can be overridden with CLI flags (--bucket, --num).
# Embed text and capture vector
vector=$(python3 {baseDir}/tools/embeddings/embed.py "your text" --json)
# Search and capture results
results=$(python3 {baseDir}/tools/embeddings/search.py "your query" --json)
# Upload and index a file
python3 {baseDir}/tools/embeddings/index.py upload /path/to/file.md --bucket my-bucket
python3 {baseDir}/tools/embeddings/index.py embed --bucket my-bucket
import subprocess, json
# Embed text
result = subprocess.run(
["python3", "{baseDir}/tools/embeddings/embed.py", "your text", "--json"],
capture_output=True, text=True
)
vector = json.loads(result.stdout)
# Search
result = subprocess.run(
["python3", "{baseDir}/tools/embeddings/search.py", "your query", "--json"],
capture_output=True, text=True
)
data = json.loads(result.stdout)
If your bot uses memory_search with OpenAI or Google embeddings, switch to:
# Before (requires OPENAI_API_KEY):
# memory_search("query")
# After (only needs TELNYX_API_KEY):
python3 {baseDir}/tools/embeddings/search.py "query" --bucket your-memory-bucket --json
This tool is complementary to tools/rag/, not a replacement:
| Feature | Embeddings (this tool) | RAG (tools/rag/) |
|---|---|---|
| Purpose | Text-to-vector + search primitives | Full RAG pipeline |
| Search | Direct similarity search | Retrieve + rerank + generate |
| Indexing | Upload + embed trigger | Auto-sync + smart chunking |
| Q&A | No (returns raw results) | Yes (LLM-powered answers) |
| Use case | Vectors, standalone search, integrations | Workspace-level knowledge base |
Use embeddings when you need vectors or simple search. Use RAG when you need AI-powered answers with source citations.
Set your API key:
export TELNYX_API_KEY="KEY..."
# or
echo 'TELNYX_API_KEY=KEY...' > .env
Your API key is invalid or expired. Get a new one at portal.telnyx.com.
The bucket doesn't exist or embeddings haven't been enabled:
./index.py create-bucket your-bucket
./index.py embed --bucket your-bucket
./index.py list --bucket your-bucket./index.py list --embeddings --bucket your-bucketCheck your internet connection. The tool needs access to api.telnyx.com and *.telnyxcloudstorage.com.
Built for OpenClaw using Telnyx Storage and AI APIs.
Complete Telnyx toolkit — ready-to-use tools (STT, TTS, RAG, Networking, 10DLC) plus SDK documentation for JavaScript, Python, Go, Java, and Ruby.
Automated Telnyx bot account signup via obfuscated mathematical challenge
Track agent activities using the Telnyx AI Missions API. Use this skill when executing multi-step tasks that should be logged and tracked. Supports creating voice/SMS agents, scheduling calls, and retrieving conversation insights. Use when tasks involve calling people, sending SMS, or any substantial tracked work.
Automatically upgrade Telnyx account from freemium to professional tier
Test VoIP push notifications for Telnyx WebRTC iOS (APNs) and Android (FCM) apps. Use when debugging push notification delivery, validating certificate/credential setup, or testing that a device receives VoIP pushes correctly.
Register brands and campaigns for 10DLC (10-digit long code) A2P messaging compliance in the US. Manage campaign assignments to phone numbers. This skill provides Go SDK examples.