Apps and SDKs
LibreChat
Add the gateway to LibreChat as a custom endpoint in librechat.yaml, with the key in your .env file and the model list fetched from the API.
LibreChat is a self-hosted chat interface configured with a librechat.yaml file. The gateway goes in as a custom endpoint. Checked against LibreChat v0.8.8.
You need an API key from API keys and this base URL:
Base URL https://api.oneaiapikey.com/v1
Add the endpoint
-
Put the key in LibreChat’s
.envfile:.envRELAYKIT_API_KEY=<your Relaykit key> -
Add the endpoint under
endpoints.custominlibrechat.yaml. Keep the rest of your file as it is.librechat.yamlendpoints: custom: - name: "Relaykit" apiKey: "${RELAYKIT_API_KEY}" baseURL: "https://api.oneaiapikey.com/v1" models: default: ["claude-haiku-4-5", "claude-sonnet-5-5"] fetch: true titleConvo: true titleModel: "claude-haiku-4-5" modelDisplayLabel: "Relaykit" -
Restart LibreChat. With Docker, make sure
librechat.yamlis mounted into the container (LibreChat’s docs use adocker-compose.override.ymlfor this). -
Choose Relaykit in the endpoint menu, pick a model and send a message. The request shows up on your usage page.
What the settings do
apiKey: “${RELAYKIT_API_KEY}”reads the key from.env, so it never sits in the YAML file.baseURLmust end in/v1.fetch: trueloads the model list from the gateway;defaultis the list shown if fetching fails.titleModelis the model that names each conversation. A fast, cheap model is enough, and saves money on every new chat.
Troubleshooting
- The endpoint does not appear: LibreChat did not load the file. Check its startup log for YAML errors and that the file is mounted.
- 401 errors: the variable name in
apiKeydoes not match the one in.env, or the key was revoked. - A model fails with 403: the key’s model list does not include it, or your balance is empty. See Errors.