|
| 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})([:][a-z0-9-]{1,63}){0,2})|([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})([:][a-z0-9-]{1,63}){0,2})|(([0-9a-zA-Z][_-]?)+)$" |
| 91 | + }, |
| 92 | + "InvokeModelRequest":{ |
| 93 | + "type":"structure", |
| 94 | + "required":[ |
| 95 | + "body", |
| 96 | + "modelId" |
| 97 | + ], |
| 98 | + "members":{ |
| 99 | + "accept":{ |
| 100 | + "shape":"MimeType", |
| 101 | + "location":"header", |
| 102 | + "locationName":"Accept" |
| 103 | + }, |
| 104 | + "body":{"shape":"Body"}, |
| 105 | + "contentType":{ |
| 106 | + "shape":"MimeType", |
| 107 | + "location":"header", |
| 108 | + "locationName":"Content-Type" |
| 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 | + "accept":{ |
| 142 | + "shape":"MimeType", |
| 143 | + "location":"header", |
| 144 | + "locationName":"X-Amzn-Bedrock-Accept" |
| 145 | + }, |
| 146 | + "body":{"shape":"Body"}, |
| 147 | + "contentType":{ |
| 148 | + "shape":"MimeType", |
| 149 | + "location":"header", |
| 150 | + "locationName":"Content-Type" |
| 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 | + "originalMessage":{"shape":"NonBlankString"}, |
| 206 | + "originalStatusCode":{"shape":"StatusCode"} |
| 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 | + "throttlingException":{"shape":"ThrottlingException"}, |
| 261 | + "validationException":{"shape":"ValidationException"} |
| 262 | + }, |
| 263 | + "eventstream":true |
| 264 | + }, |
| 265 | + "ServiceQuotaExceededException":{ |
| 266 | + "type":"structure", |
| 267 | + "members":{ |
| 268 | + "message":{"shape":"NonBlankString"} |
| 269 | + }, |
| 270 | + "error":{ |
| 271 | + "httpStatusCode":400, |
| 272 | + "senderFault":true |
| 273 | + }, |
| 274 | + "exception":true |
| 275 | + }, |
| 276 | + "StatusCode":{ |
| 277 | + "type":"integer", |
| 278 | + "box":true, |
| 279 | + "max":599, |
| 280 | + "min":100 |
| 281 | + }, |
| 282 | + "ThrottlingException":{ |
| 283 | + "type":"structure", |
| 284 | + "members":{ |
| 285 | + "message":{"shape":"NonBlankString"} |
| 286 | + }, |
| 287 | + "error":{ |
| 288 | + "httpStatusCode":429, |
| 289 | + "senderFault":true |
| 290 | + }, |
| 291 | + "exception":true |
| 292 | + }, |
| 293 | + "ValidationException":{ |
| 294 | + "type":"structure", |
| 295 | + "members":{ |
| 296 | + "message":{"shape":"NonBlankString"} |
| 297 | + }, |
| 298 | + "error":{ |
| 299 | + "httpStatusCode":400, |
| 300 | + "senderFault":true |
| 301 | + }, |
| 302 | + "exception":true |
| 303 | + } |
| 304 | + } |
| 305 | +} |
0 commit comments