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.
jv_formation_energy_peratom_alignnjv_optb88vdw_total_energy_alignnjv_ehull_alignnmp_e_form_alignnjv_optb88vdw_bandgap_alignnjv_mbj_bandgap_alignnmp_gappbe_alignnjv_spillage_alignnjv_slme_alignnjv_avg_elec_mass_alignnjv_avg_hole_mass_alignnintermat_cbmintermat_vbmintermat_phijv_epsx_alignnjv_mepsx_alignnjv_dfpt_piezo_max_dielectric_alignnjv_dfpt_piezo_max_dij_alignnjv_bulk_modulus_kv_alignnjv_shear_modulus_gv_alignnjv_exfoliation_energy_alignnjv_n-Seebeck_alignnjv_p-Seebeck_alignnjv_n-powerfact_alignnjv_magmom_oszicar_alignnjv_max_efg_alignnjv_supercon_tc_alignnjv_supercon_edos_alignnjv_supercon_debye_alignnjv_supercon_a2F_alignnjv_pdos_alignnjv_kpoint_length_unit_alignntinnet_O_alignntinnet_N_alignntinnet_OH_alignnAGRA_O_alignnAGRA_OH_alignnAGRA_CHO_alignnAGRA_CO_alignnAGRA_COOH_alignnocp2020_allocp2020_100kocp2020_10kqm9_U0_alignnqm9_U_alignnqm9_alpha_alignnqm9_gap_alignnqm9_G_alignnqm9_HOMO_alignnqm9_LUMO_alignnqm9_ZPVE_alignnhmof_co2_absp_alignnhmof_max_co2_adsp_alignnhmof_surface_area_m2g_alignnhmof_surface_area_m2cm3_alignnhmof_pld_alignnhmof_lcd_alignnhmof_void_fraction_alignnALIGNN pretrained model key (e.g. jv_formation_energy_peratom_alignn) or slug (e.g. formation-energy). See GET /alignn/models for all options.
Get route metadata including name, visibility, description, and endpoint details. You can retrieve by route 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 route ID
route_id = "de2d96c5-b638-46c2-82f5-cae72aa4383c"
route = ouro.routes.retrieve(route_id)
# Option 2: Retrieve by route identifier (username/route-name)
route_identifier = "mmoderwell/predict-a-crystal-property-with-alignn"
route = ouro.routes.retrieve(route_identifier)
print(route.name, route.visibility)
print(route.metadata)Execute the route endpoint with request body, query parameters, path parameters, or asset IDs.
# Retrieve the route
route = ouro.routes.retrieve("mmoderwell/predict-a-crystal-property-with-alignn")
# Execute the route
action = route.execute(
body={
'model': 'example_string'
},
assets={
'file': 'your-file-id'
},
)
print(action.final_data)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.
# Retrieve the route
route = ouro.routes.retrieve("mmoderwell/predict-a-crystal-property-with-alignn")
# 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')}")Run an ALIGNN pretrained model on a CIF structure. Set model to a model key or slug from GET /alignn/models.