4mo
  • POST /generate

    Generate a crystal structure with CrystaLLM

    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

    composition

    stringRequired

    Chemical composition (e.g., 'PbTe' or 'Bi2Se3')

    space_group

    Space group symbol (e.g., 'Fd3m', 'P4_2/n', etc.)

    temperature

    numberDefaults to 0.8

    Range: 0.1 to 10

    Sampling temperature. 1.0 = no change, < 1.0 = less random, > 1.0 = more random

    max_new_tokens

    integerDefaults to 3000

    Range: 1 to 10000

    Number of tokens generated in each sample

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