Skip to main content

Create Serverless Cluster

Creates a serverless cluster.


POST
https://controller.api.{cloud-region}.zillizcloud.com/v1/clusters/createServerless

Example

Notes
  • This API requires an API Key as the authentication token.
  • This API requires the ID of a target project.
curl --request POST \
--url "https://controller.api.${CLOUD_REGION}.zillizcloud.com/v1/clusters/createServerless" \
--header "Authorization: Bearer ${API_KEY}" \
--header "accept: application/json" \
--header "content-type: application/json" \
--data-raw '{
"clusterName": "cluster-starter",
"projectId": "proj-*********************"
}'

Success response:

{
"code": 200,
"data": {
"clusterId": "in03-******************",
"username": "db_admin",
"password": "******************",
"prompt": "Submission successful, Cluster is being created, You can use the DescribeCluster interface to obtain the creation progress and the status of the Cluster. When the Cluster status is RUNNING, you can access your vector database using the SDK with the admin account and the initialization password you provided."
}
}
How can I obtain the project ID?

You can obtain the project ID in either of the following ways:

  • On the Zilliz Cloud console

    1. Click Projects in the top menu bar to open the Projects page.
    2. Locate the target project and copy its ID in the Project ID column.
  • Use the List Projects API endpoint to list all projects.

Request

Parameters

  • No query parameters required

  • No path parameters required

Request Body

{
"clusterName": "string",
"projectId": "string"
}
ParameterDescription
clusterNamestring
The name of the cluster to be created. It is a string of no more than 32 characters.
projectIdstring
The ID of the project where the cluster is to be created.

Response

Returns an object that contains the details of the created cluster.

Response Bodies

  • Response body if we process your request successfully
{
"code": "integer",
"data": {
"clusterId": "string",
"username": "string",
"password": "string",
"prompt": "string"
}
}
  • Response body if we failed to process your request
{
"code": integer,
"message": string
}

Properties

The properties in the returned response are listed in the following table.

PropertyDescription
codeinteger
dataobject
data.clusterIdstring
The ID of the cluster affected by this operation.
data.usernamestring
The name of the cluster user generated by default.
data.passwordstring
The password of the cluster user generated by default. It will not be displayed again, so note it down and securely store it.
data.promptstring
The statement indicating that this operation succeeds.
messagestring
Indicates the possible reason for the reported error.

Possible Errors

CodeError Message
80014Invalid projectId. The projectId should like proj-xxxxxx
80021Serverless cluster not support this operation.