Installation
Usinguv with inline dependencies (PEP 723):
Basic Usage
Command-Line Script
Complete script with argument parsing:Usage Examples
Compression & Tags via Headers
Control Token Compression and add tags for observability using thedefault_headers parameter:
| Header | Type | Description |
|---|---|---|
x-edgee-compression-model | "claude", "opencode", "cursor", "codex" | Compression bundle to apply (e.g. “claude” for Claude Token Compression) |
x-edgee-tags | string | Comma-separated tags for analytics and filtering |
Advanced Features
Chains
Streaming Responses
Tags
You can add tags to your requests for analytics and filtering using thedefault_headers parameter:
Authentication
Edgee uses standard Bearer token authentication. Set your API key as an environment variable:api_key parameter in ChatOpenAI automatically formats the header as: