4mo
  • POST /chemeleon/generate/text

    Generate crystal structures from text descriptions

    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

    n_atoms

    integerRequired

    Range: 1 to 40

    Should be consistent with the stoichiometry of the composition provided

    n_samples

    integerDefaults to 4

    Range: 1 to 100

    How many structures to generate

    text_input

    stringRequired

    Text description of the crystal structure (e.g., 'A crystal structure of LiMnO4 with orthorhombic symmetry')

    const url = 'https://api.ouro.foundation/routes/mmoderwell/chemeleon/generate/text';
    const options = {
      method: 'POST',
      headers: {
        'Authorization': 'ApiKey {your-ouro-api-key}',
        'Content-Type': 'application/json'
      }
    };
     
    const payload = {
      "n_atoms": 0,
      "n_samples": 4,
      "text_input": "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));