> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openhands.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Use DigitalOcean Inference with OpenHands

> Configure a DigitalOcean Serverless Inference model and model access key in Agent Canvas or OpenHands.

Use DigitalOcean Inference when you want to run OpenHands on models hosted by [DigitalOcean Serverless Inference](https://docs.digitalocean.com/products/inference/) and billed to your DigitalOcean account. One DigitalOcean key gives you access to Anthropic, OpenAI, and open-weight models.

This pairs well with [DigitalOcean Managed Agents](/openhands/usage/agent-canvas/backend-setup/digitalocean), so both your sandboxes and your model usage stay on DigitalOcean. It works with any backend.

## Create a Model Access Key

1. In the DigitalOcean control panel, open [**Model Access Keys**](https://cloud.digitalocean.com/model-studio/manage-keys).
2. Select **Create model access key** and enter an **Access Key Name**.
3. On the **Foundation models** tab, choose **All models**, or **Select models** to limit the key to the models you plan to use.
4. Select **Continue**. Under **VPC Network**, choose **No VPC network**.
5. Select **Add model access key**, then copy the secret key. DigitalOcean shows it only once.

<Note>
  Do not restrict the key to a VPC network. OpenHands calls the public inference endpoint, and VPC-scoped keys are not supported from DigitalOcean Managed Agents sandboxes.
</Note>

## Configure Agent Canvas

1. Open `Settings > LLM`.
2. In the `Basic` tab, select `digitalocean` as the provider.
3. Select a model, enter your model access key, and save the profile.
4. Start a new conversation and send a short message to verify the model responds.

You do not need to set a base URL. OpenHands sends `digitalocean/` models to `https://inference.do-ai.run/v1` automatically.

To reuse the key across several models, create a `digitalocean` [Provider Connection](/openhands/usage/agent-canvas/model-configuration#provider-connection-for-reusable-api-credentials) and select it in each profile.

## Verified Models

These models are verified for tool calling with OpenHands. Enter the model string as shown when you use the `Advanced` tab or the SDK.

| Model | Model string |
| - | - |
| Claude Opus 5.5 | `digitalocean/anthropic-claude-opus-5.5` |
| Claude Opus 5 | `digitalocean/anthropic-claude-opus-5` |
| Claude Sonnet 5.5 | `digitalocean/anthropic-claude-sonnet-5.5` |
| Claude Sonnet 5 | `digitalocean/anthropic-claude-5-sonnet` |
| GPT-5.6 Sol | `digitalocean/openai-gpt-5.6-sol` |
| GPT-5.6 Terra | `digitalocean/openai-gpt-5.6-terra` |
| GPT-5.6 Luna | `digitalocean/openai-gpt-5.6-luna` |
| DeepSeek V4 Pro | `digitalocean/deepseek-v4-pro` |
| GLM 5.3 | `digitalocean/glm-5.3` |
| GLM 5.2 | `digitalocean/glm-5.2` |
| Kimi K3 | `digitalocean/kimi-k3` |
| Qwen 3.8 Max | `digitalocean/qwen3.8-max` |

To use a model that is not listed, use the `Advanced` tab and add the `digitalocean/` prefix to its DigitalOcean model ID. Get current IDs from DigitalOcean's [available models](https://docs.digitalocean.com/products/inference/details/models/#foundation-models) or from `GET https://inference.do-ai.run/v1/models`. For example:

```text theme={null}
digitalocean/glm-5.3
```

<Warning>
  OpenHands needs tool calling through the Chat Completions API. Models that support tools only through the Responses API, such as the GPT-6 line, do not work through this provider yet.
</Warning>

## Use It With the SDK

```python theme={null}
from pydantic import SecretStr
from openhands.sdk import LLM

llm = LLM(
    model="digitalocean/anthropic-claude-sonnet-5.5",
    api_key=SecretStr("<your-model-access-key>"),
    usage_id="agent",
)
```

The SDK fills in the DigitalOcean endpoint for you. Pass `base_url` only to override it.

## Costs

DigitalOcean bills inference to your Inference and Agents balance, then your account prepayment balance. See [Serverless Inference pricing](https://docs.digitalocean.com/products/inference/details/pricing/) for per-model rates. Third-party models, such as Anthropic and OpenAI models, are not discounted by Agent Droplets plans.

## Fix Common Problems

| Problem | Check | Next step |
| - | - | - |
| Authentication fails | The model access key | Copy the key again, or regenerate it in **Model Access Keys**, then save the profile. |
| Model is not found or not allowed | The model ID and the key's model scope | Use an exact ID from the model list with the `digitalocean/` prefix, and check the key covers that model. |
| Requests fail with a tools or function-calling error | Whether the model supports tool calling over Chat Completions | Choose a model from [Verified Models](#verified-models). |
| Requests fail from a DigitalOcean sandbox | The key's VPC setting | Create a key with **No VPC network**. |
| Requests stop working | Your DigitalOcean balance | Add funds to your Inference and Agents balance. |

For the broader configuration decision and recovery paths, see [Configure a Model](/openhands/usage/agent-canvas/model-configuration).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.