> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superblocks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AI inference

On Cloud-Prem, you choose where Clark runs AI inference:

| Option | Where inference runs | Billing | How to set it up |
| - | - | - | - |
| [Superblocks Inference Gateway](#superblocks-inference-gateway) (default) | A gateway operated by Superblocks, reached with outbound connections from your Cloud-Prem account | Included in Superblocks pricing, like Superblocks Cloud | Nothing to do |
| [Amazon Bedrock](#amazon-bedrock) | Amazon Bedrock in your AWS account | Billed by AWS, and counts toward your AWS commitment | Contact your deployment team |

See the [billing overview](https://docs.superblocks.com/admin/billing-overview.md) for how each option affects pricing.

Both options apply to Clark only. AI features in deployed apps use the provider you set in [App AI](https://docs.superblocks.com/integrations/app-ai.md).

## Superblocks Inference Gateway

By default, Clark sends model requests to the Superblocks Inference Gateway.

* **Outbound only:** Your Cloud-Prem account connects out to the gateway. The gateway doesn't connect into your account.
* **Encrypted and signed:** Every request is encrypted in transit with TLS 1.2 or higher and signed with short-lived AWS credentials.
* **Restricted access:** The gateway filters traffic from known malicious sources and accepts requests only from identities that Superblocks has authorized.
* **Zero data retention:** Neither the gateway nor the model providers behind it retain prompts or responses. Models are currently served through AWS.
* **No prompt or response logging:** The gateway doesn't log prompts or responses.
* **Chat history stays in your account:** The requests and responses that power your Clark chat history are stored in your Cloud-Prem account.

## Amazon Bedrock

Run Clark's inference on Amazon Bedrock in your own AWS account instead of the gateway. Choose Bedrock when:

* **Inference must stay in your AWS account.** Prompts and responses never leave your account for inference.
* **You want inference to count toward your AWS commitment.** Tokens are billed by AWS and reduce Clark GAU usage.

To switch to Bedrock, contact your Superblocks deployment team. They configure the models and regions Clark uses in your account, and every builder uses Bedrock from then on. See [Inference on Amazon Bedrock](https://docs.superblocks.com/admin/superblocks-on-aws/inference.md) for details.

You manage model availability and quotas

With Bedrock, model availability and service quotas are your responsibility. Make sure the models Clark uses are enabled in your AWS account and region, and that your Bedrock quotas are high enough for your builders. If a model is unavailable or a quota is exceeded, Clark requests fail until you resolve it in AWS.

## Related

* [Optional configurations](https://docs.superblocks.com/enterprise/cloud-prem/configure/index.md)
* [Clark and data access](https://docs.superblocks.com/building-with-clark/data-access.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.