Docs
βš™οΈ Configuration
librechat.yaml
Custom AI Endpoints
APIpie

APIpie

APIpie API key: apipie.ai/dashboard/profile/api-keys

Notes:

  • Known: icon provided, fetching list of models is recommended as API token rates and pricing used for token credit balances when models are fetched.

  • Known issue:

    • Fetching list of models is not supported.
    • Your success may vary with conversation titling
    • Stream isn’t currently supported (but is planned as of April 24, 2024)
πŸ”₯
Fetch and order the modelsβ–·

This python script can fetch and order the llm models for you. The output will be saved in models.txt, formated in a way that should make it easier for you to include in the yaml config.

fetch.py
import json
import requests
 
def fetch_and_order_models():
    # API endpoint
    url = "https://apipie.ai/models"
 
    # headers as per request example
    headers = {"Accept": "application/json"}
 
    # request parameters
    params = {"type": "llm"}
 
    # make request
    response = requests.get(url, headers=headers, params=params)
 
    # parse JSON response
    data = response.json()
 
    # extract an ordered list of unique model IDs
    model_ids = sorted(set([model["id"] for model in data]))
 
    # write result to a text file
    with open("models.txt", "w") as file:
        json.dump(model_ids, file, indent=2)
 
# execute the function
if __name__ == "__main__":
    fetch_and_order_models()
librechat.yaml
    # APIpie
    - name: "APIpie"
      apiKey: "${APIPIE_API_KEY}"
      baseURL: "https://apipie.ai/v1/"
      models:
        default: [
          "gpt-4",
          "gpt-4-turbo",
          "gpt-3.5-turbo",
          "claude-3-opus",
          "claude-3-sonnet",
          "claude-3-haiku",
          "llama-3-70b-instruct",
          "llama-3-8b-instruct",
          "gemini-pro-1.5",
          "gemini-pro",
          "mistral-large",
          "mistral-medium",
          "mistral-small",
          "mistral-tiny",
          "mixtral-8x22b",
          ]
        fetch: false
      titleConvo: true
      titleModel: "claude-3-haiku"
      summarize: false
      summaryModel: "claude-3-haiku"
      dropParams: ["stream"]
      modelDisplayLabel: "APIpie"

image