All guides · API quickstart · Last checked: Home Assistant documentation (2026.11); the requests its Ollama integration sends, including device control, tested against our live API, November 2026
- 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.
The settings
- URL
https://api.datagram.net/v1/ollama- API key
- a Datagram API key (
dgk_…), made in your account under AI API; new accounts get $5 of free credit - Model
gemma4:26b-nvfp4(quick, controls devices well, reads pictures)
1. Add the Ollama integration
- In Home Assistant: Settings → Devices & services → Add Integration → Ollama.
- URL:
https://api.datagram.net/v1/ollama. API key: yourdgk_key. Submit.
2. Add a conversation agent
- On the Ollama integration, choose Add conversation agent.
- Model: pick
gemma4:26b-nvfp4from the models marked (downloaded). Those are the ones on our servers; picking another makes Home Assistant try to download it, which we don't allow. - AI tools: tick Device control to let it turn things on and off.
- Leave Context window size and Keep alive as they are (our servers set both) and Think before responding off (faster answers). Submit.
3. Use it in Assist
- Settings → Voice assistants → your assistant (or Add assistant) → Conversation agent: choose the Ollama agent.
- Keep Prefer handling commands locally on: simple commands like "turn off the kitchen light" are handled by Home Assistant itself, free, and only the rest come to us.
- Choose what it can see and control under Settings → Voice assistants → Expose. Expose only what you need: the device list goes with every command, so fewer devices means faster and cheaper answers.
Try it from the Assist button (top right of the dashboard) or a voice satellite: "Is the living room lamp on?", "Turn on the kitchen light and tell me a joke".
AI tasks (optional)
On the integration, Add AI task with the same model lets automations use AI Task: Generate data, for example to summarize the day's events or describe a camera snapshot (Gemma 4 26B reads pictures).
Good to know
- Our models answer with up to 8,192 tokens of context per request. That's plenty for a few dozen exposed devices; with hundreds, expose fewer.
- Gemma 4 12B and Qwen3.5 9B are cheaper and also controlled devices correctly in our tests; Qwen3.6 35B is slower but gives longer, more careful answers.
- Home Assistant's own speech-to-text and text-to-speech are separate; this replaces only the "understanding" step.
If something goes wrong
"Unable to connect" or "Invalid authentication" when adding the integration
Check the URL is exactly https://api.datagram.net/v1/ollama (no slash after it) and the key starts with dgk_. Home Assistant must be able to reach api.datagram.net over HTTPS.
"Downloading model" fails or "not available on Datagram"
You picked a model that isn't on our servers. Reconfigure the agent and choose one marked (downloaded), such as gemma4:26b-nvfp4.
It answers but doesn't control devices
Tick Device control under AI tools (Reconfigure conversation agent), and make sure the device is exposed to Assist.
"Your Datagram AI credit has run out"
Add credit in your account under AI API. Credit never expires.
Questions
Do I need a GPU or a local Ollama server?
No. Home Assistant sends the request to our Ollama-compatible address with your key; our Macs run the model. Anything Home Assistant itself does locally keeps working without us.
Can it turn devices on and off?
Yes, with "Device control" ticked under AI tools. Only devices you expose to Assist can be controlled. Gemma 4 26B picked the right device and action in our tests in about 1.5 seconds.
What does it cost?
The normal token price of the model, from your Datagram credit. Each command sends the list of exposed devices with it, so a typical home is about 2,000 to 4,000 tokens per command: a few hundredths of a cent. With "Prefer handling commands locally" on, simple commands never reach us at all.
Is it private?
Requests run on our own Macs in our datacenter and we never store what you say or the device list; we keep only token counts for billing.