| title | Welcome to Edgee |
|---|---|
| description | The AI Gateway that TL;DR tokens. |
| icon | house |
| mode | center |
Edgee is an AI Gateway that reduces LLM costs by up to 50% through intelligent token compression. If you want to save tokens for your coding agents, or if you want to optimize the contexts of your AI applications, Edgee is the solution for you.
```bash curl -fsSL https://edgee.ai/install.sh | bash ``` ```bash brew install edgee-ai/tap/edgee ``` ```powershell irm https://edgee.ai/install.ps1 | iex ``` ```bash edgee launch claude # That's it. Claude Code is now running with Edgee compression and full observability enabled. ``` ```bash edgee launch codex # That's it. Codex is now running with Edgee compression and full observability enabled. ``` ```bash edgee launch opencode # That's it. OpenCode is now running with Edgee compression and full observability enabled. ```That's it. Your coding assistant is now running with Edgee compression and full observability enabled.
```typescript import Edgee from 'edgee';const edgee = new Edgee("your-api-key");
const response = await edgee.send({
model: 'gpt-5.2',
input: 'What is the capital of France?',
});
console.log(response.text);
if (response.compression) {
console.log(`Tokens saved: ${response.compression.saved_tokens}`);
}
```
edgee = Edgee("your-api-key")
response = edgee.send(
model="gpt-5.2",
input="What is the capital of France?"
)
print(response.text)
if response.compression:
print(f"Tokens saved: {response.compression.saved_tokens}")
```
import (
"fmt"
"log"
"github.com/edgee-ai/go-sdk/edgee"
)
func main() {
client, _ := edgee.NewClient("your-api-key")
response, err := client.Send("gpt-5.2", "What is the capital of France?")
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Text())
if response.Compression != nil {
fmt.Printf("Tokens saved: %d\n", response.Compression.SavedTokens)
}
}
```
let client = Edgee::with_api_key("your-api-key");
let response = client.send("gpt-5.2", "What is the capital of France?").await.unwrap();
println!("{}", response.text().unwrap_or(""));
if let Some(compression) = &response.compression {
println!("Tokens saved: {}", compression.saved_tokens);
}
```
const openai = new OpenAI({
baseURL: "https://api.edgee.ai/v1",
apiKey: process.env.EDGEE_API_KEY,
});
const completion = await openai.chat.completions.create({
model: "gpt-5.2",
messages: [
{ role: "user", content: "What is the capital of France?" }
],
});
console.log(completion.choices[0].message.content);
```
const client = new Anthropic({
baseURL: 'https://api.edgee.ai',
apiKey: process.env.EDGEE_API_KEY,
});
const message = await client.messages.create({
model: 'claude-sonnet-4.5',
max_tokens: 1024,
messages: [
{ role: 'user', content: 'What is the capital of France?' }
]
});
console.log(message.content);
```
llm = ChatOpenAI(
base_url="https://api.edgee.ai/v1",
api_key=os.getenv("EDGEE_API_KEY"),
model="gpt-5.2",
)
response = llm.invoke([HumanMessage(content="What is the capital of France?")])
print(response.content)
```
That's it. You now have access to every major LLM provider, automatic failovers, cost tracking, and full observability, all through Edgee's Gateway.
Building with LLMs is powerful, but comes with challenges:
- Exploding AI costs: Token usage adds up fast, whether you're running RAG pipelines, coding with Claude Code, or building multi-turn agents
- Cost opacity: Bills spike with no visibility into what's driving costs
- Vendor lock-in: Your code is tightly coupled to a single provider's API
- No fallbacks: When OpenAI goes down, your app goes down
- Security concerns: Sensitive data flows directly to third-party providers
- Fragmented observability: Logs scattered across multiple dashboards
Edgee solves all of this with a single integration.
Lossless compression for Claude Code, Codex, and OpenCode. Extend your session duration or cut API costs, with no code changes required. AI-powered context optimization that reduces token usage. Perfect for long-context prompts and agentic workloads where context windows matter. Real-time cost tracking, latency metrics, and request logs. Know exactly what your AI is doing and costing. One SDK, access to 200+ models from OpenAI, Anthropic, Google, Mistral, and more. Switch providers with a single line change.
