Adding DigitalOcean as an external inference provider in OpenClaw

Date: 30 Jul 2026 · OpenClaw 2026.7.1-2

DigitalOcean's serverless Inference Engine hosts 70+ models (OpenAI, Anthropic, Moonshot, Llama, DeepSeek, ...) behind an OpenAI-compatible API. To run a model like Moonshot's Kimi K3 through OpenClaw, you can wire it up directly, no aggregator in the loop. Mostly config work, no code.

Probing the endpoint with curl

Model list and chat completions both live under https://inference.do-ai.run/v1:

curl -s --http1.1 https://inference.do-ai.run/v1/models \
  -H "Authorization: Bearer $DO_INFERENCE_KEY"

curl -s --http1.1 https://inference.do-ai.run/v1/chat/completions \
  -H "Authorization: Bearer $DO_INFERENCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kimi-k3",
    "messages": [{"role": "user", "content": "hello"}],
    "max_tokens": 200
  }'

Heads-up: curl defaults to HTTP/2, and we saw a lot of connection issues against the DO inference API with it (intermittent curl: (56) Failure when receiving data from the peer), so force HTTP/1.1 with --http1.1 instead. This only affected curl; the OpenClaw gateway's own HTTP client did not hit it.

Watch out: degenerate Kimi-K3 output

During testing, Kimi K3 on DO would reliably return degenerate output: instead of real text, the response was !!!!..., repeated up to the max token cap (finish_reason: "length", thousands of characters). Streaming failed entirely (no chunks, then connection drop). Kimi K2.5 on the same endpoint worked fine at the same time, so it was model-specific, not auth or config.

This is a DigitalOcean-side serving issue, confirmed by their status page: Response Degradation Impacting Kimi-K3 (29 Jul 2026), which describes exactly this: "empty or broken outputs (including repeated characters) when querying the Kimi-K3 service". Check the status page before debugging your own setup.

Configuring OpenClaw

No bundled digitalocean provider exists, so define it with the openai-completions shape in openclaw.json:

"models": {
  "providers": {
    "digitalocean": {
      "baseUrl": "https://inference.do-ai.run/v1",
      "apiKey": "***",
      "api": "openai-completions",
      "models": [
        {
          "id": "kimi-k3",
          "name": "Kimi K3 (DigitalOcean)",
          "api": "openai-completions",
          "reasoning": false,
          "input": ["text", "image"],
          "cost": { "input": 3, "output": 15 },
          "contextWindow": 262144,
          "maxTokens": 16384
        }
      ]
    }
  }
}

Then add an alias (k3: digitalocean/kimi-k3) in agents.defaults.models so you can /model k3 to switch. The API key comes from the DO dashboard (GenAI Platform, model access keys) and goes in ~/.openclaw/.env as DO_INFERENCE_KEY. Provider config is picked up by hot-reload, no restart needed.

Once wired, verify with /model digitalocean/kimi-k3 and a trivial prompt before promoting it to default.