Skip to main content
POST
/
cloud
/
v2
/
inference
/
api_keys
Deprecated. Create API Key
curl --request POST \
  --url https://api.gcore.com/cloud/v2/inference/api_keys \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "My first key",
  "expires_at": "2024-08-22T11:21:00Z",
  "inference_instance_ids": [],
  "project_id": 1
}
'
{
  "created_at": "2023-11-07T05:31:56Z",
  "key_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "secret": "<string>",
  "status": "<string>",
  "description": "My first key",
  "expires_at": "2024-08-22T11:21:00Z",
  "inference_instance_ids": [],
  "project_id": 1
}

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

Body

application/json
name
string
required

API key name.

Required string length: 1 - 200
Example:

"my-key"

description
string | null

API key description.

Example:

"My first key"

expires_at
string | null

Expiration date for the API key in ISO 8601 format.

Example:

"2024-08-22T11:21:00Z"

inference_instance_ids
string[]

Inference instance IDs to bind to the API key.

Example:
["3fa85f64-5717-4562-b3fc-2c963f66afa6"]
project_id
integer | null

Project ID.

Example:

1

Response

API Key

created_at
string<date-time>
required

API key creation date in ISO 8601 format.

Example:

"2022-01-01T00:00:00Z"

key_id
string<uuid>
required

API key ID.

Example:

"3fa85f64-5717-4562-b3fc-2c963f66afa6"

name
string
required

API key name.

Required string length: 1 - 200
Example:

"my-key"

secret
string
required

API key secret.

Example:

"my-secret"

status
string
required

API key status.

Example:

"ACTIVE"

description
string | null

API key description.

Example:

"My first key"

expires_at
string | null

Expiration date for the API key in ISO 8601 format.

Example:

"2024-08-22T11:21:00Z"

inference_instance_ids
string[]

Inference instance IDs to bind to the API key.

Example:
["3fa85f64-5717-4562-b3fc-2c963f66afa6"]
project_id
integer | null

Project ID.

Example:

1