Router9 provides AI-powered tools via a bundled CLI (scripts/router9.py).
Set the ROUTER9_API_KEY environment variable before use.
# Transcribe audio to text
python scripts/router9.py transcribe audio.mp3 --language en
# Text-to-speech
python scripts/router9.py tts "Hello world" -o speech.mp3 --voice alloy
# Describe an image
python scripts/router9.py describe photo.jpg --prompt "What breed is this dog?"
# Extract text from an image (OCR)
python scripts/router9.py ocr document.jpg
# Generate an image
python scripts/router9.py generate "A sunset over mountains" -o output.png
# Upload a file
python scripts/router9.py upload report.pdf
# Download a file
python scripts/router9.py download file-abc123 -o report.pdf
# List files in storage
python scripts/router9.py list
# Delete a file
python scripts/router9.py delete file-abc123
# Check storage usage
python scripts/router9.py usage
Transcribe audio files to text. Use when the user needs to transcribe audio or
video files.
python scripts/router9.py transcribe ]
file: Audio file path (mp3, wav, m4a, webm, mp4)--language: ISO 639-1 language code (e.g. "en", "ja", "zh")Output (JSON to stdout):
{ "text": "Transcribed content here...", "language": "en", "duration": 12.5 }
Convert text to spoken audio. Use when the user needs to generate speech or
audio from text.
python scripts/router9.py tts
text: Text to synthesize (max 4096 characters)-o: Output file path (required)--voice: Voice ID (default: "alloy")--format: "mp3" (default), "wav", "opus"Output: Writes audio file to -o path.
Describe image content in natural language. Use when the user needs to analyze,
describe, or understand what is in an image.
python scripts/router9.py describe
file: Image file path (jpg, png, webp, gif)--prompt: Specific question about the imageOutput (JSON to stdout):
{ "description": "A golden retriever sitting on a park bench..." }
Extract text from images — printed, handwritten, signs, and labels. Use when the
user needs to read text from an image or document scan.
python scripts/router9.py ocr
file: Image file path (jpg, png, webp, gif)Output (JSON to stdout):
{ "fullText": "Invoice #1234\nTotal: $150.00", "blocks": [...] }
Generate images from text prompts. Use when the user asks to create, generate,
or draw images.
python scripts/router9.py generate
prompt: Text description of the image to generate-o: Output file path (required)Output: Saves generated image to -o path.
Upload a local file to agent storage using presigned URLs (direct-to-S3).
python scripts/router9.py upload
file: Local file path to upload (max 50 MB)Output (JSON to stdout):
{ "id": "file-abc123", "filename": "report.pdf", "sizeBytes": 204800 }
Download a file from agent storage by its ID.
python scripts/router9.py download
file_id: The file ID returned from upload or list-o: Output file path (default: original filename)Output (JSON to stdout):
{ "status": "ok", "file": "report.pdf" }
List files in agent storage.
python scripts/router9.py list [--page
--page: Page number (default: 1)--limit: Items per page (default: 50)Output (JSON to stdout):
{ "data": [{ "id": "file-abc123", "filename": "report.pdf", ... }], "pagination": { ... } }
Delete a file from agent storage.
python scripts/router9.py delete
file_id: The file ID to deleteOutput (JSON to stdout):
{ "status": "ok", "message": "File deleted." }
Check storage usage and quota.
python scripts/router9.py usage
Output (JSON to stdout):
{ "usedBytes": 1073741824, "limitBytes": 5368709120, "usedFormatted": "1.0 GB", "limitFormatted": "5.0 GB" }
Usage is metered per billing period. Each tool has its own quota.
Check remaining quota in the Router9 dashboard at /settings/skills.
共 1 个版本