diff --git a/components/icons/providers/index.ts b/components/icons/providers/index.ts index e287de290..5df38d2a8 100644 --- a/components/icons/providers/index.ts +++ b/components/icons/providers/index.ts @@ -37,6 +37,7 @@ export { default as OpenAIIcon } from './openai' export { default as OpenRouterIcon } from './openrouter' export { default as PerplexityIcon } from './perplexity' export { default as PortkeyIcon } from './portkey' +export { default as PowerTokensIcon } from './powertokens' export { default as RailwayIcon } from './railway' export { default as RedisIcon } from './redis' export { default as S3Icon } from './s3' diff --git a/components/icons/providers/powertokens.tsx b/components/icons/providers/powertokens.tsx new file mode 100644 index 000000000..19d6e05d2 --- /dev/null +++ b/components/icons/providers/powertokens.tsx @@ -0,0 +1,13 @@ +import React from 'react' + +export default function PowerTokensIcon({ className, ...props }: React.SVGProps) { + return ( + + + + ) +} diff --git a/content/docs/configuration/librechat_yaml/ai_endpoints/meta.json b/content/docs/configuration/librechat_yaml/ai_endpoints/meta.json index c46fe3dfd..72b656592 100644 --- a/content/docs/configuration/librechat_yaml/ai_endpoints/meta.json +++ b/content/docs/configuration/librechat_yaml/ai_endpoints/meta.json @@ -24,6 +24,7 @@ "openrouter", "perplexity", "portkey", + "powertokens", "shuttleai", "togetherai", "truefoundry", diff --git a/content/docs/configuration/librechat_yaml/ai_endpoints/powertokens.mdx b/content/docs/configuration/librechat_yaml/ai_endpoints/powertokens.mdx new file mode 100644 index 000000000..57cffea44 --- /dev/null +++ b/content/docs/configuration/librechat_yaml/ai_endpoints/powertokens.mdx @@ -0,0 +1,44 @@ +--- +title: PowerTokens +icon: PowerTokens +description: Configure PowerTokens as a custom endpoint in LibreChat. +--- + +PowerTokens is an OpenAI-compatible gateway for GLM, MiniMax, Qwen and DeepSeek models. One API key works for every model. + +## Get an API key + +Create an account at [powertokens.ai](https://powertokens.ai/?utm_source=github&utm_medium=librechat&utm_campaign=librechat) and generate a key on the [API keys page](https://www.powertokens.ai/en/api-keys?utm_source=github&utm_medium=librechat&utm_campaign=librechat). Add it to your `.env` file: + +```bash filename=".env" +POWERTOKENS_API_KEY=your-api-key +``` + +## Configuration + +Add the endpoint under `endpoints.custom` in your `librechat.yaml`: + +```yaml filename="librechat.yaml" + - name: "PowerTokens" + apiKey: "${POWERTOKENS_API_KEY}" + baseURL: "https://api.powertokens.ai/v1" + models: + default: + - "glm-5.2" + - "MiniMax-M3" + - "glm-5-turbo" + - "qwen3-coder-plus" + - "deepseek-v3-2-251201" + fetch: false + titleConvo: true + titleModel: "glm-5-turbo" + modelDisplayLabel: "PowerTokens" +``` + +To let each user supply their own key through the LibreChat UI instead of reading one from `.env`, set `apiKey: "user_provided"`. + +## Notes + +- Use model IDs exactly as they appear on the [PowerTokens models page](https://powertokens.ai/models?utm_source=github&utm_medium=librechat&utm_campaign=librechat). +- Set `fetch: true` to load the model list from the `/v1/models` endpoint instead of the fixed list above. +- Model details and request parameters are in the [PowerTokens docs](https://docs.powertokens.ai?utm_source=github&utm_medium=librechat&utm_campaign=librechat). diff --git a/lib/icons.tsx b/lib/icons.tsx index 047336d10..8bf7b485a 100644 --- a/lib/icons.tsx +++ b/lib/icons.tsx @@ -39,6 +39,7 @@ import { OpenRouterIcon, PerplexityIcon, PortkeyIcon, + PowerTokensIcon, RailwayIcon, RedisIcon, S3Icon, @@ -275,6 +276,7 @@ const icons: Record = { OpenRouter: , Perplexity: , Portkey: , + PowerTokens: , Railway: , Redis: , S3: ,