Skip to content

DarkStarStrix/Lambda_Zero

Repository files navigation

Lambda_Zero

Lambda_Zero Logo

Python 3.9+ API Status Documentation

Lambda_Zero is a unified platform for scientific machine learning, providing the newest Nexa models for predictions in biology (protein structure), astrophysics (stellar properties), and material science (material properties). Access these models via a simple REST API, with results returned in JSON format including predictions and confidence scores (0-100%).

Quick Start

Prerequisites

  • Python 3.9+
  • An API key (still in dev coming soon)
  • requests library (pip install requests)

Example: Protein Structure Prediction

Predict the secondary structure of a protein sequence:

import requests

response = requests.post(
    "https://api.scimlhub.com/v1/bio/predict",
    headers={"X-API-Key": "your_api_key"},
    json={"sequence": "MAKQVKL"}
)

result = response.json()
print(result)
# Output: {"prediction": "H", "confidence": 80.56}

Example: Stellar Property Prediction

Estimate a star's mass:

response = requests.post(
    "https://api.scimlhub.com/v1/astro/predict",
    headers={"X-API-Key": "your_api_key"},
    json={
        "temp": 5778,  # Kelvin
        "luminosity": 1.0,  # Solar luminosity
        "metallicity": 0.0  # [Fe/H]
    }
)

result = response.json()
print(f"Stellar Mass: {result['prediction']} Solar masses")
print(f"Confidence: {result['confidence']}%")
# Output: {"prediction": 1.0, "confidence": 97.49}

Example: Material Property Prediction

Predict a material's band gap:

response = requests.post(
    "https://api.scimlhub.com/v1/materials/predict",
    headers={"X-API-Key": "your_api_key"},
    json={"structure": "POSCAR data string"}
)

result = response.json()
print(f"Band Gap: {result['prediction']} eV")
print(f"Confidence: {result['confidence']}%")
# Output: {"prediction": 2.5, "confidence": 98.5}

Core Models

Biology: HelixSynth-Pro (Protein Structure Prediction)

Materials Science: Materials GNN

API Usage

The API endpoints return predictions and confidence scores in JSON format: {"prediction": value, "confidence": percentage}.

Endpoints

1. /v1/bio/predict - Protein Structure Prediction

  • Method: POST
  • Input:
    {
      "sequence": "MAKQVKL" 
    }
  • Output:
    {
      "prediction": "H",  
      "confidence": 80.56  
    }

3. /v1/materials/predict - Material Property Prediction

  • Method: POST
  • Input:
    {
      "structure": "POSCAR data string"  
    }
  • Output:
    {
      "prediction": 2.5,  
      "confidence": 98.5   
    }

Authentication

Include your API key in the request header:

X-API-Key: your_api_key

Error Responses

  • 400 Bad Request: Invalid input format
  • 401 Unauthorized: Missing or invalid API key
  • 429 Too Many Requests: Rate limit exceeded
  • 500 Server Error: Internal issue (contact support)

Installation (Local Development)

  1. Clone the Repository:

    git clone https://github.com/DarkStarStrix/Lambda_Zero.git

    cd Lambda_Zero

    
    
  2. Install Dependencies:

    pip install -r requirements.txt
  3. Run the API Locally:

    python app/main.py

    The API will be available at http://localhost:8000.

  4. Docker Deployment (Optional):

    docker-compose -f docker/docker-compose.yml up --build

Key Features

  • Fast: Average response time ~50ms
  • Accurate: >95% accuracy across domains
  • Reliable: Confidence scores with every prediction
  • Scalable: Supports millions of requests daily
  • Secure: SOC2 Type II compliant

Example Outputs

Protein Structure

{
  "prediction": "H",
  "confidence": 80.56
}

Astrophysics

{
  "prediction": "GALAXY",
  "confidence": 97.29
}

Materials Science

{
  "prediction": 2.5,
  "confidence": 98.5
}

Use Cases

  • Biology: Protein design, drug discovery
  • Astrophysics: Stellar classification, exoplanet research
  • Materials Science: Material discovery, energy applications

Pricing

Plan Requests/Month Price
Free 300 $0
Premium-1K 1,000 $50/month
Premium-5K 5,000 $35/month
Premium-10K 10,000 $25/month
Enterprise Unlimited Custom

Resources

Enterprise Support

For custom models, on-premise deployment, or integration help, email: allanw.mk@gmail.com.

License

Commercial license - see LICENSE

About

A inference application to serve Scientific Models

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •