Skip to main content
PATCH
/
cloud
/
v3
/
inference
/
{project_id}
/
api_keys
/
{api_key_name}
Python
from gcore import Gcore

client = Gcore(
    api_key="My API Key",
)
inference_api_key = client.cloud.inference.api_keys.update(
    api_key_name="aws-dev",
    project_id=1,
)
print(inference_api_key.created_at)
{
  "created_at": "2023-10-01T12:00:00Z",
  "deployment_names": [
    "inference-1",
    "inference-2"
  ],
  "description": "This key is used for accessing the inference service.",
  "expires_at": "2024-10-01T12:00:00Z",
  "name": "my-api-key"
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

project_id
integer
required

Project ID

Examples:

1

api_key_name
string
required

Api key name.

Minimum length: 4
Examples:

"aws-dev"

Body

application/json
description
string | null

Description of the API Key.

Maximum length: 300
Examples:

"This key is used for accessing the inference service."

Response

200 - application/json

OK

created_at
string
required

Timestamp when the API Key was created.

Examples:

"2023-10-01T12:00:00Z"

deployment_names
string[]
required

List of inference deployment names to which this API Key has been attached.

Examples:
["inference-1", "inference-2"]
description
string | null
required

Description of the API Key.

Examples:

"This key is used for accessing the inference service."

expires_at
string | null
required

Timestamp when the API Key will expire.

Examples:

"2024-10-01T12:00:00Z"

name
string
required

API Key name.

Examples:

"my-api-key"

I