Skip to main content

Platform API Keys

Platform API keys provide programmatic access to the Shinzo Platform APIs, including AI agent management and Spotlight analytics. They’re designed for server-to-server communication, CI/CD pipelines, and automated workflows.

Create Platform API Key

Create a new platform API key.

Endpoint

POST /auth/platform_keys

Authentication

Requires JWT token authentication.

Request Body

FieldTypeRequiredDescription
namestringYesA descriptive name for the API key

Example Request

curl -X POST https://api.app.shinzo.ai/auth/platform_keys \
  -H "Authorization: Bearer <jwt_token>" \
  -H "Content-Type: application/json" \
  -d '{"name": "CI/CD Pipeline Key"}'

Response

{
  "uuid": "key_abc123def456",
  "key": "sk_shinzo_abc123def456ghi789...",
  "name": "CI/CD Pipeline Key",
  "created_at": "2025-01-15T10:00:00Z",
  "status": "active"
}
The API key value is only displayed once at creation. Store it securely as it cannot be retrieved later.

Response Fields

FieldTypeDescription
uuidstringUnique identifier for the key
keystringThe API key value (shown only once)
namestringDescriptive name
created_atstringCreation timestamp (ISO 8601)
statusstringKey status (active)

List Platform API Keys

Retrieve all platform API keys associated with your account.

Endpoint

GET /auth/platform_keys

Authentication

Requires JWT token authentication.

Example Request

curl -X GET https://api.app.shinzo.ai/auth/platform_keys \
  -H "Authorization: Bearer <jwt_token>"

Response

{
  "keys": [
    {
      "uuid": "key_abc123def456",
      "name": "CI/CD Pipeline Key",
      "prefix": "sk_shinzo_abc1...",
      "created_at": "2025-01-15T10:00:00Z",
      "last_used_at": "2025-01-20T14:30:00Z",
      "status": "active"
    },
    {
      "uuid": "key_xyz789uvw012",
      "name": "Production Automation",
      "prefix": "sk_shinzo_xyz7...",
      "created_at": "2025-01-10T08:00:00Z",
      "last_used_at": "2025-01-18T09:15:00Z",
      "status": "active"
    }
  ]
}
Full key values are not returned when listing. Only the prefix and metadata are shown.

Delete Platform API Key

Delete an existing platform API key. Deleted keys can no longer be used for authentication.

Endpoint

DELETE /auth/platform_keys/:keyUuid

Authentication

Requires JWT token authentication.

Path Parameters

ParameterTypeRequiredDescription
keyUuidstringYesThe UUID of the key to delete

Example Request

curl -X DELETE https://api.app.shinzo.ai/auth/platform_keys/key_abc123def456 \
  -H "Authorization: Bearer <jwt_token>"

Response

{
  "message": "API key deleted successfully",
  "uuid": "key_abc123def456",
  "deleted_at": "2025-01-20T16:00:00Z"
}

Status Codes

CodeDescription
200Key deleted successfully
401Invalid or missing JWT token
404Key not found

Using Platform API Keys

Platform API keys support multiple header formats:
# Using x-shinzo-api-key header (recommended)
curl -X GET https://api.app.shinzo.ai/agent/list \
  -H "x-shinzo-api-key: sk_shinzo_abc123..."

# Using Authorization header
curl -X GET https://api.app.shinzo.ai/agent/list \
  -H "Authorization: Bearer sk_shinzo_abc123..."

# Using x-api-key header
curl -X GET https://api.app.shinzo.ai/agent/list \
  -H "x-api-key: sk_shinzo_abc123..."

Key Format

Platform API keys follow the format: sk_shinzo_* Example: sk_shinzo_abc123def456ghi789jkl012mno345...

Supported Endpoints

Platform API keys can be used to authenticate requests to:
  • Agent Management (/agent/*) - Create, manage, and interact with AI agents
  • Spotlight (/spotlight/*) - Model proxy and session analytics