Skip to main content

Option 1: A Weaviate Cloud (WCD) instance

Here, you will create a Weaviate Cloud (WCD) instance. WCD is a fully managed Weaviate instance that runs in the cloud. It's a great way to get started with Weaviate, as it requires no installation or maintenance.

Log in to the WCD Console

Go to the WCD Console and log in with your credentials. If you don't have an account yet, you can sign up by clicking on the Register here link from the login screen.

Create a Weaviate instance

From the console, go to the Dashboard and click on the Create cluster button. From the following screen:

  • Select the "Free sandbox" tab
  • Provide a cluster name
  • Set "Enable authentication" to "Yes"

Click on the Create button to create your Weaviate instance. The process will take a few minutes.

Retrieve your Weaviate instance details

Once the instance is created, you will be able see its details by clicking on the Details button. Find the cluster URL and the API key.

You will need these details to connect to your Weaviate instance.

Connect to your WCD instance

To connect to the Weaviate Cloud (WCD) instance, you need to use the cluster URL and the API key. You can find these details in the WCD Console.

Use the connect_to_wcs function to connect to your WCD instance.

import weaviate
import os

client = weaviate.connect_to_wcs(
cluster_url=os.getenv("WCD_DEMO_URL"), # Replace with your WCD URL
auth_credentials=weaviate.auth.AuthApiKey(
os.getenv("WCD_DEMO_ADMIN_KEY")
), # Replace with your WCD key
)

Provide inference API keys

Some Weaviate modules can use inference APIs for vectorizing data or large language model integration. You can provide the API keys for these services to Weaviate at instantiation.

This course uses Cohere, so you can provide the Cohere API key to Weaviate through headers={"X-Cohere-Api-Key": <YOUR_KEY>} as shown below:

import weaviate
import os

headers = {
"X-Cohere-Api-Key": os.getenv("COHERE_APIKEY")
} # Replace with your Cohere API key

client = weaviate.connect_to_wcs(
cluster_url=os.getenv("WCD_DEMO_URL"), # Replace with your WCD URL
auth_credentials=weaviate.auth.AuthApiKey(
os.getenv("WCD_DEMO_ADMIN_KEY")
), # Replace with your WCD key
headers=headers,
)
What next?

If you have completed this, you can skip the next page Option 2: A local Weaviate instance and continue with Communicate with Weaviate.

Questions and feedback

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