Skip to content

About

A repo for my experimentation with openrouter.ai

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

OpenRouter Quickstart

Quickstart examples for OpenRouter's unified LLM API. This shows basic usage and streaming for applications that need redundancy across multiple AI providers.

What is OpenRouter?

OpenRouter gives access to hundreds of AI models from various providers through their API. It's built for applications where redundancy and provider diversity are the core requirements. If one provider goes down then it is possible to switch to another easily.

Repository Contents

  • main.py - Basic API usage (non-streaming)
  • streaming_demo.py - Real-time streaming demon
  • Pipfile - Python dependencies

Quick Start

  1. Install: pipenv install
  2. Set API Key: Replace the key in both Python files with yours from OpenRouter
  3. Run:
    pipenv run python main.py           # Basic usage
    pipenv run python streaming_demo.py # Streaming

Resources

About

A repo for my experimentation with openrouter.ai

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages