Skip to main content
Go to documentation:
⌘U
Weaviate Database

Develop AI applications using Weaviate's APIs and tools

Deploy

Deploy, configure, and maintain Weaviate Database

Weaviate Agents

Build and deploy intelligent agents with Weaviate

Weaviate Cloud

Manage and scale Weaviate in the cloud

Additional resources

Integrations
Contributor guide
Events & Workshops
Weaviate Academy

Need help?

Weaviate LogoAsk AI Assistant⌘K
Community Forum

DigitalOcean Embeddings with Weaviate

Weaviate's integration with DigitalOcean's Serverless Inference lets you access DigitalOcean-hosted embedding models directly from Weaviate.

Configure a Weaviate vector index 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, Weaviate generates text object embeddings and saves them into the index. For vector and hybrid search operations, Weaviate converts text queries into embeddings.

Embedding integration illustration

Requirements

Weaviate configuration

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

For Weaviate Cloud (WCD) users

This integration is enabled by default on Weaviate Cloud (WCD) instances.

For self-hosted users

API credentials

You must provide a DigitalOcean API key to Weaviate for this integration. Generate one in the DigitalOcean Cloud console 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.
py docs  API docs
More infoCode snippets in the documentation reflect the latest client library and Weaviate Database version. Check the Release notes for specific versions.

If a snippet doesn't work or you have feedback, please open a GitHub issue.
import weaviate
from weaviate.classes.init import Auth
import os

# Recommended: save sensitive data as environment variables
digitalocean_key = os.getenv("DIGITALOCEAN_APIKEY")
headers = {
"X-Digitalocean-Api-Key": digitalocean_key,
}

client = weaviate.connect_to_weaviate_cloud(
cluster_url=weaviate_url, # `weaviate_url`: your Weaviate URL
auth_credentials=Auth.api_key(weaviate_key), # `weaviate_key`: your Weaviate API key
headers=headers
)

# Work with Weaviate

client.close()

Configure the vectorizer

Configure a Weaviate index to use a DigitalOcean Serverless Inference model by setting the vectorizer as follows:

py docs  API docs
More infoCode snippets in the documentation reflect the latest client library and Weaviate Database version. Check the Release notes for specific versions.

If a snippet doesn't work or you have feedback, please open a GitHub issue.
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
)

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 into Weaviate. Weaviate generates embeddings for text objects using the configured model.

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

When you perform a vector search, Weaviate converts the text query into an embedding using the configured DigitalOcean model and returns the most similar objects.

When you perform a hybrid search, 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 for the live list — model availability and dimensions can change.

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)-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

Code examples

Once the vectorizer is configured, Weaviate handles model inference transparently. The standard client library how-tos apply unchanged — no DigitalOcean-specific code is required at query or import time beyond the configuration shown above.

Questions and feedback

If you have any questions or feedback, let us know in the user forum.