{
  "version":"2.0",
  "metadata":{
    "apiVersion":"2026-02-01",
    "auth":["aws.auth#sigv4"],
    "endpointPrefix":"job-runtime.sagemaker",
    "protocol":"rest-json",
    "protocols":["rest-json"],
    "serviceFullName":"Sagemaker Job Runtime Service",
    "serviceId":"SagemakerJobRuntime",
    "signatureVersion":"v4",
    "signingName":"sagemaker",
    "uid":"sagemakerjobruntime-2026-02-01"
  },
  "operations":{
    "CompleteRollout":{
      "name":"CompleteRollout",
      "http":{
        "method":"POST",
        "requestUri":"/complete-rollout",
        "responseCode":200
      },
      "input":{"shape":"CompleteRolloutRequest"},
      "output":{"shape":"CompleteRolloutResponse"},
      "errors":[
        {"shape":"ResourceNotFoundException"},
        {"shape":"InternalServiceError"},
        {"shape":"ValidationException"},
        {"shape":"ConflictException"},
        {"shape":"ServiceQuotaExceededException"},
        {"shape":"ThrottlingException"},
        {"shape":"AccessDeniedException"}
      ],
      "documentation":"<p>Marks a rollout as complete, indicating that no further turns will be appended to the trajectory. After calling this operation, the trajectory is sealed and eligible for reward submission via the UpdateReward operation.</p>",
      "idempotent":true
    },
    "Sample":{
      "name":"Sample",
      "http":{
        "method":"POST",
        "requestUri":"/sample",
        "responseCode":200
      },
      "input":{"shape":"SampleRequest"},
      "output":{"shape":"SampleResponse"},
      "errors":[
        {"shape":"ResourceNotFoundException"},
        {"shape":"InternalServiceError"},
        {"shape":"ValidationException"},
        {"shape":"ServiceQuotaExceededException"},
        {"shape":"ThrottlingException"},
        {"shape":"AccessDeniedException"}
      ],
      "documentation":"<p>Sends an inference request to the model during a job execution. The request and response bodies are forwarded to and from the model without modification. Each turn (prompt and response) is captured for later use.</p>"
    },
    "SampleWithResponseStream":{
      "name":"SampleWithResponseStream",
      "http":{
        "method":"POST",
        "requestUri":"/sample-with-response-stream",
        "responseCode":200
      },
      "input":{"shape":"SampleWithResponseStreamRequest"},
      "output":{"shape":"SampleWithResponseStreamResponse"},
      "errors":[
        {"shape":"ResourceNotFoundException"},
        {"shape":"InternalServiceError"},
        {"shape":"ValidationException"},
        {"shape":"ServiceQuotaExceededException"},
        {"shape":"ThrottlingException"},
        {"shape":"AccessDeniedException"}
      ],
      "documentation":"<p>Sends a streaming inference request to the model during a job execution. Returns the response as a stream of payload chunks. Each turn is captured for later use.</p>"
    },
    "UpdateReward":{
      "name":"UpdateReward",
      "http":{
        "method":"POST",
        "requestUri":"/update-reward",
        "responseCode":200
      },
      "input":{"shape":"UpdateRewardRequest"},
      "output":{"shape":"UpdateRewardResponse"},
      "errors":[
        {"shape":"ResourceNotFoundException"},
        {"shape":"InternalServiceError"},
        {"shape":"ValidationException"},
        {"shape":"ConflictException"},
        {"shape":"ServiceQuotaExceededException"},
        {"shape":"ThrottlingException"},
        {"shape":"AccessDeniedException"}
      ],
      "documentation":"<p>Updates the reward values for a trajectory and transitions it to reward-received status, signaling that it is eligible for processing. Call this operation after CompleteRollout to provide the computed reward scores.</p>",
      "idempotent":true
    }
  },
  "shapes":{
    "AccessDeniedException":{
      "type":"structure",
      "required":["Message"],
      "members":{
        "Message":{"shape":"FailureReason"}
      },
      "documentation":"<p>You do not have permission to perform this operation.</p>",
      "error":{
        "httpStatusCode":403,
        "senderFault":true
      },
      "exception":true
    },
    "CompleteRolloutRequest":{
      "type":"structure",
      "required":[
        "JobArn",
        "TrajectoryId"
      ],
      "members":{
        "JobArn":{
          "shape":"JobArn",
          "documentation":"<p>The job ARN.</p>",
          "location":"header",
          "locationName":"X-Amzn-SageMaker-Job-Arn"
        },
        "TrajectoryId":{
          "shape":"TrajectoryId",
          "documentation":"<p>The trajectory ID to mark as complete.</p>"
        },
        "Status":{
          "shape":"CompletionStatus",
          "documentation":"<p>The target status for the trajectory. Defaults to READY if not specified. Set to FAILED if the rollout encountered an error and the trajectory should not be used for processing.</p>"
        },
        "ClientToken":{
          "shape":"String",
          "documentation":"<p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>",
          "idempotencyToken":true
        }
      }
    },
    "CompleteRolloutResponse":{
      "type":"structure",
      "members":{}
    },
    "CompletionStatus":{
      "type":"string",
      "documentation":"<p>Allowed target statuses for the CompleteTrajectory operation.</p>",
      "enum":[
        "ready",
        "failed"
      ]
    },
    "ConflictException":{
      "type":"structure",
      "required":["Message"],
      "members":{
        "Message":{"shape":"FailureReason"}
      },
      "documentation":"<p>The request conflicts with the current state of the resource.</p>",
      "error":{
        "httpStatusCode":409,
        "senderFault":true
      },
      "exception":true
    },
    "Double":{
      "type":"double",
      "box":true
    },
    "DoubleList":{
      "type":"list",
      "member":{"shape":"Double"}
    },
    "FailureReason":{
      "type":"string",
      "max":1024,
      "min":0
    },
    "InferenceRequestBody":{
      "type":"blob",
      "documentation":"<p>Sensitive binary payload containing customer inference data.</p>",
      "sensitive":true
    },
    "InferenceResponseBody":{
      "type":"blob",
      "documentation":"<p>Sensitive binary payload containing model inference response data.</p>",
      "sensitive":true
    },
    "InternalServiceError":{
      "type":"structure",
      "required":["Message"],
      "members":{
        "Message":{"shape":"FailureReason"}
      },
      "documentation":"<p>An internal service error occurred. Retry the request.</p>",
      "error":{"httpStatusCode":500},
      "exception":true,
      "fault":true,
      "retryable":{"throttling":false}
    },
    "JobArn":{
      "type":"string",
      "max":256,
      "min":1,
      "pattern":"arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:job/[a-zA-Z0-9_\\-]+/[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}"
    },
    "ResourceNotFoundException":{
      "type":"structure",
      "required":["Message"],
      "members":{
        "Message":{"shape":"FailureReason"}
      },
      "documentation":"<p>The specified resource was not found.</p>",
      "error":{
        "httpStatusCode":404,
        "senderFault":true
      },
      "exception":true
    },
    "ResponseStream":{
      "type":"blob",
      "documentation":"<p>Streaming response body composed of successive payload chunks.</p>",
      "sensitive":true,
      "streaming":true
    },
    "SampleRequest":{
      "type":"structure",
      "required":[
        "JobArn",
        "TrajectoryId",
        "Body"
      ],
      "members":{
        "JobArn":{
          "shape":"JobArn",
          "documentation":"<p>The job ARN that identifies which model session to route the inference request to.</p>",
          "location":"header",
          "locationName":"X-Amzn-SageMaker-Job-Arn"
        },
        "TrajectoryId":{
          "shape":"TrajectoryId",
          "documentation":"<p>The trajectory ID for grouping turns into a single rollout. Each turn (prompt and response) is captured for later use.</p>",
          "location":"header",
          "locationName":"X-Amzn-SageMaker-Trajectory-Id"
        },
        "Body":{
          "shape":"InferenceRequestBody",
          "documentation":"<p>The raw inference request body in OpenAI-compatible JSON format.</p>"
        }
      },
      "payload":"Body"
    },
    "SampleResponse":{
      "type":"structure",
      "required":["Body"],
      "members":{
        "ContentType":{
          "shape":"String",
          "documentation":"<p>MIME type of the inference result.</p>",
          "location":"header",
          "locationName":"Content-Type"
        },
        "Body":{
          "shape":"InferenceResponseBody",
          "documentation":"<p>The raw inference response body from the model.</p>"
        }
      },
      "payload":"Body"
    },
    "SampleWithResponseStreamRequest":{
      "type":"structure",
      "required":[
        "JobArn",
        "TrajectoryId",
        "Body"
      ],
      "members":{
        "JobArn":{
          "shape":"JobArn",
          "documentation":"<p>The job ARN that identifies which model session to route the inference request to.</p>",
          "location":"header",
          "locationName":"X-Amzn-SageMaker-Job-Arn"
        },
        "TrajectoryId":{
          "shape":"TrajectoryId",
          "documentation":"<p>The trajectory ID for grouping turns into a single rollout. Each turn is captured for later use.</p>",
          "location":"header",
          "locationName":"X-Amzn-SageMaker-Trajectory-Id"
        },
        "Body":{
          "shape":"InferenceRequestBody",
          "documentation":"<p>The raw inference request body in OpenAI-compatible JSON format.</p>"
        }
      },
      "payload":"Body"
    },
    "SampleWithResponseStreamResponse":{
      "type":"structure",
      "required":["Body"],
      "members":{
        "ContentType":{
          "shape":"String",
          "documentation":"<p>MIME type of the streaming inference result.</p>",
          "location":"header",
          "locationName":"Content-Type"
        },
        "Body":{
          "shape":"ResponseStream",
          "documentation":"<p>The streaming response body, delivered as a series of PayloadPart events.</p>"
        }
      },
      "payload":"Body"
    },
    "ServiceQuotaExceededException":{
      "type":"structure",
      "required":["Message"],
      "members":{
        "Message":{"shape":"FailureReason"}
      },
      "documentation":"<p>You have exceeded a service quota.</p>",
      "error":{
        "httpStatusCode":402,
        "senderFault":true
      },
      "exception":true
    },
    "String":{"type":"string"},
    "ThrottlingException":{
      "type":"structure",
      "required":["Message"],
      "members":{
        "Message":{"shape":"FailureReason"}
      },
      "documentation":"<p>The request was throttled. Retry the request after a brief wait.</p>",
      "error":{
        "httpStatusCode":429,
        "senderFault":true
      },
      "exception":true,
      "retryable":{"throttling":false}
    },
    "TrajectoryId":{
      "type":"string",
      "max":256,
      "min":1
    },
    "UpdateRewardRequest":{
      "type":"structure",
      "required":[
        "JobArn",
        "TrajectoryId",
        "Rewards"
      ],
      "members":{
        "JobArn":{
          "shape":"JobArn",
          "documentation":"<p>The job ARN.</p>",
          "location":"header",
          "locationName":"X-Amzn-SageMaker-Job-Arn"
        },
        "TrajectoryId":{
          "shape":"TrajectoryId",
          "documentation":"<p>The trajectory ID to update with reward values.</p>"
        },
        "Rewards":{
          "shape":"DoubleList",
          "documentation":"<p>The list of reward values to assign to this trajectory. Provide one reward value per turn in the trajectory.</p>"
        },
        "ClientToken":{
          "shape":"String",
          "documentation":"<p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>",
          "idempotencyToken":true
        }
      }
    },
    "UpdateRewardResponse":{
      "type":"structure",
      "members":{}
    },
    "ValidationException":{
      "type":"structure",
      "required":["Message"],
      "members":{
        "Message":{"shape":"FailureReason"}
      },
      "documentation":"<p>The request is not valid. Check the request syntax and parameters</p>",
      "error":{
        "httpStatusCode":400,
        "senderFault":true
      },
      "exception":true
    }
  },
  "documentation":"<p>Agentic RFT Runtime Service - manages trajectory and transition data for reinforcement fine-tuning jobs.</p>"
}
