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

# Deployment Status

> Check whether a model deployment is ready to receive inference requests.

Poll this endpoint to confirm a deployment is `ACTIVE` before sending inference requests.

### Query parameters

<ParamField query="deployment_id" type="string" required>
  The deployment ID of the model. Found on the **Models** page in the dashboard.
</ParamField>

### Response

<ResponseField name="deployment_id" type="string">
  Echoes the requested deployment ID.
</ResponseField>

<ResponseField name="status" type="string">
  Current lifecycle status. See the table below.
</ResponseField>

### Deployment statuses

| Status     | Description                                            |
| ---------- | ------------------------------------------------------ |
| `CREATED`  | Deployment registered; container build not yet started |
| `BUILDING` | Container image is being built                         |
| `ACTIVE`   | Model is deployed and accepting inference requests     |
| `FAILED`   | Deployment failed — retrain or contact support         |

<Info>
  Cold-start latency is typically under 30 seconds. If a deployment stays in `BUILDING` for more than 5 minutes, try redeploying from the dashboard.
</Info>

### Polling example

```python Python — wait for ACTIVE theme={null}
import os
import time
import requests

API_KEY = os.environ["IMPULSE_API_KEY"]
DEPLOYMENT_ID = "clf-titanic-survived"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

def wait_for_active(deployment_id: str, timeout: int = 120) -> None:
    deadline = time.time() + timeout
    while time.time() < deadline:
        resp = requests.get(
            "https://inference.impulselabs.ai/deploy/status",
            params={"deployment_id": deployment_id},
            headers=HEADERS,
        )
        resp.raise_for_status()
        status = resp.json()["status"]
        print(f"Status: {status}")
        if status == "ACTIVE":
            return
        if status == "FAILED":
            raise RuntimeError(f"Deployment {deployment_id} failed")
        time.sleep(5)
    raise TimeoutError(f"Deployment did not become ACTIVE within {timeout}s")

wait_for_active(DEPLOYMENT_ID)
```

<RequestExample>
  ```bash cURL theme={null}
  curl -s "https://inference.impulselabs.ai/deploy/status?deployment_id=clf-titanic-survived" \
    -H "Authorization: Bearer $IMPULSE_API_KEY"
  ```

  ```python Python theme={null}
  import os, requests

  resp = requests.get(
      "https://inference.impulselabs.ai/deploy/status",
      params={"deployment_id": "clf-titanic-survived"},
      headers={"Authorization": f"Bearer {os.environ['IMPULSE_API_KEY']}"},
  )
  print(resp.json()["status"])  # "ACTIVE"
  ```

  ```javascript Node.js theme={null}
  const params = new URLSearchParams({ deployment_id: "clf-titanic-survived" });
  const resp = await fetch(
    `https://inference.impulselabs.ai/deploy/status?${params}`,
    { headers: { Authorization: `Bearer ${process.env.IMPULSE_API_KEY}` } }
  );
  const { status } = await resp.json();
  console.log(status); // "ACTIVE"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK — Active theme={null}
  {
    "deployment_id": "clf-titanic-survived",
    "status": "ACTIVE"
  }
  ```

  ```json 200 OK — Still building theme={null}
  {
    "deployment_id": "clf-titanic-survived",
    "status": "BUILDING"
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "detail": "No deployment 'clf-titanic-survived' found for user"
  }
  ```
</ResponseExample>
