---
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.

## Changes

- **2023-11-28** `7a427e3e2ace` — 1 info
  - added the new optional request property `entrypoint_memory`
- **2022-11-21** `b3cef726cc26` — 1 warning
  - removed the request property `entrypoint_memory`

[Change history](https://skmtc.dev/ray-project/apis/ray-jobs-api/changes/api/jobs/post.md)

---

[API](https://skmtc.dev/ray-project/apis/ray-jobs-api.md) · [All operations](https://skmtc.dev/ray-project/apis/ray-jobs-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ray-project/ray-jobs-api/revisions/31cbfe84ad6c/schema)
