Get an API key

Get the details of an existing API key.

Request

GET https://superinterface.ai/api/cloud/api-keys/{apiKeyId}

Authentication

Include your private API key in the request headers:
Authorization: Bearer YOUR_PRIVATE_API_KEY

Path Parameters

ParameterTypeDescription
apiKeyIdstringThe ID of an existing public API key

Example request

curl -X GET "https://superinterface.ai/api/cloud/api-keys/50cfe680-fee5-49b9-b386-6a7097eb8497" \ -H "Authorization: Bearer YOUR_PRIVATE_API_KEY" \ -H "Content-Type: application/json"

Response

ParameterTypeDescription
apiKeyAPI keyExisting API key

Example response

{ "apiKey": { "id": "40cfe680-fee5-49b9-b386-6a7097eb8497", "type": "PUBLIC", "name": "Production website API key", "value": "77afd9c6-519f-4336-a39e-e739143f0a5c", "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T10:30:00Z" } }

Errors

The endpoint may return the following errors:

401 Unauthorized

This error occurs if the API key is invalid or missing.
{ "error": "Unauthorized", "message": "Invalid or missing API key" }