import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
inference_deployment_api_key = client.cloud.inference.deployments.get_api_key(
deployment_name="my-instance",
project_id=1,
)
print(inference_deployment_api_key.secret)
Copy
Ask AI
{
"secret": "<string>",
"status": "PENDING"
}
Everywhere Inference
Get inference deployment API key
GET
/
cloud
/
v3
/
inference
/
{project_id}
/
deployments
/
{deployment_name}
/
apikey
Python
Copy
Ask AI
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
inference_deployment_api_key = client.cloud.inference.deployments.get_api_key(
deployment_name="my-instance",
project_id=1,
)
print(inference_deployment_api_key.secret)