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.
Quick test with curl
curl https://api.datagram.net/v1/chat/completions \
-H "Authorization: Bearer dgk_your_key_here" \
-H "Content-Type: application/json" \
-d '{"model": "gemma4:26b-nvfp4", "messages": [{"role": "user", "content": "Say hello in five words."}]}'
More examples (streaming, Python, JavaScript, pictures) are in the quickstart.
Chat from your shell with llm
llm is a free command-line tool for talking to AI models. Install it (any one of these):
brew install llm # or: pipx install llm / uv tool install llm / pip install llm
Save your key, then add Datagram's models:
llm keys set datagram # paste your dgk_ key when asked
llm openai endpoint add https://api.datagram.net/v1 -m gemma4:26b-nvfp4 --id datagram-gemma --key datagram --supports-tools --vision
llm openai endpoint add https://api.datagram.net/v1 -m gpt-oss:120b --id datagram-gpt-oss --key datagram --supports-tools
Ask something, or pipe a file in:
llm -m datagram-gemma "Explain what a /27 subnet is in two sentences."
cat error.log | llm -m datagram-gpt-oss "What went wrong here?"
llm openai endpoint path shows the file the models are saved in (extra-openai-models.yaml); the key itself is stored separately, never in that file. llm logs -n 1 shows the last exchange.
Which model?
gemma4:26b-nvfp4 for quick questions (it can also read images: -a picture.png), gpt-oss:120b for harder ones, qwen3-coder:30b-64k for code and long inputs.
If something goes wrong
401 "Missing API key" or "Invalid or revoked API key"
Check the key is set where the tool reads it (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.
"Unknown model" in llm
Use the --id you chose (for example datagram-gemma), not our model name; llm models lists them.
Questions
Do I need to install anything?
Not for curl. The llm tool is a free install (brew, pipx, uv or pip) and gives you chat, piping files in, and a log of past answers.
Is it private?
Yes. Requests run on our own Macs in our datacenter, and we never store prompts or answers, only counts for billing.