A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
Examples of integrating the OpenRouter API
Comprehensive, tested, executable examples demonstrating OpenRouter features across multiple ecosystems.
# Set your API key
export OPENROUTER_API_KEY="your-key-here"
# Run all examples
make examples
# Or run specific ecosystems
make curl # Run curl examples
make typescript # Run TypeScript monorepo examples
.
├── curl/ - Shell script examples
├── typescript/ - TypeScript monorepo (Bun workspaces)
│ ├── shared/ - Shared constants and types
│ ├── fetch/ - Raw fetch API examples
│ ├── ai-sdk-v5/ - Vercel AI SDK v5 examples
│ ├── effect-ai/ - Effect-TS examples
│ └── openrouter-sdk/ - OpenRouter SDK examples (TODO)
├── docs/ - Feature documentation
└── Makefile - Unified command interface
curl -fsSL https://bun.sh/install | bashjq (JSON processor)# Install TypeScript dependencies
make install
# Or manually
cd typescript && bun install
make examples
make curl # Shell scripts with curl + jq
make typescript # All TypeScript examples (fetch, AI SDK, Effect)
# curl
bash curl/prompt-caching.sh
# TypeScript
cd typescript/fetch && bun examples
cd typescript/ai-sdk-v5 && bun examples
cd typescript/effect-ai && bun examples
typescript/shared/See individual ecosystem READMEs:
See LICENSE.md
干净、强大、属于你的 AI Agent 平台 --AI agents, without the clutter.
Pocket Flow: Codebase to Tutorial
A Comprehensive Benchmark to Evaluate LLMs as Agents (ICLR'24)
Native macOS app to monitor Claude AI usage limits and watch your coding sessions live