Amazon SageMaker Sagemaker Compilation Job API
The Sagemaker Compilation Job API from Amazon SageMaker — 5 operation(s) for sagemaker compilation job.
The Sagemaker Compilation Job API from Amazon SageMaker — 5 operation(s) for sagemaker compilation job.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/amazon-sagemaker:amazon-sagemaker-compilation-job-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.1.0
info:
title: Amazon SageMaker Service Compilation Job API
version: '2017-07-24'
description: Generated from AWS's published Smithy model for Amazon SageMaker Service. 5 operation(s).
contact:
name: Amazon Web Services
url: https://aws.amazon.com/contact-us/
license:
name: Apache 2.0
identifier: Apache-2.0
url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://api.sagemaker.{region}.amazonaws.com
variables:
region:
default: us-east-1
security:
- sigv4: []
paths:
/#CreateCompilationJob:
post:
operationId: CreateCompilationJob
summary: Create Compilation Job
description: 'Starts a model compilation job. After the model has been compiled, Amazon SageMaker AI saves the resulting
model artifacts to an Amazon Simple Storage Service (Amazon S3) bucket that you specify. If you choose to host your
model using Amazon SageMaker AI hosting services, you can use the resulting model artifacts as part of the model.
You can also use the artifacts with Amazon Web Services IoT Greengrass. In that case, deploy them as an ML resource.
In the request body, you provide the following: A name for the compilation job Information about the input model artifacts
The output location for the compiled model and the device (target) that the model runs on The Amazon Resource Name
(ARN) of the IAM role that Amazon SageMaker AI assumes to perform the model compilation job. You can also provide
a Tag to track the model compilation job''s resource use and costs. The response body contains the CompilationJobArn
for the compiled job. To stop a model compilation job, use StopCompilationJob. To get information about a particular
model compilation job, use DescribeCompilationJob. To get information about multiple model compilation jobs, use ListCompilationJobs.'
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/CreateCompilationJobResponse'
'400':
description: ResourceInUse; ResourceLimitExceeded
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ResourceInUse'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- SageMaker.CreateCompilationJob
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/CreateCompilationJobRequest'
tags:
- Compilation Job
/#DeleteCompilationJob:
post:
operationId: DeleteCompilationJob
summary: Delete Compilation Job
description: Deletes the specified compilation job. This action deletes only the compilation job resource in Amazon
SageMaker AI. It doesn't delete other resources that are related to that job, such as the model artifacts that the
job creates, the compilation logs in CloudWatch, the compiled model, or the IAM role. You can delete a compilation
job only if its current status is COMPLETED, FAILED, or STOPPED. If the job status is STARTING or INPROGRESS, stop
the job, and then delete it after its status becomes STOPPED.
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
type: string
'400':
description: ResourceNotFound
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ResourceNotFound'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- SageMaker.DeleteCompilationJob
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/DeleteCompilationJobRequest'
tags:
- Compilation Job
/#DescribeCompilationJob:
post:
operationId: DescribeCompilationJob
summary: Describe Compilation Job
description: Returns information about a model compilation job. To create a model compilation job, use CreateCompilationJob.
To get information about multiple model compilation jobs, use ListCompilationJobs.
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/DescribeCompilationJobResponse'
'400':
description: ResourceNotFound
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ResourceNotFound'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- SageMaker.DescribeCompilationJob
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/DescribeCompilationJobRequest'
tags:
- Compilation Job
/#ListCompilationJobs:
post:
operationId: ListCompilationJobs
summary: List Compilation Jobs
description: Lists model compilation jobs that satisfy various filters. To create a model compilation job, use CreateCompilationJob.
To get information about a particular model compilation job you have created, use DescribeCompilationJob.
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ListCompilationJobsResponse'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- SageMaker.ListCompilationJobs
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ListCompilationJobsRequest'
tags:
- Compilation Job
/#StopCompilationJob:
post:
operationId: StopCompilationJob
summary: Stop Compilation Job
description: Stops a model compilation job. To stop a job, Amazon SageMaker AI sends the algorithm the SIGTERM signal.
This gracefully shuts the job down. If the job hasn't stopped, it sends the SIGKILL signal. When it receives a StopCompilationJob
request, Amazon SageMaker AI changes the CompilationJobStatus of the job to Stopping. After Amazon SageMaker stops
the job, it sets the CompilationJobStatus to Stopped.
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
type: string
'400':
description: ResourceNotFound
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ResourceNotFound'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- SageMaker.StopCompilationJob
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/StopCompilationJobRequest'
tags:
- Compilation Job
components:
securitySchemes:
sigv4:
type: apiKey
in: header
name: Authorization
description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
x-aws-sigv4:
signingName: sagemaker
schemas:
CompilationJobSummary:
type: object
properties:
CompilationJobName:
type: string
description: The name of the model compilation job that you want a summary for.
CompilationJobArn:
type: string
description: The Amazon Resource Name (ARN) of the model compilation job.
CreationTime:
type: string
format: date-time
description: The time when the model compilation job was created.
CompilationStartTime:
type: string
format: date-time
description: The time when the model compilation job started.
CompilationEndTime:
type: string
format: date-time
description: The time when the model compilation job completed.
CompilationTargetDevice:
type: string
enum:
- lambda
- ml_m4
- ml_m5
- ml_m6g
- ml_c4
- ml_c5
- ml_c6g
- ml_p2
- ml_p3
- ml_g4dn
- ml_inf1
- ml_inf2
- ml_trn1
- ml_eia2
- jetson_tx1
- jetson_tx2
- jetson_nano
- jetson_xavier
- rasp3b
- rasp4b
- imx8qm
- deeplens
- rk3399
- rk3288
- aisage
- sbe_c
- qcs605
- qcs603
- sitara_am57x
- amba_cv2
- amba_cv22
- amba_cv25
- x86_win32
- x86_win64
- coreml
- jacinto_tda4vm
- imx8mplus
description: The type of device that the model will run on after the compilation job has completed.
CompilationTargetPlatformOs:
type: string
enum:
- ANDROID
- LINUX
description: The type of OS that the model will run on after the compilation job has completed.
CompilationTargetPlatformArch:
type: string
enum:
- X86_64
- X86
- ARM64
- ARM_EABI
- ARM_EABIHF
description: The type of architecture that the model will run on after the compilation job has completed.
CompilationTargetPlatformAccelerator:
type: string
enum:
- INTEL_GRAPHICS
- MALI
- NVIDIA
- NNA
description: The type of accelerator that the model will run on after the compilation job has completed.
LastModifiedTime:
type: string
format: date-time
description: The time when the model compilation job was last modified.
CompilationJobStatus:
type: string
enum:
- INPROGRESS
- COMPLETED
- FAILED
- STARTING
- STOPPING
- STOPPED
description: The status of the model compilation job.
required:
- CompilationJobName
- CompilationJobArn
- CreationTime
- CompilationJobStatus
CreateCompilationJobRequest:
type: object
properties:
CompilationJobName:
type: string
description: A name for the model compilation job. The name must be unique within the Amazon Web Services Region
and within your Amazon Web Services account.
RoleArn:
type: string
description: 'The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker AI to perform tasks on
your behalf. During model compilation, Amazon SageMaker AI needs your permission to: Read input data from an S3
bucket Write model artifacts to an S3 bucket Write logs to Amazon CloudWatch Logs Publish metrics to Amazon CloudWatch
You grant permissions for all of these tasks to an IAM role. To pass this role to Amazon SageMaker AI, the caller
of this API must have the iam:PassRole permission. For more information, see Amazon SageMaker AI Roles.'
ModelPackageVersionArn:
type: string
description: The Amazon Resource Name (ARN) of a versioned model package. Provide either a ModelPackageVersionArn
or an InputConfig object in the request syntax. The presence of both objects in the CreateCompilationJob request
will return an exception.
InputConfig:
$ref: '#/components/schemas/InputConfig'
OutputConfig:
$ref: '#/components/schemas/OutputConfig'
VpcConfig:
$ref: '#/components/schemas/NeoVpcConfig'
StoppingCondition:
$ref: '#/components/schemas/StoppingCondition'
Tags:
type: array
items:
$ref: '#/components/schemas/Tag'
description: An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different
ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.
required:
- CompilationJobName
- RoleArn
- OutputConfig
- StoppingCondition
CreateCompilationJobResponse:
type: object
properties:
CompilationJobArn:
type: string
description: 'If the action is successful, the service sends back an HTTP 200 response. Amazon SageMaker AI returns
the following data in JSON format: CompilationJobArn: The Amazon Resource Name (ARN) of the compiled job.'
required:
- CompilationJobArn
DeleteCompilationJobRequest:
type: object
properties:
CompilationJobName:
type: string
description: The name of the compilation job to delete.
required:
- CompilationJobName
DerivedInformation:
type: object
properties:
DerivedDataInputConfig:
type: string
description: The data input configuration that SageMaker Neo automatically derived for the model. When SageMaker
Neo derives this information, you don't need to specify the data input configuration when you create a compilation
job.
DescribeCompilationJobRequest:
type: object
properties:
CompilationJobName:
type: string
description: The name of the model compilation job that you want information about.
required:
- CompilationJobName
DescribeCompilationJobResponse:
type: object
properties:
CompilationJobName:
type: string
description: The name of the model compilation job.
CompilationJobArn:
type: string
description: The Amazon Resource Name (ARN) of the model compilation job.
CompilationJobStatus:
type: string
enum:
- INPROGRESS
- COMPLETED
- FAILED
- STARTING
- STOPPING
- STOPPED
description: The status of the model compilation job.
CompilationStartTime:
type: string
format: date-time
description: The time when the model compilation job started the CompilationJob instances. You are billed for the
time between this timestamp and the timestamp in the CompilationEndTime field. In Amazon CloudWatch Logs, the
start time might be later than this time. That's because it takes time to download the compilation job, which
depends on the size of the compilation job container.
CompilationEndTime:
type: string
format: date-time
description: The time when the model compilation job on a compilation job instance ended. For a successful or stopped
job, this is when the job's model artifacts have finished uploading. For a failed job, this is when Amazon SageMaker
AI detected that the job failed.
StoppingCondition:
$ref: '#/components/schemas/StoppingCondition'
InferenceImage:
type: string
description: The inference image to use when compiling a model. Specify an image only if the target device is a
cloud instance.
ModelPackageVersionArn:
type: string
description: The Amazon Resource Name (ARN) of the versioned model package that was provided to SageMaker Neo when
you initiated a compilation job.
CreationTime:
type: string
format: date-time
description: The time that the model compilation job was created.
LastModifiedTime:
type: string
format: date-time
description: The time that the status of the model compilation job was last modified.
FailureReason:
type: string
description: If a model compilation job failed, the reason it failed.
ModelArtifacts:
$ref: '#/components/schemas/ModelArtifacts'
ModelDigests:
$ref: '#/components/schemas/ModelDigests'
RoleArn:
type: string
description: The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI assumes to perform the model
compilation job.
InputConfig:
$ref: '#/components/schemas/InputConfig'
OutputConfig:
$ref: '#/components/schemas/OutputConfig'
VpcConfig:
$ref: '#/components/schemas/NeoVpcConfig'
DerivedInformation:
$ref: '#/components/schemas/DerivedInformation'
required:
- CompilationJobName
- CompilationJobArn
- CompilationJobStatus
- StoppingCondition
- CreationTime
- LastModifiedTime
- FailureReason
- ModelArtifacts
- RoleArn
- InputConfig
- OutputConfig
InputConfig:
type: object
properties:
S3Uri:
type: string
description: The S3 path where the model artifacts, which result from model training, are stored. This path must
point to a single gzip compressed tar archive (.tar.gz suffix).
DataInputConfig:
type: string
description: 'Specifies the name and shape of the expected data inputs for your trained model with a JSON dictionary
form. The data inputs are Framework specific. TensorFlow: You must specify the name and shape (NHWC format) of
the expected data inputs using a dictionary format for your trained model. The dictionary formats required for
the console and CLI are different. Examples for one input: If using the console, {"input":[1,1024,1024,3]} If
using the CLI, {\"input\":[1,1024,1024,3]} Examples for two inputs: If using the console, {"data1": [1,28,28,1],
"data2":[1,28,28,1]} If using the CLI, {\"data1\": ['
Framework:
type: string
enum:
- TENSORFLOW
- KERAS
- MXNET
- ONNX
- PYTORCH
- XGBOOST
- TFLITE
- DARKNET
- SKLEARN
description: 'Identifies the framework in which the model was trained. For example: TENSORFLOW.'
FrameworkVersion:
type: string
description: Specifies the framework version to use. This API field is only supported for the MXNet, PyTorch, TensorFlow
and TensorFlow Lite frameworks. For information about framework versions supported for cloud targets and edge
devices, see Cloud Supported Instance Types and Frameworks and Edge Supported Frameworks.
required:
- S3Uri
- Framework
ListCompilationJobsRequest:
type: object
properties:
NextToken:
type: string
description: If the result of the previous ListCompilationJobs request was truncated, the response includes a NextToken.
To retrieve the next set of model compilation jobs, use the token in the next request.
MaxResults:
type: integer
description: The maximum number of model compilation jobs to return in the response.
CreationTimeAfter:
type: string
format: date-time
description: A filter that returns the model compilation jobs that were created after a specified time.
CreationTimeBefore:
type: string
format: date-time
description: A filter that returns the model compilation jobs that were created before a specified time.
LastModifiedTimeAfter:
type: string
format: date-time
description: A filter that returns the model compilation jobs that were modified after a specified time.
LastModifiedTimeBefore:
type: string
format: date-time
description: A filter that returns the model compilation jobs that were modified before a specified time.
NameContains:
type: string
description: A filter that returns the model compilation jobs whose name contains a specified string.
StatusEquals:
type: string
enum:
- INPROGRESS
- COMPLETED
- FAILED
- STARTING
- STOPPING
- STOPPED
description: A filter that retrieves model compilation jobs with a specific CompilationJobStatus status.
SortBy:
type: string
enum:
- Name
- CreationTime
- Status
description: The field by which to sort results. The default is CreationTime.
SortOrder:
type: string
enum:
- Ascending
- Descending
description: The sort order for results. The default is Ascending.
ListCompilationJobsResponse:
type: object
properties:
CompilationJobSummaries:
type: array
items:
$ref: '#/components/schemas/CompilationJobSummary'
description: An array of CompilationJobSummary objects, each describing a model compilation job.
NextToken:
type: string
description: If the response is truncated, Amazon SageMaker AI returns this NextToken. To retrieve the next set
of model compilation jobs, use this token in the next request.
required:
- CompilationJobSummaries
ModelArtifacts:
type: object
properties:
S3ModelArtifacts:
type: string
description: The path of the S3 object that contains the model artifacts. For example, s3://bucket-name/keynameprefix/model.tar.gz.
required:
- S3ModelArtifacts
ModelDigests:
type: object
properties:
ArtifactDigest:
type: string
description: Provides a hash value that uniquely identifies the stored model artifacts.
NeoVpcConfig:
type: object
properties:
SecurityGroupIds:
type: array
items:
type: string
description: The VPC security group IDs. IDs have the form of sg-xxxxxxxx. Specify the security groups for the VPC
that is specified in the Subnets field.
Subnets:
type: array
items:
type: string
description: The ID of the subnets in the VPC that you want to connect the compilation job to for accessing the
model in Amazon S3.
required:
- SecurityGroupIds
- Subnets
OutputConfig:
type: object
properties:
S3OutputLocation:
type: string
description: Identifies the S3 bucket where you want Amazon SageMaker AI to store the model artifacts. For example,
s3://bucket-name/key-name-prefix.
TargetDevice:
type: string
enum:
- lambda
- ml_m4
- ml_m5
- ml_m6g
- ml_c4
- ml_c5
- ml_c6g
- ml_p2
- ml_p3
- ml_g4dn
- ml_inf1
- ml_inf2
- ml_trn1
- ml_eia2
- jetson_tx1
- jetson_tx2
- jetson_nano
- jetson_xavier
- rasp3b
- rasp4b
- imx8qm
- deeplens
- rk3399
- rk3288
- aisage
- sbe_c
- qcs605
- qcs603
- sitara_am57x
- amba_cv2
- amba_cv22
- amba_cv25
- x86_win32
- x86_win64
- coreml
- jacinto_tda4vm
- imx8mplus
description: Identifies the target device or the machine learning instance that you want to run your model on after
the compilation has completed. Alternatively, you can specify OS, architecture, and accelerator using TargetPlatform
fields. It can be used instead of TargetPlatform. Currently ml_trn1 is available only in US East (N. Virginia)
Region, and ml_inf2 is available only in US East (Ohio) Region.
TargetPlatform:
$ref: '#/components/schemas/TargetPlatform'
CompilerOptions:
type: string
description: 'Specifies additional parameters for compiler options in JSON format. The compiler options are TargetPlatform
specific. It is required for NVIDIA accelerators and highly recommended for CPU compilations. For any other cases,
it is optional to specify CompilerOptions. DTYPE: Specifies the data type for the input. When compiling for ml_*
(except for ml_inf) instances using PyTorch framework, provide the data type (dtype) of the model''s input. "float32"
is used if "DTYPE" is not specified. Options for data type are: float32: Use either "float" or "float32". int64:
Use either "int64" or "long". For'
KmsKeyId:
type: string
description: 'The Amazon Web Services Key Management Service key (Amazon Web Services KMS) that Amazon SageMaker
AI uses to encrypt your output models with Amazon S3 server-side encryption after compilation job. If you don''t
provide a KMS key ID, Amazon SageMaker AI uses the default KMS key for Amazon S3 for your role''s account. For
more information, see KMS-Managed Encryption Keys in the Amazon Simple Storage Service Developer Guide. The KmsKeyId
can be any of the following formats: Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-12345678'
required:
- S3OutputLocation
ResourceInUse:
type: object
properties:
Message:
type: string
ResourceNotFound:
type: object
properties:
Message:
type: string
StopCompilationJobRequest:
type: object
properties:
CompilationJobName:
type: string
description: The name of the model compilation job to stop.
required:
- CompilationJobName
StoppingCondition:
type: object
properties:
MaxRuntimeInSeconds:
type: integer
description: The maximum length of time, in seconds, that a training or compilation job can run before it is stopped.
For compilation jobs, if the job does not complete during this time, a TimeOut error is generated. We recommend
starting with 900 seconds and increasing as necessary based on your model. For all other jobs, if the job does
not complete during this time, SageMaker ends the job. When RetryStrategy is specified in the job request, MaxRuntimeInSeconds
specifies the maximum time for all of the attempts in total, not each individual attempt. The default value is
1 day. The maximum value is 28 day
MaxWaitTimeInSeconds:
type: integer
description: The maximum length of time, in seconds, that a managed Spot training job has to complete. It is the
amount of time spent waiting for Spot capacity plus the amount of time the job can run. It must be equal to or
greater than MaxRuntimeInSeconds. If the job does not complete during this time, SageMaker ends the job. When
RetryStrategy is specified in the job request, MaxWaitTimeInSeconds specifies the maximum time for all of the
attempts in total, not each individual attempt.
MaxPendingTimeInSeconds:
type: integer
description: 'The maximum length of time, in seconds, that a training or compilation job can be pending before it
is stopped. When working with training jobs that use capacity from training plans, not all Pending job states
count against the MaxPendingTimeInSeconds limit. The following scenarios do not increment the MaxPendingTimeInSeconds
counter: The plan is in a Scheduled state: Jobs queued (in Pending status) before a plan''s start date (waiting
for scheduled start time) Between capacity reservations: Jobs temporarily back to Pending status between two capacity
reservation periods MaxPendingTimeInSeconds'
Tag:
type: object
properties:
Key:
type: string
description: The tag key. Tag keys must be unique per resource.
Value:
type: string
description: The tag value.
required:
- Key
- Value
TargetPlatform:
type: object
properties:
Os:
type: string
enum:
- ANDROID
- LINUX
description: 'Specifies a target platform OS. LINUX: Linux-based operating systems. ANDROID: Android operating systems.
Android API level can be specified using the ANDROID_PLATFORM compiler option. For example, "CompilerOptions":
{''ANDROID_PLATFORM'': 28}'
Arch:
type: string
enum:
- X86_64
- X86
- ARM64
- ARM_EABI
- ARM_EABIHF
description: 'Specifies a target platform architecture. X86_64: 64-bit version of the x86 instruction set. X86:
32-bit version of the x86 instruction set. ARM64: ARMv8 64-bit CPU. ARM_EABIHF: ARMv7 32-bit, Hard Float. ARM_EABI:
ARMv7 32-bit, Soft Float. Used by Android 32-bit ARM platform.'
Accelerator:
type: string
enum:
- INTEL_GRAPHICS
- MALI
- NVIDIA
- NNA
description: 'Specifies a target platform accelerator (optional). NVIDIA: Nvidia graphics processing unit. It also
requires gpu-code, trt-ver, cuda-ver compiler options MALI: ARM Mali graphics processor INTEL_GRAPHICS: Integrated
Intel graphics'
required:
- Os
- Arch
x-provenance:
method: harvested
publisher: Amazon Web Services
source: https://raw.githubusercontent.com/aws/api-models-aws/582e55931c45b944739742a2c1620b6026dd2d13/models/sagemaker/service/2017-07-24/sagemaker-2017-07-24.json
note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)