Skip to main content
PUT
/
api
/
serve
/
applications
Apply Serve config
curl --request PUT \
  --url http://{host}:{port}/api/serve/applications/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "applications": [
    {
      "name": "search",
      "import_path": "my_module:app",
      "route_prefix": "/",
      "args": {},
      "runtime_env": {},
      "deployments": [
        {
          "name": "<string>",
          "num_replicas": 1,
          "max_ongoing_requests": 2,
          "ray_actor_options": {
            "num_cpus": 2,
            "num_gpus": 1
          },
          "autoscaling_config": {
            "min_replicas": 1,
            "max_replicas": 2,
            "initial_replicas": 1,
            "target_ongoing_requests": 1,
            "metrics_interval_s": 1,
            "look_back_period_s": 1,
            "smoothing_factor": 1,
            "downscale_delay_s": 1,
            "upscale_delay_s": 1
          },
          "user_config": {},
          "graceful_shutdown_timeout_s": 1,
          "health_check_period_s": 1,
          "health_check_timeout_s": 1
        }
      ]
    }
  ],
  "proxy_location": "EveryNode",
  "http_options": {
    "host": "0.0.0.0",
    "port": 8000,
    "request_timeout_s": 123
  },
  "grpc_options": {
    "port": 9000,
    "grpc_servicer_functions": [
      "<string>"
    ]
  }
}
'
{
  "error": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://ray-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Body

application/json
applications
object[]
required
proxy_location
enum<string>
default:EveryNode
Available options:
EveryNode,
HeadOnly,
Disabled
http_options
object
grpc_options
object

Response

Config accepted