---
title: "Creates a job definition in your organization from the definition's latest completed revision and starts a job on its audience with your dataset; every call creates a new job definition and job."
method: POST
path: "/job/definition/{definitionId}/run"
tags: ["Job"]
---

# Creates a job definition in your organization from the definition's latest completed revision and starts a job on its audience with your dataset; every call creates a new job definition and job.

`POST /job/definition/{definitionId}/run`

## Request

- Base URL: `https://api.rapidata.ai`
- URL: `https://api.rapidata.ai/job/definition/{definitionId}/run`
- Auth: one of:
  - OpenID Connect (`https://auth.rapidata.ai/.well-known/openid-configuration`, scopes: `job:write`)
  - OpenID Connect (`https://auth.rapidata.ai/.well-known/openid-configuration`, scopes: `api`)
- TypeScript: <https://skmtc.dev/rapidata/apis/rapidata-api/docs/job/definition/:definitionId/run/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `definitionId` string, required

## Request body

- RunJobDefinitionEndpointInput
  - `name` string, required: The name of the job and of the job definition the call creates.
  - `datasetId` string, required: A dataset you can read, fully uploaded: each datapoint's files under asset and, when the definition shows a prompt, its prompt under context.
  - `aName` string, nullable: The name shown instead of A for the first file of every datapoint. Send it with bName.
  - `bName` string, nullable: The name shown instead of B for the second file of every datapoint. Send it with aName.

## Response `200`

OK

- RunJobDefinitionEndpointOutput
  - `jobId` string, required: The id of the started job.
  - `definitionId` string, required: The id of the created job definition. Run it again to keep these settings.
  - `costWarning` RunJobDefinitionEndpointCostWarning
    - `estimatedCost` number, double, required
    - `availableBalance` number, double, required
    - `shortfall` number, double, required

## Other responses

- `400`: Bad Request
- `401`: Unauthenticated
- `403`: Forbidden

## Changes

- **2026-11-12** `2a00c6e19a13`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/rapidata/apis/rapidata-api/changes/job/definition/:definitionId/run/post.md)

---

[API](https://skmtc.dev/rapidata/apis/rapidata-api.md) - [All operations](https://skmtc.dev/rapidata/apis/rapidata-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rapidata/apis/rapidata-api/revisions/2a00c6e19a13?raw)
