---
title: "POST /model-invocation-job"
method: POST
path: "/model-invocation-job"
---

# POST /model-invocation-job

`POST /model-invocation-job`

Creates a batch inference job to invoke a model on multiple prompts. Format your data according to [Format your inference data](https://docs.aws.amazon.com/bedrock/latest/userguide/batch-inference-data) and upload it to an Amazon S3 bucket. For more information, see [Process multiple prompts with batch inference](https://docs.aws.amazon.com/bedrock/latest/userguide/batch-inference.html).

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

## Request body

- object
  - `jobName` string, required — A name to give the batch inference job.
  - `roleArn` string, 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 <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/batch-iam-sr.html">Create a service role for batch inference</a>.
  - `clientRequestToken` string — 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 <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.
  - `modelId` string, required — The unique identifier of the foundation model to use for the batch inference job.
  - `inputDataConfig` object, required — Details about the location of the input to the batch inference job.
    - `s3InputDataConfig` object — Contains the configuration of the S3 location of the input data.
      - `s3InputFormat` 'JSONL' — The format of the input data.
      - `s3Uri` string, required — The S3 location of the input data.
      - `s3BucketOwner` string — The ID of the Amazon Web Services account that owns the S3 bucket containing the input data.
  - `outputDataConfig` object, required — Contains the configuration of the S3 location of the output data.
    - `s3OutputDataConfig` object — Contains the configuration of the S3 location of the output data.
      - `s3Uri` string, required — The S3 location of the output data.
      - `s3EncryptionKeyId` string — The unique identifier of the key that encrypts the S3 location of the output data.
      - `s3BucketOwner` string — The ID of the Amazon Web Services account that owns the S3 bucket containing the output data.
  - `vpcConfig` object — The configuration of a virtual private cloud (VPC). For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/usingVPC.html">Protect your data using Amazon Virtual Private Cloud and Amazon Web Services PrivateLink</a>.
    - `subnetIds` SubnetId[] — An array of IDs for each subnet in the VPC to use.
    - `securityGroupIds` SecurityGroupId[] — An array of IDs for each security group in the VPC to use.
  - `timeoutDurationInHours` integer — The number of hours after which to force the batch inference job to time out.
  - `tags` Tag[] — Any tags to associate with the batch inference job. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/tagging.html">Tagging Amazon Bedrock resources</a>.
    - `key` string, required — Key for the tag.
    - `value` string, required — Value for the tag.
  - `modelInvocationType` 'InvokeModel' | 'Converse' — The invocation endpoint for ModelInvocationJob

## Response `200`

Success

- CreateModelInvocationJobResponse
  - `jobArn` string, required — The Amazon Resource Name (ARN) of the batch inference job.

## Other responses

- `480` — ResourceNotFoundException
- `481` — AccessDeniedException
- `482` — ValidationException
- `483` — ConflictException
- `484` — InternalServerException
- `485` — ServiceQuotaExceededException
- `486` — ThrottlingException

---

[API](https://skmtc.net/aws/apis/bedrock.md) · [All operations](https://skmtc.net/aws/apis/bedrock/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/bedrock/versions/3bc874e43ecd/schema)
