Skip to content

Commit

Permalink
OpenRouter: describe how to configure it
Browse files Browse the repository at this point in the history
  • Loading branch information
enricoros committed Sep 19, 2023
1 parent 34d5a32 commit f4cd952
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
30 changes: 30 additions & 0 deletions docs/config-openrouter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# OpenRouter

[OpenRouter](https://openrouter.ai) is an independent, premium service
granting access to <Link href='https://openrouter.ai/docs#models' target='_blank'>exclusive models</Link> such
as GPT-4 32k, Claude, and more, typically unavailable to the public. This page explains how to link OpenRouter to big-AGI.

### 1. Sign up for OpenRouter and generate an API key

1. Sign up for OpenRouter at [openrouter.ai](https://openrouter.ai) > Sign In > Continue with Google
2. Add funds to the account (minimum $5) - [openrouter.ai/account](https://openrouter.ai/account) > Add Credits > Pay with Stripe
3. Generate an API key - [openrouter.ai/keys](https://openrouter.ai/keys) > API Key > Generate API Key
- **copy and save your API key** - the key will not be shown again, and will be in the format `sk-or-v1-...`
- keep the key secret, as it can be used to spend your credits

### 2. Add the API key to big-AGI

1. Launch big-AGI, and go to the AI **Models** settings
2. Add a Vendor, and select **OpenRouter**
![feature-openrouter-add.png](pixels/feature-openrouter-add.png)
3. Enter the API key in the **OpenRouter API Key** field, and load the Models
![feature-openrouter-configure.png](pixels/feature-openrouter-configure.png)
4. OpenAI GPT4-32k and other models will now be available and selectable in the app

### Pricing

OpenRouter provides the service and pricing, and it is not affiliated with big-AGI.
Please see [this page](https://openrouter.ai/docs#models) for more information details.

Note that large models such as GPT-4 32k are very expensive to run, and may consume
credits very quickly - one prompt may cost $1 or more, at the time of writing.
Binary file added docs/pixels/feature-openrouter-add.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pixels/feature-openrouter-configure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/modules/llms/openrouter/OpenRouterSourceSetup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export function OpenRouterSourceSetup(props: { sourceId: DModelSourceId }) {
<Typography level='body-sm'>
<Link href='https://openrouter.ai/keys' target='_blank'>OpenRouter</Link> is an independent, premium service
granting access to <Link href='https://openrouter.ai/docs#models' target='_blank'>exclusive models</Link> such
as GPT-4 32k, Claude, and more, typically unavailable to the public.
Simply sign in, top-up your account, and generate your unique API key to start using the models.
as GPT-4 32k, Claude, and more, typically unavailable to the public. <Link
href='https://github.com/enricoros/big-agi/blob/main/docs/config-openrouter.md'>Configuration &amp; documentation</Link>.
</Typography>
{/*</Box>*/}

Expand Down

1 comment on commit f4cd952

@vercel
Copy link

@vercel vercel bot commented on f4cd952 Sep 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

big-agi – ./

get.big-agi.com
big-agi-git-main-enricoros.vercel.app
big-agi-enricoros.vercel.app

Please sign in to comment.