Publit.Si
Docs›Your own LLM

Configuration

Your own LLM (Mistral, Ollama, OpenAI-compatible)

Use your own models instead of, or next to, a subscription: Mistral, Ollama, vLLM, LM Studio or your own LLM server, anything that speaks the OpenAI API. There are two places where AI works, and each has its own way in.

You need

  • The address (base URL) of your server or provider, e.g. https://api.mistral.ai/v1
  • Its API key, if it needs one
  • For the Studio: OpenCode

Which way for what

WhatNeedsYour own LLM through
AI texts: captions, hashtags, hook check, first comments, reply suggestions, weekly analysisPrompt in, text outOwn API in Settings, or OpenCode
Studio and daily ShortsA coding agent that edits files, runs your render scripts and uses the Publit.Si toolsOpenCode with your provider

AI texts: your own API

  1. Publit.Si → Settings → AI → Own API (OpenAI-compatible). Pick a preset (Mistral (EU), Ollama, OpenAI) or Own server.

  2. Enter the address, ending in /v1 for most servers. https:// works everywhere; plain http:// only for a server on this computer or in your own network (localhost, 192.168.…, 10.…, *.lan).

  3. Enter the API key if your server needs one. It is stored encrypted on your computer and only sent to this address.

  4. Load models lists what the server offers; pick one (or type its name), then Save and Test.

  5. Above, under AI assistant, choose Own API. Every AI text now goes to your server; the worker uses it at once.

Studio: OpenCode with your provider

OpenCode is an open-source coding agent like Claude Code. Publit.Si runs it in your project's repository, gives it the Publit.Si tools and your project's rules, and shows it everywhere the other agents appear: as main agent, as helper and for the daily Shorts.

  1. Install OpenCode (Mac and Linux):

    curl -fsSL https://opencode.ai/install | bash
  2. Connect a provider, e.g. Mistral, with its key:

    opencode auth login
  3. Or add your own OpenAI-compatible server to ~/.config/opencode/opencode.json:

    {
      "provider": {
        "farm": {
          "npm": "@ai-sdk/openai-compatible",
          "name": "My LLM farm",
          "options": { "baseURL": "http://llm.lan:8000/v1", "apiKey": "{env:OPENCODE_FARM_KEY}" },
          "models": { "qwen3-coder": { "name": "Qwen3 Coder", "tools": true } }
        }
      }
    }
  4. Check that your models show up:

    opencode models
  5. Publit.Si → Settings → Coding agents: OpenCode shows as connected. Pick it as main agent, and pick your model (e.g. farm/qwen3-coder or mistral/mistral-large-latest).

Where your model runs

OpenCode itself always runs on your computer: it edits files, runs your scripts and talks to Publit.Si there. The model can run somewhere else. Everything the model should see goes to it: your prompt, Publit.Si's instructions, the files the agent reads and what its tools return. The beginning of the model's name tells you where it runs.

Model name starts withRunsYour data goes to
ollama/…, lmstudio/… or your own provider with a local or LAN addressOn your computer or in your networkNowhere else
opencode/… (e.g. opencode/deepseek-v4.1-flash-free)In OpenCode's cloud (OpenCode Zen), also the free onesOpenCode and the model's host
mistral/…, anthropic/…, openai/…, deepseek/… and other providersAt that providerThat provider, under its terms

What OpenCode may do

OpenCode has no sandbox of its own, so Publit.Si sets its rules for every run: it may edit files in your repository, read the project's content folder (never write to it), run your repository's scripts, ffmpeg and read-only git, and use the Publit.Si tools. Everything else, including other commands, web access and files outside the repository, is refused, and OpenCode carries on without it. Your own OpenCode config, providers and plugins stay as they are.

Which models work

For AI texts almost any instruction model works. For the Studio the model must handle tool calls well: large coding models (e.g. Mistral Large, Codestral, Qwen3 Coder, DeepSeek) do; small local models often stop after one step.

Check

Settings › AI › Own API → Test says your model answered, and Settings › Coding agents shows OpenCode as connected.

Stuck? Search the troubleshooting list or write to us . Leave out secrets and tokens.