v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-143021,9861.6 MB

Creates a model package that you can use to create SageMaker models or list on Amazon Web Services Marketplace, or a versioned model that is part of a model group. Buyers can subscribe to model packages listed on Amazon Web Services Marketplace to create models in SageMaker.

To create a model package by specifying a Docker container that contains your inference code and the Amazon S3 location of your model artifacts, provide values for InferenceSpecification. To create a model from an algorithm resource that you created or subscribed to in Amazon Web Services Marketplace, provide a value for SourceAlgorithmSpecification.

There are two types of model packages:

  • Versioned - a model that is part of a model group in the model registry.

  • Unversioned - a model package that is not part of a model group.

post/#X-Amz-Target=SageMaker.CreateModelPackage

Headers

X-Amz-Target'SageMaker.CreateModelPackage' required

Request body

ModelPackageNamestring
<p>The name of the model package. The name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen).</p> <p>This parameter is required for unversioned models. It is not applicable to versioned models.</p>
ModelPackageGroupNamestring
<p>The name or Amazon Resource Name (ARN) of the model package group that this model version belongs to.</p> <p>This parameter is required for versioned models, and does not apply to unversioned models.</p>
ModelPackageDescriptionstring

A description of the model package.

CertifyForMarketplaceboolean
<p>Whether to certify the model package for listing on Amazon Web Services Marketplace.</p> <p>This parameter is optional for unversioned models, and does not apply to versioned models.</p>
ModelApprovalStatus'Approved' | 'Rejected' | 'PendingManualApproval'
<p>Whether the model is approved for deployment.</p> <p>This parameter is optional for versioned models, and does not apply to unversioned models.</p> <p>For versioned models, the value of this parameter must be set to <code>Approved</code> to deploy the model.</p>
ClientTokenstring

A unique token that guarantees that the call to this API is idempotent.

CustomerMetadataPropertiesobject

The metadata properties associated with the model package versions.

Domainstring

The machine learning domain of your model package and its components. Common machine learning domains include computer vision and natural language processing.

Taskstring
<p>The machine learning task your model package accomplishes. Common machine learning tasks include object detection and image classification. The following tasks are supported by Inference Recommender: <code>"IMAGE_CLASSIFICATION"</code> | <code>"OBJECT_DETECTION"</code> | <code>"TEXT_GENERATION"</code> |<code>"IMAGE_SEGMENTATION"</code> | <code>"FILL_MASK"</code> | <code>"CLASSIFICATION"</code> | <code>"REGRESSION"</code> | <code>"OTHER"</code>.</p> <p>Specify "OTHER" if none of the tasks listed fit your use case.</p>
SamplePayloadUrlstring

The Amazon Simple Storage Service (Amazon S3) path where the sample payload is stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix). This archive can hold multiple files that are all equally used in the load test. Each file in the archive must satisfy the size constraints of the <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html#API_runtime_InvokeEndpoint_RequestSyntax">InvokeEndpoint</a> call.

Response

Success

ModelPackageArnstring required

The Amazon Resource Name (ARN) of the new model package.