| 1 |
{ |
| 2 |
"version":"2.0", |
| 3 |
"metadata":{ |
| 4 |
"apiVersion":"2023-09-30", |
| 5 |
"endpointPrefix":"bedrock-runtime", |
| 6 |
"jsonVersion":"1.1", |
| 7 |
"protocol":"rest-json", |
| 8 |
"serviceFullName":"Amazon Bedrock Runtime", |
| 9 |
"serviceId":"Bedrock Runtime", |
| 10 |
"signatureVersion":"v4", |
| 11 |
"signingName":"bedrock", |
| 12 |
"uid":"bedrock-runtime-2023-09-30" |
| 13 |
}, |
| 14 |
"operations":{ |
| 15 |
"InvokeModel":{ |
| 16 |
"name":"InvokeModel", |
| 17 |
"http":{ |
| 18 |
"method":"POST", |
| 19 |
"requestUri":"/model/{modelId}/invoke", |
| 20 |
"responseCode":200 |
| 21 |
}, |
| 22 |
"input":{"shape":"InvokeModelRequest"}, |
| 23 |
"output":{"shape":"InvokeModelResponse"}, |
| 24 |
"errors":[ |
| 25 |
{"shape":"AccessDeniedException"}, |
| 26 |
{"shape":"ResourceNotFoundException"}, |
| 27 |
{"shape":"ThrottlingException"}, |
| 28 |
{"shape":"ModelTimeoutException"}, |
| 29 |
{"shape":"InternalServerException"}, |
| 30 |
{"shape":"ValidationException"}, |
| 31 |
{"shape":"ModelNotReadyException"}, |
| 32 |
{"shape":"ServiceQuotaExceededException"}, |
| 33 |
{"shape":"ModelErrorException"} |
| 34 |
] |
| 35 |
}, |
| 36 |
"InvokeModelWithResponseStream":{ |
| 37 |
"name":"InvokeModelWithResponseStream", |
| 38 |
"http":{ |
| 39 |
"method":"POST", |
| 40 |
"requestUri":"/model/{modelId}/invoke-with-response-stream", |
| 41 |
"responseCode":200 |
| 42 |
}, |
| 43 |
"input":{"shape":"InvokeModelWithResponseStreamRequest"}, |
| 44 |
"output":{"shape":"InvokeModelWithResponseStreamResponse"}, |
| 45 |
"errors":[ |
| 46 |
{"shape":"AccessDeniedException"}, |
| 47 |
{"shape":"ResourceNotFoundException"}, |
| 48 |
{"shape":"ThrottlingException"}, |
| 49 |
{"shape":"ModelTimeoutException"}, |
| 50 |
{"shape":"InternalServerException"}, |
| 51 |
{"shape":"ModelStreamErrorException"}, |
| 52 |
{"shape":"ValidationException"}, |
| 53 |
{"shape":"ModelNotReadyException"}, |
| 54 |
{"shape":"ServiceQuotaExceededException"}, |
| 55 |
{"shape":"ModelErrorException"} |
| 56 |
] |
| 57 |
} |
| 58 |
}, |
| 59 |
"shapes":{ |
| 60 |
"AccessDeniedException":{ |
| 61 |
"type":"structure", |
| 62 |
"members":{ |
| 63 |
"message":{"shape":"NonBlankString"} |
| 64 |
}, |
| 65 |
"error":{ |
| 66 |
"httpStatusCode":403, |
| 67 |
"senderFault":true |
| 68 |
}, |
| 69 |
"exception":true |
| 70 |
}, |
| 71 |
"Body":{ |
| 72 |
"type":"blob", |
| 73 |
"max":25000000, |
| 74 |
"min":0, |
| 75 |
"sensitive":true |
| 76 |
}, |
| 77 |
"InternalServerException":{ |
| 78 |
"type":"structure", |
| 79 |
"members":{ |
| 80 |
"message":{"shape":"NonBlankString"} |
| 81 |
}, |
| 82 |
"error":{"httpStatusCode":500}, |
| 83 |
"exception":true, |
| 84 |
"fault":true |
| 85 |
}, |
| 86 |
"InvokeModelIdentifier":{ |
| 87 |
"type":"string", |
| 88 |
"max":2048, |
| 89 |
"min":1, |
| 90 |
"pattern":"(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}/[a-z0-9]{12})|(:foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|([0-9]{12}:provisioned-model/[a-z0-9]{12})))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|(([0-9a-zA-Z][_-]?)+)" |
| 91 |
}, |
| 92 |
"InvokeModelRequest":{ |
| 93 |
"type":"structure", |
| 94 |
"required":[ |
| 95 |
"body", |
| 96 |
"modelId" |
| 97 |
], |
| 98 |
"members":{ |
| 99 |
"body":{"shape":"Body"}, |
| 100 |
"contentType":{ |
| 101 |
"shape":"MimeType", |
| 102 |
"location":"header", |
| 103 |
"locationName":"Content-Type" |
| 104 |
}, |
| 105 |
"accept":{ |
| 106 |
"shape":"MimeType", |
| 107 |
"location":"header", |
| 108 |
"locationName":"Accept" |
| 109 |
}, |
| 110 |
"modelId":{ |
| 111 |
"shape":"InvokeModelIdentifier", |
| 112 |
"location":"uri", |
| 113 |
"locationName":"modelId" |
| 114 |
} |
| 115 |
}, |
| 116 |
"payload":"body" |
| 117 |
}, |
| 118 |
"InvokeModelResponse":{ |
| 119 |
"type":"structure", |
| 120 |
"required":[ |
| 121 |
"body", |
| 122 |
"contentType" |
| 123 |
], |
| 124 |
"members":{ |
| 125 |
"body":{"shape":"Body"}, |
| 126 |
"contentType":{ |
| 127 |
"shape":"MimeType", |
| 128 |
"location":"header", |
| 129 |
"locationName":"Content-Type" |
| 130 |
} |
| 131 |
}, |
| 132 |
"payload":"body" |
| 133 |
}, |
| 134 |
"InvokeModelWithResponseStreamRequest":{ |
| 135 |
"type":"structure", |
| 136 |
"required":[ |
| 137 |
"body", |
| 138 |
"modelId" |
| 139 |
], |
| 140 |
"members":{ |
| 141 |
"body":{"shape":"Body"}, |
| 142 |
"contentType":{ |
| 143 |
"shape":"MimeType", |
| 144 |
"location":"header", |
| 145 |
"locationName":"Content-Type" |
| 146 |
}, |
| 147 |
"accept":{ |
| 148 |
"shape":"MimeType", |
| 149 |
"location":"header", |
| 150 |
"locationName":"X-Amzn-Bedrock-Accept" |
| 151 |
}, |
| 152 |
"modelId":{ |
| 153 |
"shape":"InvokeModelIdentifier", |
| 154 |
"location":"uri", |
| 155 |
"locationName":"modelId" |
| 156 |
} |
| 157 |
}, |
| 158 |
"payload":"body" |
| 159 |
}, |
| 160 |
"InvokeModelWithResponseStreamResponse":{ |
| 161 |
"type":"structure", |
| 162 |
"required":[ |
| 163 |
"body", |
| 164 |
"contentType" |
| 165 |
], |
| 166 |
"members":{ |
| 167 |
"body":{"shape":"ResponseStream"}, |
| 168 |
"contentType":{ |
| 169 |
"shape":"MimeType", |
| 170 |
"location":"header", |
| 171 |
"locationName":"X-Amzn-Bedrock-Content-Type" |
| 172 |
} |
| 173 |
}, |
| 174 |
"payload":"body" |
| 175 |
}, |
| 176 |
"MimeType":{"type":"string"}, |
| 177 |
"ModelErrorException":{ |
| 178 |
"type":"structure", |
| 179 |
"members":{ |
| 180 |
"message":{"shape":"NonBlankString"}, |
| 181 |
"originalStatusCode":{"shape":"StatusCode"}, |
| 182 |
"resourceName":{"shape":"NonBlankString"} |
| 183 |
}, |
| 184 |
"error":{ |
| 185 |
"httpStatusCode":424, |
| 186 |
"senderFault":true |
| 187 |
}, |
| 188 |
"exception":true |
| 189 |
}, |
| 190 |
"ModelNotReadyException":{ |
| 191 |
"type":"structure", |
| 192 |
"members":{ |
| 193 |
"message":{"shape":"NonBlankString"} |
| 194 |
}, |
| 195 |
"error":{ |
| 196 |
"httpStatusCode":429, |
| 197 |
"senderFault":true |
| 198 |
}, |
| 199 |
"exception":true |
| 200 |
}, |
| 201 |
"ModelStreamErrorException":{ |
| 202 |
"type":"structure", |
| 203 |
"members":{ |
| 204 |
"message":{"shape":"NonBlankString"}, |
| 205 |
"originalStatusCode":{"shape":"StatusCode"}, |
| 206 |
"originalMessage":{"shape":"NonBlankString"} |
| 207 |
}, |
| 208 |
"error":{ |
| 209 |
"httpStatusCode":424, |
| 210 |
"senderFault":true |
| 211 |
}, |
| 212 |
"exception":true |
| 213 |
}, |
| 214 |
"ModelTimeoutException":{ |
| 215 |
"type":"structure", |
| 216 |
"members":{ |
| 217 |
"message":{"shape":"NonBlankString"} |
| 218 |
}, |
| 219 |
"error":{ |
| 220 |
"httpStatusCode":408, |
| 221 |
"senderFault":true |
| 222 |
}, |
| 223 |
"exception":true |
| 224 |
}, |
| 225 |
"NonBlankString":{ |
| 226 |
"type":"string", |
| 227 |
"pattern":"[\\s\\S]*" |
| 228 |
}, |
| 229 |
"PartBody":{ |
| 230 |
"type":"blob", |
| 231 |
"max":1000000, |
| 232 |
"min":0, |
| 233 |
"sensitive":true |
| 234 |
}, |
| 235 |
"PayloadPart":{ |
| 236 |
"type":"structure", |
| 237 |
"members":{ |
| 238 |
"bytes":{"shape":"PartBody"} |
| 239 |
}, |
| 240 |
"event":true, |
| 241 |
"sensitive":true |
| 242 |
}, |
| 243 |
"ResourceNotFoundException":{ |
| 244 |
"type":"structure", |
| 245 |
"members":{ |
| 246 |
"message":{"shape":"NonBlankString"} |
| 247 |
}, |
| 248 |
"error":{ |
| 249 |
"httpStatusCode":404, |
| 250 |
"senderFault":true |
| 251 |
}, |
| 252 |
"exception":true |
| 253 |
}, |
| 254 |
"ResponseStream":{ |
| 255 |
"type":"structure", |
| 256 |
"members":{ |
| 257 |
"chunk":{"shape":"PayloadPart"}, |
| 258 |
"internalServerException":{"shape":"InternalServerException"}, |
| 259 |
"modelStreamErrorException":{"shape":"ModelStreamErrorException"}, |
| 260 |
"validationException":{"shape":"ValidationException"}, |
| 261 |
"throttlingException":{"shape":"ThrottlingException"}, |
| 262 |
"modelTimeoutException":{"shape":"ModelTimeoutException"} |
| 263 |
}, |
| 264 |
"eventstream":true |
| 265 |
}, |
| 266 |
"ServiceQuotaExceededException":{ |
| 267 |
"type":"structure", |
| 268 |
"members":{ |
| 269 |
"message":{"shape":"NonBlankString"} |
| 270 |
}, |
| 271 |
"error":{ |
| 272 |
"httpStatusCode":400, |
| 273 |
"senderFault":true |
| 274 |
}, |
| 275 |
"exception":true |
| 276 |
}, |
| 277 |
"StatusCode":{ |
| 278 |
"type":"integer", |
| 279 |
"box":true, |
| 280 |
"max":599, |
| 281 |
"min":100 |
| 282 |
}, |
| 283 |
"ThrottlingException":{ |
| 284 |
"type":"structure", |
| 285 |
"members":{ |
| 286 |
"message":{"shape":"NonBlankString"} |
| 287 |
}, |
| 288 |
"error":{ |
| 289 |
"httpStatusCode":429, |
| 290 |
"senderFault":true |
| 291 |
}, |
| 292 |
"exception":true |
| 293 |
}, |
| 294 |
"ValidationException":{ |
| 295 |
"type":"structure", |
| 296 |
"members":{ |
| 297 |
"message":{"shape":"NonBlankString"} |
| 298 |
}, |
| 299 |
"error":{ |
| 300 |
"httpStatusCode":400, |
| 301 |
"senderFault":true |
| 302 |
}, |
| 303 |
"exception":true |
| 304 |
} |
| 305 |
} |
| 306 |
} |