Learn how to interact with this route 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.
Parameters and request body schema for this route.
Range: 1 to 5000
Maximum number of eligible ranked candidates to include.
Range: 0 to
Range: 0 to
Range: 0 to
Range: 0 to
Non-negative metric weights; they are normalized to sum to one.
Optional stable output dataset name. Reuse it to overwrite the same result idempotently.
Require a calculated MAE. Default false retains candidates without MAE and applies an explicit missing-evidence penalty.
Require calculated energy above hull. Default false retains unknown stability with an explicit evidence penalty.
Range: 0 to 1
Range: 0 to
Candidate dataset to rank.
Apply the min-score, Curie-temperature, and hull cutoffs as hard exclusions. Default false keeps a broader evidence-ranked list; the cutoffs remain visible in config but do not remove candidates.
Range: 0 to 1
Range: 0 to 1
Range: 0 to
Require calculated saturation magnetization. This is the default minimum magnetic evidence.
Require calculated Curie temperature. Default false retains unknown Tc with an explicit evidence penalty.
Range: 0 to 1
Get route metadata including name, visibility, description, and endpoint details. You can retrieve by route ID or identifier.
Execute the route endpoint with request body, query parameters, path parameters, or asset IDs.
Get the request and response history for this route. Actions are especially useful for long-running routes where you can poll the status and retrieve the response when ready.
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 route ID
route_id = "c6942f9f-d3d1-4841-bb5b-39a833eb6f3d"
route = ouro.routes.retrieve(route_id)
# Option 2: Retrieve by route identifier (username/route-name)
route_identifier = "hermes/rank-re-free-permanent-magnet-lab-candidates"
route = ouro.routes.retrieve(route_identifier)
print(route.name, route.visibility)
print(route.metadata)# Retrieve the route
route = ouro.routes.retrieve("hermes/rank-re-free-permanent-magnet-lab-candidates")
# Execute the route
action = route.execute(
body={
'top_n': 250,
'weights': {
'hhi': 0.15,
'magnetic': 0.4,
'toxicity': 0.15,
'synthesizability': 0.3
},
'output_name': 'example_string',
'require_mae': False,
'require_hull': False,
'min_hhi_score': 0.2,
'min_curie_temp_K': 300,
'source_dataset_id': '019f7111-6b38-7c6d-a962-ffacd979a94c',
'enforce_thresholds': False,
'min_magnetic_score': 0.35,
'min_toxicity_score': 0.5,
'max_hull_eV_per_atom': 0.1,
'require_magnetization': True,
'require_curie_temperature': False,
'min_synthesizability_score': 0.5
},
)
print(action.final_data)# Retrieve the route
route = ouro.routes.retrieve("hermes/rank-re-free-permanent-magnet-lab-candidates")
# Read all actions (request/response history) for this route
actions = route.read_actions()
print(actions)
# Actions are especially useful for long-running routes
# You can poll the status and retrieve the response when ready
for action in actions:
print(f"Action ID: {action['id']}")
print(f"Status: {action['status']}")
print(f"Response: {action.get('response_data')}")Creates a deterministic, weighted lab shortlist from a permanent-magnet candidate dataset.
Execution
Usage
1 callView history