All guides · API quickstart · Last checked: Settings from the app's official documentation, November 2026; requests use our standard OpenAI-compatible API
- 1. Create an accountSign up in a minute and get $5 of free credit. Already a customer? Sign in.
- 2. Make an API keyIn your account, open AI API and press Create key. Keys start with
dgk_. Keep yours secret. - 3. Follow the steps belowCopy each block, paste your key where it says
dgk_your_key_here.
1. Add a custom endpoint to librechat.yaml
version: 1.3.19 # use the version that matches your LibreChat release
endpoints:
custom:
- name: 'Datagram'
apiKey: '${DATAGRAM_API_KEY}'
baseURL: 'https://api.datagram.net/v1'
models:
default: ['gemma4:26b-nvfp4', 'gpt-oss:120b', 'qwen3-coder:30b-64k']
fetch: true
titleConvo: true
titleModel: 'gemma4:12b'
modelDisplayLabel: 'Datagram'
Put the key in LibreChat's .env (a name no other endpoint uses):
DATAGRAM_API_KEY=dgk_your_key_here
baseURL is the API root; LibreChat adds /chat/completions itself. With fetch: true it reads the full model list from us; default is used if that fails.
2. With Docker: mount the file
Copy docker-compose.override.yml.example to docker-compose.override.yml and include:
services:
api:
volumes:
- ./librechat.yaml:/app/librechat.yaml
Then docker compose down && docker compose up -d.
3. Try it
Choose Datagram in the endpoint menu, pick a model and chat. docker compose logs api shows config errors.
If something goes wrong
401 "Missing API key" or "Invalid or revoked API key"
Check the key is pasted in full (it starts with dgk_) and hasn't been revoked in your account under AI API.
402 "credit has run out"
Add credit in your account under AI API. Credit never expires.
LibreChat won't start after editing
Unknown top-level keys make it exit. Check the indentation and the version line, then docker compose logs api.
Questions
Which model should I use?
gemma4:26b-nvfp4 for everyday chat (quick, can see images); gpt-oss:120b for harder questions; qwen3-coder:30b-64k for very long inputs.
Is it private?
Yes. Requests run on our own Macs in our datacenter, and we never store prompts or answers, only counts for billing.