Skip to content

InvokeGlobalInferenceGatewayInput

Source code in docs_src/capo_sagemaker_gateway_runtime/types/invoke_global_inference_gateway_input.py
class InvokeGlobalInferenceGatewayInput(TypedDict, closed=True):
    gateway_id: "capo_sagemaker_gateway_runtime.types.gateway_id.GatewayId"
    """The ID of the Global Inference Gateway to invoke. IAM policies refer to the gateway by its ARN, `arn:<partition>:sagemaker:<region>:<account>:global-inference-gateway/<id>`."""
    accept: NotRequired["str"]
    """The MIME type you want for the response. It is passed to the model server."""
    content_type: (
        "capo_sagemaker_gateway_runtime.types.request_content_type.RequestContentType"
    )
    """The MIME type of the request body. Pass `application/json` (parameters such as `charset=utf-8` are allowed): the body is one OpenAI JSON object. The Global Inference Gateway rejects other content types with a 415 error."""
    customer_identity_token: NotRequired[
        "capo_sagemaker_gateway_runtime.types.customer_identity_token.CustomerIdentityToken"
    ]
    """Per-caller customer identity token (a JWT), forwarded unchanged to the inference gateway, which validates it. The gateway does not use it to authorize the request. Include it in the SigV4 signed headers so it cannot be altered in transit. Redacted from logs, metrics and traces."""
    body: "capo_sagemaker_gateway_runtime.types.request_payload_blob.RequestPayloadBlob"
    """The inference request body: one OpenAI JSON object, at most 10 MiB. Its content is passed to the model server unchanged, except that the request is always sent with `"stream": false`: this operation returns one JSON document, so a `"stream": true` in the body is overridden (use InvokeGlobalInferenceGatewayWithResponseStream to stream). A body that is not one JSON object, or that repeats the top-level `model` key with different values, is rejected with a 400 validation error. A body larger than 10 MiB is rejected with PayloadTooLargeException (413). The gateway reads only `model` and `stream`, and does not store the body."""

accept instance-attribute

accept: NotRequired[str]

The MIME type you want for the response. It is passed to the model server.

body instance-attribute

The inference request body: one OpenAI JSON object, at most 10 MiB. Its content is passed to the model server unchanged, except that the request is always sent with "stream": false: this operation returns one JSON document, so a "stream": true in the body is overridden (use InvokeGlobalInferenceGatewayWithResponseStream to stream). A body that is not one JSON object, or that repeats the top-level model key with different values, is rejected with a 400 validation error. A body larger than 10 MiB is rejected with PayloadTooLargeException (413). The gateway reads only model and stream, and does not store the body.

content_type instance-attribute

content_type: RequestContentType

The MIME type of the request body. Pass application/json (parameters such as charset=utf-8 are allowed): the body is one OpenAI JSON object. The Global Inference Gateway rejects other content types with a 415 error.

customer_identity_token instance-attribute

customer_identity_token: NotRequired[CustomerIdentityToken]

Per-caller customer identity token (a JWT), forwarded unchanged to the inference gateway, which validates it. The gateway does not use it to authorize the request. Include it in the SigV4 signed headers so it cannot be altered in transit. Redacted from logs, metrics and traces.

gateway_id instance-attribute

gateway_id: GatewayId

The ID of the Global Inference Gateway to invoke. IAM policies refer to the gateway by its ARN, arn:<partition>:sagemaker:<region>:<account>:global-inference-gateway/<id>.