Anyscale REST API
Scalable ML infrastructure for Ray workloads
Anyscale provides a unified platform for building, deploying, and managing distributed machine learning applications using Ray. The API enables developers to programmatically create compute clusters, deploy ML models, manage workloads, and monitor distributed training jobs. It's designed for teams scaling from prototypes to production ML systems with complex distributed computing requirements.
https://api.anyscale.com/v2
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /clusters | List all Ray clusters in your organization, returning cluster IDs, states, and compute configurations. |
| POST | /clusters | Create a new Ray cluster with specified compute resources |
| GET | /clusters/{cluster_id} | Get details about a specific Ray cluster including node count, runtime version, and current state. |
| DELETE | /clusters/{cluster_id} | Terminate a running Ray cluster, requiring cluster_id in the path. |
| POST | /services | Deploy a Ray Serve application as a managed service |
| GET | /services | List all deployed Ray Serve services with their endpoints and health status. |
| GET | /services/{service_id} | Get details and status of a deployed service including replicas, routes, and deployment config. |
| PATCH | /services/{service_id} | Update a deployed service configuration such as replicas, autoscaling, or resource limits. |
| DELETE | /services/{service_id} | Delete a deployed Ray Serve service, requiring service_id in the path. |
| POST | /jobs | Submit a Ray job for execution on a cluster, returning the job_id for tracking. |
| GET | /jobs | List all jobs and their execution status including pending, running, and completed states. |
| GET | /jobs/{job_id} | Get detailed information about a specific job including start time, duration, and exit code. |
| GET | /jobs/{job_id}/logs | Retrieve logs from a running or completed job |
| DELETE | /jobs/{job_id} | Cancel a running job, requiring job_id in the path and returning cancellation status. |
| GET | /compute-configs | List available compute configurations and instance types for cluster creation. |
Sponsor this page
AvailableReach developers actively building with Anyscale. See live pageview data and self-serve checkout — your slot goes live in minutes.
View inventory & pricing →Code Examples
curl -X POST https://api.anyscale.com/v2/clusters \
-H 'Authorization: Bearer anyscale_your_api_token_here' \
-H 'Content-Type: application/json' \
-d '{
"name": "ml-training-cluster",
"compute_config": "ml.m5.4xlarge",
"min_workers": 2,
"max_workers": 10,
"ray_version": "2.9.0"
}'
Use Anyscale from Claude / Cursor / ChatGPT
Get a hosted MCP endpoint for Anyscale. Paste your Anyscale API key, copy back one URL, drop it into Claude Desktop, Cursor, or any AI client that supports remote MCP. Your AI calls Anyscale directly with your credentials — no local install, works on mobile.
create_ray_cluster
Create and configure a new Ray cluster with specified compute resources and autoscaling parameters for distributed ML workloads
deploy_ml_service
Deploy a trained ML model as a scalable Ray Serve service with automatic load balancing and version management
submit_training_job
Submit a distributed training job to an Anyscale cluster with resource specifications and monitoring capabilities
monitor_cluster_metrics
Retrieve real-time metrics and resource utilization data from Ray clusters including CPU, GPU, and memory usage
manage_job_lifecycle
Start, stop, monitor, and retrieve logs from Ray jobs running on Anyscale infrastructure
Connect in 60 seconds
Paste your Anyscale key → get an MCP URL → paste into Claude/Cursor. Hosted by IOX, encrypted at rest.
Connect Anyscale to your AI →