POST
/
v1
/
accounts
/
{account_id}
/
batchJobs
curl --request POST \
  --url https://api.fireworks.ai/v1/accounts/{account_id}/batchJobs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "displayName": "<string>",
  "nodePoolId": "<string>",
  "environmentId": "<string>",
  "snapshotId": "<string>",
  "numRanks": 123,
  "envVars": {},
  "role": "<string>",
  "pythonExecutor": {
    "targetType": "TARGET_TYPE_UNSPECIFIED",
    "target": "<string>",
    "args": [
      "<string>"
    ]
  },
  "notebookExecutor": {
    "notebookFilename": "<string>"
  },
  "shellExecutor": {
    "command": "<string>"
  },
  "imageRef": "<string>",
  "annotations": {},
  "shared": true
}'
{
  "name": "<string>",
  "displayName": "<string>",
  "createTime": "2023-11-07T05:31:56Z",
  "startTime": "2023-11-07T05:31:56Z",
  "endTime": "2023-11-07T05:31:56Z",
  "createdBy": "<string>",
  "nodePoolId": "<string>",
  "environmentId": "<string>",
  "snapshotId": "<string>",
  "numRanks": 123,
  "envVars": {},
  "role": "<string>",
  "pythonExecutor": {
    "targetType": "TARGET_TYPE_UNSPECIFIED",
    "target": "<string>",
    "args": [
      "<string>"
    ]
  },
  "notebookExecutor": {
    "notebookFilename": "<string>"
  },
  "shellExecutor": {
    "command": "<string>"
  },
  "imageRef": "<string>",
  "annotations": {},
  "state": "STATE_UNSPECIFIED",
  "status": "<string>",
  "shared": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

account_id
string
required

The Account Id

Body

application/json
The properties of the batch job being created.
nodePoolId
string
required
displayName
string

Human-readable display name of the batch job. e.g. "My Batch Job" Must be fewer than 64 characters long.

environmentId
string

The ID of the environment that this batch job should use. e.g. my-env If specified, image_ref must not be specified.

snapshotId
string

The ID of the snapshot used by this batch job. If specified, environment_id must be specified and image_ref must not be specified.

numRanks
integer

For GPU node pools: one GPU per rank w/ host packing, for CPU node pools: one host per rank.

envVars
object

Environment variables to be passed during this job's execution.

role
string

The ARN of the AWS IAM role that the batch job should assume. If not specified, the connection will fall back to the node pool's node_role.

pythonExecutor
object

Execute a Python process.

notebookExecutor
object

Execute a notebook file.

shellExecutor
object

Execute a shell script.

imageRef
string

The container image used by this job. If specified, environment_id and snapshot_id must not be specified.

annotations
object

Arbitrary, user-specified metadata. Keys and values must adhere to Kubernetes constraints: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set Additionally, the "fireworks.ai/" prefix is reserved.

state
enum<string>
default:STATE_UNSPECIFIED

The current state of the batch job.

Available options:
STATE_UNSPECIFIED,
CREATING,
QUEUED,
PENDING,
RUNNING,
COMPLETED,
FAILED,
CANCELLING,
CANCELLED,
DELETING
shared
boolean

Whether the batch job is shared with all users in the account. This allows all users to update, delete, clone, and create environments using the batch job.

Response

200 - application/json
A successful response.
nodePoolId
string
required
name
string
displayName
string

Human-readable display name of the batch job. e.g. "My Batch Job" Must be fewer than 64 characters long.

createTime
string

The creation time of the batch job.

startTime
string

The time when the batch job started running.

endTime
string

The time when the batch job completed, failed, or was cancelled.

createdBy
string

The email address of the user who created this batch job.

environmentId
string

The ID of the environment that this batch job should use. e.g. my-env If specified, image_ref must not be specified.

snapshotId
string

The ID of the snapshot used by this batch job. If specified, environment_id must be specified and image_ref must not be specified.

numRanks
integer

For GPU node pools: one GPU per rank w/ host packing, for CPU node pools: one host per rank.

envVars
object

Environment variables to be passed during this job's execution.

role
string

The ARN of the AWS IAM role that the batch job should assume. If not specified, the connection will fall back to the node pool's node_role.

pythonExecutor
object

Execute a Python process.

notebookExecutor
object

Execute a notebook file.

shellExecutor
object

Execute a shell script.

imageRef
string

The container image used by this job. If specified, environment_id and snapshot_id must not be specified.

annotations
object

Arbitrary, user-specified metadata. Keys and values must adhere to Kubernetes constraints: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set Additionally, the "fireworks.ai/" prefix is reserved.

state
enum<string>
default:STATE_UNSPECIFIED

The current state of the batch job.

Available options:
STATE_UNSPECIFIED,
CREATING,
QUEUED,
PENDING,
RUNNING,
COMPLETED,
FAILED,
CANCELLING,
CANCELLED,
DELETING
status
string

Detailed information about the current status of the batch job.

shared
boolean

Whether the batch job is shared with all users in the account. This allows all users to update, delete, clone, and create environments using the batch job.