Documentation
  • Quick Start
  • Models
    • Block Entropy Models
    • Block Entropy Image Generation
    • Avatars
    • Smart Routing
    • Routing through Openrouter
    • Block Entropy Embeddings
  • Generation
    • Chat Completions
    • Structured Generation
    • Image generation
      • Usage
      • API Reference
    • Text-to-speech
  • Guides
    • Open Web UI
    • Silly Tavern
      • Connecting to Silly Tavern
      • Story Image Generation
    • Danswers
  • Depreciations
Powered by GitBook
On this page
  1. Models

Routing through Openrouter

Utilizing our routing capabilities

PreviousSmart RoutingNextBlock Entropy Embeddings

Last updated 10 months ago

Under the hood of our framework is a smart router capable of redirecting traffic to different endpoints. Given this capability, we can naturally route traffic to other endpoints and services. Here, we offer the ability for you to utilize your own API Keys at different providers (like Openrouter) and access any of their language models.

You must have your own Openrouter API key in order to utilize this service.

When creating a new API Key, enter the name of your key and if you want to associate this key with your Openrouter API key, you can enter it in the "Associate a 3rd Party API key" field, see below.

Don't worry, the API keys are encrypted, and never stored in plain text. Not even we can decrypt that key. The only way it can be used is if you also provide your Block Entropy API key as the secret (which is shown only once at creation, and again encrypted so no one except. yourself can decrypt it). Thus, keep your API key safe.

Then to utilize Openrouter models, you can just prefix the openrouter model name with the openrouter- prefix. For example, to utilize the Meta Lllama 3.1 405B parameter model, you would use,

model: openrouter-meta-llama/llama-3.1-405b-instruct

You would still use the blockentropy api endpoint, https://api.blockentropy.ai/v1, and your BE API key (ensure it is the one associatd with your OR API key).