Skip to main content
POST
/
api
/
jobs
Submit a job
curl --request POST \
  --url http://{host}:{port}/api/jobs/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "entrypoint": "python my_script.py",
  "submission_id": "<string>",
  "runtime_env": {
    "pip": [
      "numpy"
    ],
    "working_dir": "s3://bucket/code.zip"
  },
  "metadata": {},
  "entrypoint_num_cpus": 123,
  "entrypoint_num_gpus": 123,
  "entrypoint_memory": 123,
  "entrypoint_resources": {}
}
'
{
  "submission_id": "raysubmit_abc123"
}

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
entrypoint
string
required

Shell command to run on the head node.

Example:

"python my_script.py"

submission_id
string | null

Optional client-supplied ID. If omitted, the cluster generates one.

runtime_env
object

Runtime environment installed before the entrypoint runs.

Example:
{
"pip": ["numpy"],
"working_dir": "s3://bucket/code.zip"
}
metadata
object

Free-form metadata attached to the job.

entrypoint_num_cpus
number | null
entrypoint_num_gpus
number | null
entrypoint_memory
integer | null
entrypoint_resources
object

Response

Job submitted

submission_id
string
Example:

"raysubmit_abc123"