Documentation

Verification

Verify your ModelRed SDK installation is working correctly

Installation Verification

Verify Your Installation

Quickly test that your ModelRed SDK installation is working correctly with these essential verification steps.

Quick Import Test

Basic Import Verification

Test that the SDK can be imported and core components are available.

🐍

Import Test

PYTHON
try:
    import modelred
    from modelred import ModelRed
    print("✅ ModelRed SDK imported successfully")
    print(f"📦 Version: {modelred.__version__}")
except ImportError as e:
    print(f"❌ Import failed: {e}")

API Authentication Test

Verify API Key

Test your ModelRed API key authentication and account access.

🔑

Authentication Test

PYTHON
import asyncio
from modelred import ModelRed

async def test_auth():
    try:
        async with ModelRed() as client:
            account = await client.validate_api_key()
            print("✅ Authentication successful!")
            print(f"📊 Organization: {account['organization']['name']}")
    except Exception as e:
        print(f"❌ Authentication failed: {e}")

asyncio.run(test_auth())

Complete System Test

Full System Check

Run a comprehensive test to verify all SDK components are working.

🧪

System Verification

PYTHON
import asyncio
from modelred import ModelRed

async def system_test():
    print("🚀 ModelRed SDK System Test")
    print("=" * 30)

    try:
        async with ModelRed() as client:
            # Test authentication
            account = await client.validate_api_key()
            print("✅ Authentication: PASS")

            # Test providers
            providers = await client.get_providers()
            print(f"✅ Providers: {len(providers)} available")

            # Test suites
            suites = await client.get_test_suites()
            print(f"✅ Test Suites: {len(suites)} available")

            print("\n🎉 All tests passed!")
    except Exception as e:
        print(f"❌ System test failed: {e}")

asyncio.run(system_test())

Common Issues

Import Errors

ModuleNotFoundError: No module named 'modelred'

SDK not installed in current environment

pip install modelred

🔐 Authentication Errors

AuthenticationError: Invalid API key

Check your API key configuration

  • • Set MODELRED_API_KEY environment variable
  • • Ensure key starts with 'mr_'
  • • Verify key is active in dashboard

🌐 Connection Errors

Network timeout or connection error

Check network connectivity and firewall

  • • Verify internet connectivity
  • • Allow HTTPS traffic (port 443)
  • • Check proxy settings if applicable

Verification Checklist

Installation Complete

Next Steps