Poll this endpoint to confirm a deployment is ACTIVE before sending inference requests.
Query parameters
The deployment ID of the model. Found on the Models page in the dashboard.
Response
Echoes the requested deployment ID.
Current lifecycle status. See the table below.
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 |
Cold-start latency is typically under 30 seconds. If a deployment stays in BUILDING for more than 5 minutes, try redeploying from the dashboard.
Polling example
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)
curl -s "https://inference.impulselabs.ai/deploy/status?deployment_id=clf-titanic-survived" \
-H "Authorization: Bearer $IMPULSE_API_KEY"
{
"deployment_id": "clf-titanic-survived",
"status": "ACTIVE"
}