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

# Deployments

> Your model can be deployed as a real-time API. Slai includes client libraries for cURL, Python, and Node, allowing you to call the deployed model from your own codebase. 

## Starting a deployment

To deploy a model, click the **Deploy** button in your sandbox.

![Deploy button](https://mintcdn.com/slai-docs/x8Ejwqb1sXwT0acS/img/sandbox/deployments/deploy.png?fit=max\&auto=format\&n=x8Ejwqb1sXwT0acS\&q=85\&s=310d49e6a331bea84dd50b2247b2e31d)

## Configuring a deployment

A modal will appear, showing the deployment version. You'll have the option to configure your deployment by clicking **Advanced deployment options**.

[You can find more information on using advanced deployment options here.](https://docs.slai.io/user-guides/advanced-deployment-options.md)

![](https://mintcdn.com/slai-docs/0GTBstnyDK-8Z9OV/img/sandbox/deployments/deploy-model.png?fit=max\&auto=format\&n=0GTBstnyDK-8Z9OV\&q=85\&s=d3df5da5ef9ab887c05f148927fb576f)

This modal appears after clicking Deploy

![](https://mintcdn.com/slai-docs/x8Ejwqb1sXwT0acS/img/sandbox/deployments/deployment-settings.png?fit=max\&auto=format\&n=x8Ejwqb1sXwT0acS\&q=85\&s=9c1f455558a650e7c3905d217b140ba6)

Configure various deployment settings, if you wish

Clicking **Deploy** will package and deploy your application to the Slai backend.

## Monitoring a deployment

After deploying, you'll be redirected to a dashboard to monitor the status of the deployment.

On the monitoring page, you can view APM-style metrics:

* Total API calls
* Total errors
* Average inference time
* Average cold start time
* Requests per second
* Logs on the container

![Monitor the deployment](https://mintcdn.com/slai-docs/x8Ejwqb1sXwT0acS/img/sandbox/deployments/monitor-deployment.png?fit=max\&auto=format\&n=x8Ejwqb1sXwT0acS\&q=85\&s=011400c9be6e51405abc1c992d0f3cac)

## Container Logs

You can view all console output on your deployed container by scrolling down the page to the **Deployment Logs** section.

![Monitor the deployment](https://mintcdn.com/slai-docs/x8Ejwqb1sXwT0acS/img/sandbox/deployments/logs.png?fit=max\&auto=format\&n=x8Ejwqb1sXwT0acS\&q=85\&s=44d56a9a7a21003bd8f73890ee6c449b)

## Calling the API

Once the model is deployed, it can be called via our cURL, Python, or Node client. Your `client_id`, `client_secret`, and model name will be filled in dynamically.

Click the **Integrate** button to copy the integration code in any of our three client libraries.

![Integrate](https://mintcdn.com/slai-docs/x8Ejwqb1sXwT0acS/img/sandbox/deployments/integrate.png?fit=max\&auto=format\&n=x8Ejwqb1sXwT0acS\&q=85\&s=b761fb00ef438e408d68385b656b2e81)

Just copy and paste this into your shell, and you can start running inference.

```python Python theme={null}
# Example usage of model API

import slai

slai.login(
client_id="c3cf0b3d30f03579f9d8e7b416ce81a3",
client_secret="51b42996f59d795f12c80c45ac4f4ffe"
)

model = slai.model("GPT-2/initial")

# This is just an example of how to call your model

# Parameters vary based on your handler inputs

prediction = model(text="Once upon a time I was reading the docs")

```

```bash cURL theme={null}
curl -X POST --compressed "https://models.slai.io/mucgs/predict" \
   -H 'Accept: */*' \
   -H 'Accept-Encoding: gzip, deflate' \
   -H 'Authorization: Basic YzNjZjBiM2QzMGYwMzU3OWY5ZDhlN2I0MTZjZTgxYTM6NTFiNDI5OTZmNTlkNzk1ZjEyYzgwYzQ1YWM0ZjRmZmU=' \
   -H 'Connection: keep-alive' \
   -H 'Content-Type: application/json' \
   -d '{"text": "Once upon a time I was reading the docs"}'
```


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