Skip to main content
Paradigm can be deployed in different configurations to meet your organization’s needs. Understanding how to configure your applications for different instance types is crucial for proper API integration.

Instance Types

LightOn managed instance

  • URL: https://paradigm.lighton.ai
  • Management: Fully managed by LightOn
  • Suitable for: Organizations comfortable with SaaS solutions

Client managed instance

  • URL: Custom domain provided by the client organization
  • Management: Managed by your IT team or LightOn support
  • Suitable for: Organizations requiring on-premises deployment or specific compliance requirements

Configuration Best Practices

Environment Variables

Always use environment variables to make your code flexible across different instances:
import os

# Recommended: Use environment variables for configuration
PARADIGM_API_KEY = os.getenv("PARADIGM_API_KEY")
PARADIGM_BASE_URL = os.getenv("PARADIGM_BASE_URL", "https://paradigm.lighton.ai/api/v2")

Configuration Examples

For the LightOn managed instance

# .env file or environment variables
export PARADIGM_API_KEY="your_api_key_here"
export PARADIGM_BASE_URL="https://paradigm.lighton.ai/api/v2"

For the client managed instance

# .env file or environment variables  
export PARADIGM_API_KEY="your_api_key_here"
export PARADIGM_BASE_URL="https://your-company-paradigm.example.com/api/v2"

Code Implementation

import requests
import os

# Get configuration from environment
api_key = os.getenv("PARADIGM_API_KEY")
base_url = os.getenv("PARADIGM_BASE_URL", "https://paradigm.lighton.ai/api/v2")

# Validate configuration
if not api_key:
    raise ValueError("PARADIGM_API_KEY environment variable is required")

if not base_url:
    raise ValueError("PARADIGM_BASE_URL environment variable is required")

Determining Your Instance Type

Check with Your Administrator

Contact your Paradigm administrator or IT team to confirm:
  • Which instance type your organization uses
  • The correct base URL for API calls
  • Any specific network requirements (proxies, VPNs, etc.)

Configuration Validation

You can test your configuration by calling the models endpoint:
try:
    response = requests.get(
		url=f"{base_url}/models",
		headers={"Authorization": f"Bearer {api_key}"}
	)
    data = response.json()
    print("✅ Configuration successful!")
    print(f"Connected to: {base_url}")
    print(f"Available models: {len(data['data'])}")
except Exception as e:
    print("❌ Configuration failed:")
    print(f"Error: {e}")
    print("Please check your PARADIGM_BASE_URL and PARADIGM_API_KEY")

Security Considerations

Private Instances

  • Ensure your network allows access to your private instance
  • Configure any necessary proxy settings (see proxy configuration)
  • Verify SSL/TLS certificates are properly configured

API Key Management

  • Never hardcode API keys in your source code
  • Use secure environment variable management
  • Rotate API keys regularly as per your organization’s security policy
  • Store API keys in secure credential management systems

Troubleshooting

Common Issues

IssueCauseSolution
Connection timeoutWrong base URL or network issuesVerify URL and network connectivity
Authentication failedInvalid API key or expired credentialsCheck API key and regenerate if needed
SSL certificate errorsSelf-signed certificates on private instancesConfigure proper SSL verification
Proxy errorsCorporate firewall blocking requestsConfigure proxy settings

Getting Help

  • Public Instance: Contact LightOn Support
  • Private Instance: Contact your internal IT team or designated LightOn support contact
I