Skip to main content

Create On-Demand Cluster (V2)
Public Preview

Create an on-demand cluster in the current project.

POST/v2/clusters/createOnDemandCluster
Connection Endpoint

The base URL for this API is in the following format:

https://api.cloud.zilliz.com

📘Notes

The endpoints on the control plane currently supports up to 20 requests per second per user per endpoint.

export BASE_URL="https://api.cloud.zilliz.com"
Parameters
Authorizationstringheaderrequired

The authentication token should be an API key with appropriate privileges.

Example Value: Bearer {{TOKEN}}
Request Bodyapplication/json
projectIdstringrequired

The ID of the project to create the cluster in.

regionIdstringrequired

The ID of the cloud region to create the cluster in.

cuSizeintegerrequired

The CU size to use for the cluster. The minimum CU size is 1.

clusterNamestring

The name of the cluster to create.

autoSuspendinteger

Auto-suspend idle window. The cluster will be automatically suspended if there is no request within the specified period. The value should be an integer representing the number of seconds. For example, 300 means 5 minutes.

export TOKEN="YOUR_API_KEY"

curl --request POST \
--url "${BASE_URL}/v2/clusters/createOnDemandCluster" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"projectId": "proj-xxxxxxxxxxxxxxxxxxx",
"regionId": "aws-us-west-2",
"clusterName": "my-on-demand",
"cuSize": 8,
"autoSuspend": 60
}'
Responses200 - application/json
codeinteger

Response code.

dataobject

Response payload.

clusterIdstring

ID of the cluster created.

promptstring

Prompt messages returned.

Returns an error message.

codeinteger

Response code.

messagestring

Error message.

{
"code": 0,
"data": {
"clusterId": "inxx-xxxxxxxxxxxxxxx",
"prompt": "Successfully submitted. The on-demand cluster is being created. Use the Describe On-Demand Cluster API to check its creation progress and status. Once the cluster status is RUNNING, use your API key to access the on-demand cluster."
}
}