All Products
Search
Document Center

E-MapReduce:CreateRayCluster

Last Updated:Apr 10, 2026

Creates a Ray cluster.

Creates a Ray cluster.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage. Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /api/v1/workspaces/{workspaceId}/rayCluster HTTP/1.1

Path parameters

ParameterTypeRequiredDescriptionExample
workspaceIdstringNoThe workspace ID.w-d2d82aa09155

Request parameters

ParameterTypeRequiredDescriptionExample
bodyobjectNoThe request body.
namestringNoThe name of the Ray cluster. The name must be 1 to 64 characters in length.testRayCluster
displayReleaseVersionstringNoThe engine version of the Ray cluster.ray-1.0.0 (Ray 2.47.1, Python 3.12)
descriptionstringNoThe description of the Ray cluster.Ray Cluster for dev.
networkServiceNamestringNoThe name of the network connection.vpc
headSpecobjectNoThe configuration of the head node.
headSpec.queueNamestringNoThe queue name.root_queue
headSpec.cpustringNoThe number of CPU cores for the head node.2
headSpec.memorystringNoThe memory size of the head node, in GiB.8Gi
headSpec.enableAutoScalingbooleanNoSpecifies whether to enable automatic scaling for worker nodes.false
headSpec.idleTimeoutSecondsintegerNoThe idle timeout period in seconds for worker nodes when automatic scaling is enabled.60
headSpec.gpuSpecstringNoecs.gn6i-c4g1.xlarge
workerSpecarray<object>NoThe configuration of worker nodes. You can specify up to 50 worker groups.
workerSpec[].groupNamestringNoThe name of the worker group.WorkerGroup1
workerSpec[].workerTypestringNoThe worker type.CPU
workerSpec[].replicaintegerNoThe number of worker nodes. Minimum value: 1.2
workerSpec[].queueNamestringNoThe queue name.root_queue
workerSpec[].cpustringNoThe number of CPU cores for each worker node.4
workerSpec[].memorystringNoThe memory size of each worker node, in GiB.16Gi
workerSpec[].minReplicaintegerNoThe minimum number of worker nodes for automatic scaling. Minimum value: 1. This value must be less than or equal to maxReplica.1
workerSpec[].maxReplicaintegerNoThe maximum number of worker nodes for automatic scaling. Minimum value: 1.10
workerSpec[].gpuSpecstringNoecs.gn6i-c4g1.xlarge
workerSpec[].extraParamstringNoAdditional parameters in JSON format.{}
volumeIdsarrayNo
volumeIds[]stringNovol-1234567890

Response elements

ElementTypeDescriptionExample
requestIdstringThe request ID.DD6B1B2A-5837-5237-ABE4-FF0C8944
clusterIdstringThe ID of the Ray cluster.ray-k7nm8ahl5te4tg91

Examples

Sample success response in JSON format:

{
  "requestId": "DD6B1B2A-5837-5237-ABE4-FF0C8944",
  "clusterId": "ray-k7nm8ahl5te4tg91"
}

Error codes

For a complete list of error codes, see Error codes.

Release notes

For a complete list of release notes, see Release notes.