Materials science toolkit powered by machine learning interatomic potentials (MLIPs). Relax crystal structures, compute phonon band structures, simulate XRD, generate surface slabs and doped or defective structures, and score permanent-magnet candidates. Energy above the hull and novelty checks are in the Crystal DB service. Accepts CIF files as input.
Learn how to interact with Materials API using the Ouro SDK or REST API.
API access requires an API key. Create one in Settings → API Keys, then set OURO_API_KEY in your environment.
Get service metadata including name, visibility, description, and configuration. You can retrieve by service ID or identifier.
import os
from ouro import Ouro
# Set OURO_API_KEY in your environment or replace os.environ.get("OURO_API_KEY")
ouro = Ouro(api_key=os.environ.get("OURO_API_KEY"))
# Option 1: Retrieve by service ID
service_id = "172c1313-7969-4eb6-9897-e4b585080197"
service = ouro.services.retrieve(service_id)
# Option 2: Retrieve by service identifier (username/service-name)
service_identifier = "mmoderwell/materials-api"
service = ouro.services.retrieve(service_identifier)
print(service.name, service.visibility)
print(service.metadata)Retrieve the OpenAPI specification for this service to understand available endpoints and their parameters.
Get all routes for this service and use them programmatically.
Click on an endpoint to view its detailed documentation.
/materials/defects/generateGenerate point-defect candidates
# Retrieve the service
service = ouro.services.retrieve("mmoderwell/materials-api")
# Read the OpenAPI spec
spec = ouro.services.read_spec(service.id)
print(spec.get("openapi"))
print(spec.get("info"))# Retrieve the service
service = ouro.services.retrieve("mmoderwell/materials-api")
# Get all routes for this service
routes = ouro.services.read_routes(service.id)
for route in routes:
print(f"{route.route.method} {route.route.path}")
print(f" Summary: {route.route.summary}")Usage
8,063 calls