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.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
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.
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.
Requirements
Python 3.8+ — stdlib only, no external dependencies
That's it. No pip install, no setup wizard, no external provider keys.
Text-to-Vector Embedding
Generate embedding vectors for any text input. The API is OpenAI-compatible, so existing integrations work out of the box.
Basic Usage
# 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
./embed.py --file input.txt
| ./embed.py --stdin
./embed.py --json
./embed.py --list-models
# Read from file
# Pipe from stdin
echo
"text to embed"
# JSON output (for scripting)
"text"
# List available models
Available Models
Model
Description
thenlper/gte-large
General text embeddings (default)
intfloat/multilingual-e5-large
Multilingual text embeddings
OpenAI-Compatible Client
The embeddings API is OpenAI-compatible, so you can use the OpenAI Python SDK with base_url pointed at Telnyx:
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 dimensionalityprint(f"{dims}-dimensional vector")
Bucket Search
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
# 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
Output Format
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...
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])
Index Content
Upload files to a Telnyx Storage bucket and trigger embedding so they become searchable.
Upload Files
# 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/
Trigger Embedding
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
Check Embedding Status
./index.py status <task_id>
List Files and Buckets
# 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
Create a Bucket
./index.py create-bucket my-new-bucket
# With a specific region
./index.py create-bucket my-new-bucket --region us-central-1