Skip to content

Create Model Invocation Job

bedrock_create_model_invocation_job R Documentation

Creates a batch inference job to invoke a model on multiple prompts

Description

Creates a batch inference job to invoke a model on multiple prompts. Format your data according to Format your inference data and upload it to an Amazon S3 bucket. For more information, see Process multiple prompts with batch inference.

The response returns a jobArn that you can use to stop or get details about the job.

Usage

bedrock_create_model_invocation_job(jobName, roleArn,
  clientRequestToken, modelId, inputDataConfig, outputDataConfig,
  timeoutDurationInHours, tags)

Arguments

jobName

[required] A name to give the batch inference job.

roleArn

[required] The Amazon Resource Name (ARN) of the service role with permissions to carry out and manage batch inference. You can use the console to create a default service role or follow the steps at Create a service role for batch inference.

clientRequestToken

A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.

modelId

[required] The unique identifier of the foundation model to use for the batch inference job.

inputDataConfig

[required] Details about the location of the input to the batch inference job.

outputDataConfig

[required] Details about the location of the output of the batch inference job.

timeoutDurationInHours

The number of hours after which to force the batch inference job to time out.

tags

Any tags to associate with the batch inference job. For more information, see Tagging Amazon Bedrock resources.

Value

A list with the following syntax:

list(
  jobArn = "string"
)

Request syntax

svc$create_model_invocation_job(
  jobName = "string",
  roleArn = "string",
  clientRequestToken = "string",
  modelId = "string",
  inputDataConfig = list(
    s3InputDataConfig = list(
      s3InputFormat = "JSONL",
      s3Uri = "string"
    )
  ),
  outputDataConfig = list(
    s3OutputDataConfig = list(
      s3Uri = "string",
      s3EncryptionKeyId = "string"
    )
  ),
  timeoutDurationInHours = 123,
  tags = list(
    list(
      key = "string",
      value = "string"
    )
  )
)