import urllib3
import os

model_id = ""

# Read secrets from environment variables

baseten_api_key = os.environ["BASETEN_API_KEY"]

resp = urllib3.request(
"POST",
f"https://model-{model_id}.api.baseten.co/development/wake",
headers={"Authorization": f"Api-Key {baseten_api_key}"},
)

print(resp.json())

{}

Use this endpoint to wake the development deployment of your model if it is scaled to zero.

https://model-{model_id}.api.baseten.co/development/wake

Parameters

Model ID
string
required

The ID of the model you want to wake.

Authorization
string
required

Your Baseten API key, formatted with prefix Api-Key (e.g. {"Authorization": "Api-Key abcd1234.abcd1234"}).

import urllib3
import os

model_id = ""

# Read secrets from environment variables

baseten_api_key = os.environ["BASETEN_API_KEY"]

resp = urllib3.request(
"POST",
f"https://model-{model_id}.api.baseten.co/development/wake",
headers={"Authorization": f"Api-Key {baseten_api_key}"},
)

print(resp.json())

{}

Was this page helpful?