Skip to main content

Overview

TensorOne API uses API key authentication to secure all requests. Each API key has specific permissions and can be scoped to different resources within your account.

API Key Types

Read Keys

  • Purpose: Read-only access to your resources
  • Use Cases: Monitoring dashboards, analytics, status checks
  • Permissions: GET requests only

Read & Write Keys

  • Purpose: Full access to create, modify, and delete resources
  • Use Cases: Automated deployments, infrastructure management
  • Permissions: All HTTP methods (GET, POST, PUT, DELETE)

Service Keys

  • Purpose: Specific service access (AI models, training jobs)
  • Use Cases: Production AI applications, specialized workflows
  • Permissions: Limited to specific service endpoints

Authentication Header

Include your API key in the Authorization header of every request:

Creating API Keys

Via Web Console

  1. Navigate to Settings > API Keys
  2. Click Create API Key
  3. Select permissions: Read, Read & Write, or Service-specific
  4. Add optional description and expiration date
  5. Copy the key immediately (shown only once)

Via API

Key Management

List API Keys

Revoke API Key

Rotate API Key

Environment Variables

Store your API keys securely using environment variables:

SDKs Authentication

Python SDK

JavaScript SDK

Security Best Practices

Never expose API keys in client-side code, public repositories, or logs.

✅ Do

  • Store keys in environment variables
  • Use least-privilege permissions
  • Rotate keys regularly
  • Monitor key usage
  • Set expiration dates
  • Use different keys for different environments

❌ Don’t

  • Hardcode keys in source code
  • Share keys via email or chat
  • Use production keys in development
  • Grant excessive permissions
  • Ignore key rotation

Error Responses

401 Unauthorized

403 Forbidden

429 Rate Limited

Key Scopes

Restrict API keys to specific resources:
  • accounts: Account management
  • clusters: GPU cluster operations
  • endpoints: Serverless endpoints
  • training: Model training jobs
  • billing: Payment and usage data
  • ai: AI service access
  • webhooks: Webhook management

Testing Authentication

Verify your API key works:
Response: