Skip to main content

Option 1: A cloud WCS instance

Here, you will create a Weaviate Cloud Service (WCS) instance. WCS 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 WCS Console

Go to the WCS 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 WCS instance

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

Use the connect_to_wcs function to connect to your WCS instance.

import weaviate
import os

client = weaviate.connect_to_wcs(
cluster_url=os.getenv("WCS_DEMO_URL"), # Replace with your WCS URL
auth_credentials=weaviate.auth.AuthApiKey(
os.getenv("WCS_DEMO_ADMIN_KEY")
), # Replace with your WCS 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 OpenAI, so you can provide the OpenAI API key to Weaviate through headers={"X-OpenAI-Api-Key": <YOUR_KEY>} as shown below:

import weaviate
import os

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

client = weaviate.connect_to_wcs(
cluster_url=os.getenv("WCS_DEMO_URL"), # Replace with your WCS URL
auth_credentials=weaviate.auth.AuthApiKey(
os.getenv("WCS_DEMO_ADMIN_KEY")
), # Replace with your WCS 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, please let us know on our forum. For example, you can: