---
title: "Submit Job"
method: POST
path: "/api/jobs"
---

# Submit Job

`POST /api/jobs`

Submit a job to the cluster.

## Request body

- JobSubmitRequest
  - `entrypoint` string, required — Command to start execution, ex: 'python script.py'
  - `submission_id` string — Optional submission_id to specify for the job.
  - `job_id` string — Optional job_id to specify for the job.
  - `runtime_env` object — The runtime environment for the job.
  - `metadata` object — Arbitrary user-provided metadata for the job.
  - `entrypoint_num_cpus` number — Number of CPUs to allocate for the execution of the entrypoint command, separately from any Ray tasks or actors that are created by it.
  - `entrypoint_num_gpus` number — Number of GPUs to allocate for the execution of the entrypoint command, separately from any Ray tasks or actors that are created by it.
  - `entrypoint_memory` integer — The quantity of memory to reserve for the execution of the entrypoint command, separately from any tasks or actors launched by it.
  - `entrypoint_resources` object — The quantity of various custom resources to allocate for the execution of the entrypoint command, separately from any Ray tasks or actors that are created by it.

## Response `200`

The ID of the submitted job.

- JobSubmitResponse
  - `job_id` string — The ID of the submitted job.
  - `submission_id` string — The ID of the submitted job.

## Other responses

- `400` — A TypeError or ValueError was raised when submitting the job.
- `500` — An internal error occurred when submitting the job.

---

[API](https://skmtc.net/ray-project/apis/ray-jobs-api.md) · [All operations](https://skmtc.net/ray-project/apis/ray-jobs-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ray-project/ray-jobs-api/versions/ee557bc8498e/schema)
