Skip to main content

API Authentication

The GeniSpace API uses API keys for identity authentication. All API requests must include valid authentication information in the request headers.

Obtaining an API Key

  1. Log in to the console, navigate to SystemService Integrations
  2. In the API Key management area, click "Create API Key"
  3. Store the generated key securely—the key is only displayed once at creation time

Usage

Add the Authorization field to the HTTP headers of each API request:

Authorization: Bearer YOUR_API_KEY

Request Example

curl -X GET https://api.genispace.cn/developer/api-agents \
-H "Authorization: Bearer sk-xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json"

Security Recommendations

  • Do not hardcode API keys in client-side code
  • Use environment variables to store keys
  • Rotate keys regularly
  • If a key is compromised, immediately revoke it in the console and create a new one

Permission Scope

The permission scope of an API key depends on the creator's team role and subscription plan. The key can access resources belonging to the creator's team.