Skip to main content
Manage API keys for programmatic access to the TensorOne platform. Create keys with specific permissions, monitor usage, and implement secure key rotation practices.

List API Keys

Retrieve all API keys associated with your account.

Response

Create API Key

Create a new API key with specified permissions and scopes.

Request Schema

Available Permissions

  • read: Access to GET endpoints and data retrieval
  • write: Access to POST, PUT, DELETE operations
  • execute: Access to endpoint execution and compute resources

Available Scopes

  • endpoints: Serverless endpoint management
  • clusters: GPU cluster management
  • billing: Billing and usage information
  • accounts: Account and team management

Response

The full API key is only returned once during creation. Store it securely and never expose it in client-side code.

Update API Key

Update an existing API key’s name, permissions, or rate limits.

Request Schema

Rotate API Key

Generate a new key value while preserving the key’s configuration and permissions.

Response

The old key is immediately revoked when rotating. Update your applications immediately to avoid service interruption.

Revoke API Key

Permanently revoke an API key, making it unusable.

Response

Get API Key Usage

Retrieve detailed usage statistics for a specific API key.

Query Parameters

  • period: Time period for usage data (1d, 7d, 30d, 90d)
  • granularity: Data granularity (hour, day, week)

Response

Code Examples

Python SDK

JavaScript SDK

Error Responses

400 Bad Request

403 Forbidden

404 Not Found

429 Too Many Requests

Security Best Practices

Key Management

  • Use the principle of least privilege - grant only necessary permissions
  • Set expiration dates for temporary or project-specific keys
  • Rotate keys regularly, especially for production environments
  • Monitor key usage for anomalous activity

Permission Design

  • Create separate keys for different applications or environments
  • Use read-only keys for monitoring and analytics tools
  • Restrict execution permissions to trusted applications only
  • Regularly audit and review key permissions

Storage and Transmission

  • Store API keys in secure environment variables or key management systems
  • Never commit keys to version control systems
  • Use HTTPS for all API communications
  • Implement proper key rotation in your applications

Use Cases

CI/CD Pipeline Integration

Monitoring and Analytics

Application-Specific Access

Regular Key Rotation