Skip to main content

orter

Typer-based CLI tool that uses OpenRouter API.

Installation

uvx orter

Usage

Environment Variable Setup

You can set the OPENROUTER_API_KEY environment variable, or use the --api-key option with each command.

Models

List available models.

# Default output: human-readable table + default limit(20)
uv run orter models
uv run orter models list --limit 20

# Search
uv run orter models --search gpt-4o --limit 20

# Output in JSON format
uv run orter models --json

# Get specific model information
uv run orter models get openai/gpt-4o-mini

Chat Completions

Send chat completion requests.

# Basic usage (recommended)
uv run orter chat completions -m "Hello"

# Specify model
uv run orter chat completions -m "Print Hello World in Python" --model "openai/gpt-4o"

# Enable streaming
uv run orter chat completions -m "Write a simple story" --stream

# Include system message
uv run orter chat completions -m "User message" --system "You are a helpful AI assistant."

# Output in JSON format
uv run orter chat completions -m "Hello" --json

# Using additional parameters
uv run orter chat completions -m "Write a creative story" \
  --temperature 0.9 \
  --max-tokens 500 \
  --model "openai/gpt-4o-mini"

Generation

Query generation statistics.

# Get generation statistics (using id from chat completions response)
uv run orter generation get gen-xxxxxxxxxxxxxx

# Output in JSON format
uv run orter generation get gen-xxxxxxxxxxxxxx --json

Raw (full API access)

uv run orter raw request GET api/v1/models
uv run orter raw request POST api/v1/chat/completions \
  --body '{"model":"openai/gpt-4o-mini","messages":[{"role":"user","content":"hi"}]}'

Key Features

  • Chat Completions API support
  • Streaming support
  • Models API support
  • Generation statistics lookup
  • Call any endpoint with raw (full API access)
  • JSON output option
  • Type safety guarantee

Examples

Simple Question

uv run orter chat completions -m "What are the advantages of Python?"

Code Generation

uv run orter chat completions -m "Create a simple calculator function in Python" \
  --model "openai/gpt-4o-mini" \
  --temperature 0.7

Streaming Response

uv run orter chat completions -m "Write a long story" --stream

License

MIT

Documentation References

Metadata

Release files for orter 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for orter 0.1.0
File Size Uploaded
orter-0.1.0.tar.gz 23.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for orter 0.1.0
File Interpreter ABI Platform
orter-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 56.1 kB

Release files / orter-0.1.0.tar.gz

Download URL orter-0.1.0.tar.gz
Size 23.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8bcf331527f972e84968e84d1eb52f73a25dc89d58e3eeae9fde84a1b5f4844f
BLAKE2b-256 checksum
How to use checksums
1eb048cfe792630fbc6dd23cbd3bea3f8c8cd316805c800c3dae00b89ca4f3ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.5

Release files / orter-0.1.0-py3-none-any.whl

Download URL orter-0.1.0-py3-none-any.whl
Size 32.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
626d580a4dc0ceba86ae467253ea003852624448f52452b4484409988db9faf5
BLAKE2b-256 checksum
How to use checksums
ef1280b6d8817123112ef9121d570c5902d243cb3e0ab72a66caf43303e77b6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.5

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page