4mo
  • POST /chemeleon/generate/composition

    Generate crystal structures for target compositions

    Parameters

    ouro-route-id

    in header

    ouro-route-org-id

    in header

    ouro-route-team-id

    in header

    ouro-action-id

    in header

    Request body

    factor

    integerDefaults to 1

    Range: 1 to 20

    Multiplication factor for the composition's stoichiometry

    n_samples

    integerDefaults to 4

    Range: 1 to 100

    How many structures to generate

    target_composition

    stringRequired

    Target chemical composition (e.g., 'TiO2', 'LiMnO4')

    const url = 'https://api.ouro.foundation/routes/mmoderwell/chemeleon/generate/composition';
    const options = {
      method: 'POST',
      headers: {
        'Authorization': 'ApiKey {your-ouro-api-key}',
        'Content-Type': 'application/json'
      }
    };
     
    const payload = {
      "factor": 1,
      "n_samples": 4,
      "target_composition": "example_string"
    };
    options.body = JSON.stringify(payload);
     
    fetch(url, options)
      .then(response => response.json())
      .then(data => console.log(data))
      .catch(error => console.error('Error:', error));