Skip to main content
GET
/
cloud
/
v3
/
inference
/
{project_id}
/
api_keys
/
{api_key_name}
Python
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_api_key = client.cloud.inference.api_keys.get(
    api_key_name="aws-dev",
    project_id=1,
)
print(inference_api_key.created_at)
{
  "created_at": "<string>",
  "deployment_names": [
    "<string>"
  ],
  "description": "This key is used for accessing the inference service.",
  "expires_at": "2024-10-01T12:00:00Z",
  "name": "<string>"
}

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

api_key_name
string
required

Api key name.

Minimum string length: 4

Response

200 - application/json

OK

created_at
string
required

Timestamp when the API Key was created.

deployment_names
string[]
required

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

description
string | null
required

Description of the API Key.

Example:

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

expires_at
string | null
required

Timestamp when the API Key will expire.

Example:

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

name
string
required

API Key name.