Weaviate's integration with [DigitalOcean's Serverless Inference](https://docs.digitalocean.com/products/inference/how-to/use-serverless-inference/) lets you access DigitalOcean-hosted embedding models directly from Weaviate.

[Configure a Weaviate vector index](#configure-the-vectorizer) to use a DigitalOcean embedding model, and Weaviate generates embeddings for imports and searches automatically using your DigitalOcean API key. This is the _vectorizer_.

At [import time](#data-import), Weaviate generates text object embeddings and saves them into the index. For [vector](#vector-near-text-search) and [hybrid](#hybrid-search) search operations, Weaviate converts text queries into embeddings.

![Embedding integration illustration](/assets/docs/weaviate/model-providers/_includes/integration_digitalocean_embedding.png)

## Requirements

### Weaviate configuration

Your Weaviate instance must have the `text2vec-digitalocean` module enabled.

:::accordion{title="For Weaviate Cloud (WCD) users"}
This integration is enabled by default on Weaviate Cloud (WCD) instances.
:::

:::accordion{title="For self-hosted users"}
- Check the [cluster metadata](../monitoring-and-logging/status.md#cluster-metadata) to verify if the module is enabled.
- Follow the [how-to configure modules](../how-to-configure-weaviate/modules.md) guide to enable the module in Weaviate.
:::

### API credentials

You must provide a DigitalOcean API key to Weaviate for this integration. Generate one in the [DigitalOcean Cloud console](https://cloud.digitalocean.com/) and supply it via one of:

- Set the `DIGITALOCEAN_APIKEY` environment variable on the Weaviate server.
- Provide the `X-Digitalocean-Api-Key` header at request time, as shown below.

:::code-group{sync="languages"}
```python title="Python"
# Recommended: save sensitive data as environment variables
digitalocean_key = os.getenv("DIGITALOCEAN_APIKEY")
```

```typescript title="JavaScript/TypeScript"
const digitaloceanApiKey = process.env.DIGITALOCEAN_APIKEY || '';  // Replace with your inference API key
```

```java title="Java" {6-11}
// Best practice: store your credentials in environment variables
String weaviateUrl = System.getenv("WEAVIATE_URL");
String weaviateApiKey = System.getenv("WEAVIATE_API_KEY");
String digitalOceanApiKey = System.getenv("DIGITALOCEAN_APIKEY");

WeaviateClient client = WeaviateClient.connectToWeaviateCloud(
    weaviateUrl,
    weaviateApiKey,
    config -> config.setHeaders(Map.of("X-Digitalocean-Api-Key", digitalOceanApiKey)));

System.out.println(client.isReady()); // Should print: `True`

client.close(); // Free up resources
```

```csharp title="C#" {6-16}
// Best practice: store your credentials in environment variables
string weaviateUrl = Environment.GetEnvironmentVariable("WEAVIATE_URL");
string weaviateApiKey = Environment.GetEnvironmentVariable("WEAVIATE_API_KEY");
string digitalOceanApiKey = Environment.GetEnvironmentVariable("DIGITALOCEAN_APIKEY");

using var client = await Connect.Cloud(
    weaviateUrl,
    weaviateApiKey,
    headers: new Dictionary<string, string>
    {
        ["X-Digitalocean-Api-Key"] = digitalOceanApiKey,
    }
);

var meta = await client.GetMeta();
Console.WriteLine(meta.Version);
```
:::

## Configure the vectorizer

[Configure a Weaviate index](../how-to-manage-collections/vector-config.md#specify-a-vectorizer) to use a DigitalOcean Serverless Inference model by setting the vectorizer as follows:

:::code-group{sync="languages"}
```python title="Python" {5-11}
from weaviate.classes.config import Configure

client.collections.create(
    "DemoCollection",
    vector_config=[
        Configure.Vectors.text2vec_digitalocean(
            model="qwen3-embedding-0.6b",  # Required. Choose from the DigitalOcean Serverless Inference catalogue
            name="title_vector",
            source_properties=["title"],
        )
    ],
    # Additional parameters not shown
)
```

```typescript title="JavaScript/TypeScript" {9-15}
await client.collections.create({
  name: 'DemoCollection',
  properties: [
    {
      name: 'title',
      dataType: 'text' as const,
    },
  ],
  vectorizers: [
    weaviate.configure.vectors.text2VecDigitalOcean({
      model: 'qwen3-embedding-0.6b',  // Required. Choose from the DigitalOcean Serverless Inference catalogue
      name: 'title_vector',
      sourceProperties: ['title'],
    })
  ],
  // Additional parameters not shown
});
```

```java title="Java"
client.collections.create("DemoCollection",
    col -> col
        .vectorConfig(
            VectorConfig.text2vecDigitalOcean("title_vector",
                c -> c.model("qwen3-embedding-0.6b").sourceProperties("title")))
        .properties(Property.text("title"), Property.text("description")));
```

```csharp title="C#"
await client.Collections.Create(
    new CollectionCreateParams
    {
        Name = "DemoCollection",
        VectorConfig = new VectorConfigList
        {
            Configure.Vector(
                "title_vector",
                v => v.Text2VecDigitalOcean(model: "qwen3-embedding-0.6b"),
                sourceProperties: ["title"]
            ),
        },
        Properties = [Property.Text("title"), Property.Text("description")],
    }
);
```
:::

### Vectorizer parameters

- `model`: **Required.** The DigitalOcean Serverless Inference model id, for example `qwen3-embedding-0.6b`. Query `GET /v1/models` on the inference endpoint to see the catalogue of available models for your account.
- `baseURL`: Optional. The base URL where API requests should go. Defaults to `https://inference.do-ai.run`. Override only if you're proxying or running against a non-default endpoint.

## Header parameters

You can override the API key per-request via headers. Headers provided at request time take precedence over the server-side `DIGITALOCEAN_APIKEY` environment variable:

- `X-Digitalocean-Api-Key`: The DigitalOcean API key for this request.

## Data import

After configuring the vectorizer, [import data](../how-to-manage-objects/import.md) into Weaviate. Weaviate generates embeddings for text objects using [the configured model](#vectorizer-parameters).

:::callout{intent="tip" title="Re-use existing vectors"}
If you already have a compatible model vector available, you can provide it directly to Weaviate. This can be useful if you have already generated embeddings using the same model and want to use them in Weaviate, such as when migrating data from another system.
:::

## Searches

Once the vectorizer is configured, Weaviate performs vector and hybrid searches using the specified DigitalOcean model.

![Embedding integration at search illustration](/assets/docs/weaviate/model-providers/_includes/integration_digitalocean_embedding_search.png)

### Vector (near text) search

When you perform a [vector search](../how-to-query-search/similarity.md#search-with-text), Weaviate converts the text query into an embedding using the configured DigitalOcean model and returns the most similar objects.

### Hybrid search

When you perform a [hybrid search](../how-to-query-search/hybrid.md), Weaviate fuses keyword and vector ranking. The text query is embedded with the configured DigitalOcean model; the keyword side uses Weaviate's inverted index.

## References

### Available models

DigitalOcean's Serverless Inference catalogue includes several embedding-capable models. See the [DigitalOcean Serverless Inference docs](https://docs.digitalocean.com/products/inference/how-to/use-serverless-inference/) for the live list, as model availability and dimensions can change.

:::callout{intent="note" title="Dimensions parameter currently not supported"}
DigitalOcean's `/v1/embeddings` endpoint does not accept a `dimensions` request field at the time of writing, even for [Matryoshka Representation Learning (MRL)](https://huggingface.co/blog/matryoshka)-capable models like `qwen3-embedding-0.6b` whose native output could otherwise be truncated. Weaviate intentionally does not forward a `dimensions` parameter to avoid silent no-ops; the embedding dimension is always the model's native size.
:::

## Further resources

### Other integrations

- [DigitalOcean generative AI models + Weaviate](digitalocean-generative.md)
- [Weaviate model providers overview](index.md)

### Code examples

Once the vectorizer is configured, Weaviate handles model inference transparently. The standard [client library how-tos](../client-libraries/index.md) apply unchanged. No DigitalOcean-specific code is required at query or import time beyond the configuration shown above.

## Questions and feedback

Have a question or feedback? Here's how to reach us.

::::card-grid
:::card{title="Community Forum" href="https://forum.weaviate.io/c/support" icon="messages-square"}
Ask questions and connect with other developers on our **Community forum**.
:::

:::card{title="Support" href="/guides/support-overview" icon="life-buoy"}
Weaviate Cloud user or customer? Find the right channel on the **Support page**.
:::
::::

## Related pages

- [Agents](./agents-index.md)
- [AI-assisted Weaviate code generation](./ai-assisted-vibe-coding-index.md)
- [APIs](./apis-index.md)
- [Authorization and authentication](./authorization-and-authentication-index.md)
- [Benchmarks](./benchmarks-index.md)
- [Best practices](./best-practices-index.md)
- [Client libraries](./clients-index.md)
- [Client Libraries / SDKs](./client-libraries-index.md)
- [Cloud](./cloud-index.md)
- [Cloud account management](./cloud-account-management-index.md)

# Agent Instructions

This portal answers questions programmatically. To receive a synthesized,
source-cited answer instead of crawling page by page, append the `?ask=`
query parameter to any page URL on this site:

    /guides/quickstart?ask=how+do+I+authenticate

Optional parameters:

- `&goal=<what-you-are-trying-to-do>` steers the answer toward your
  objective (e.g. `&goal=write+a+python+client`).
- `&version=<label>` scopes the answer to a mounted version when the
  portal publishes more than one.

The response is `text/markdown`: the answer followed by a `# Sources` list
of the portal pages it was grounded in. Status codes are the contract:

- `200` — the answer; `402` — the portal owner’s plan or answer credits are
  exhausted (surface this to your operator; do NOT retry); `429` — you are
  rate-limited; back off for the `Retry-After` seconds; `503` — the answer
  lane is temporarily unavailable; fall back to crawling the `.md` pages.

For the full corpus map read `llms.txt` at the site root; for the tool
surface (search + page fetch as MCP tools) see `/mcp`.
