> ## Documentation Index
> Fetch the complete documentation index at: https://docs.atomscale.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Parse Target Material

> Parse a natural-language material description into a structured stack

Parses a free-text description of a material stack into a structured target material. Send a plain-language prompt (for example, "BaTiO3 on Si") and the endpoint returns the material name, substrate, and ordered layers.

<ParamField body="prompt" type="string" required>
  Free-text description of the material stack
</ParamField>

## Response

<ResponseField name="material_name" type="string">
  Concise label for the material (e.g., `BaTiO3/SrTiO3 on Si`)
</ResponseField>

<ResponseField name="substrate" type="string">
  Substrate symbol (e.g., `Si`). Empty if the prompt describes no substrate.
</ResponseField>

<ResponseField name="layers" type="array">
  Layers ordered top-to-bottom (topmost first).

  <Expandable title="layers">
    <ResponseField name="formula" type="string" required>
      Standard chemical formula string (e.g., `BaTiO3`)
    </ResponseField>

    <ResponseField name="orientation" type="string">
      Crystallographic orientation, included only if stated in the prompt
    </ResponseField>

    <ResponseField name="space_group" type="string">
      Space group, included only if stated in the prompt
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.atomscale.ai/target-materials/parse" \
    -H "X-API-KEY: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "prompt": "BaTiO3 on SrTiO3 on Si"
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.atomscale.ai/target-materials/parse",
      headers={
          "X-API-KEY": "YOUR_API_KEY",
          "Content-Type": "application/json"
      },
      json={
          "prompt": "BaTiO3 on SrTiO3 on Si"
      }
  )
  parsed = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "material_name": "BaTiO3/SrTiO3 on Si",
    "substrate": "Si",
    "layers": [
      {
        "formula": "BaTiO3",
        "orientation": null,
        "space_group": null
      },
      {
        "formula": "SrTiO3",
        "orientation": null,
        "space_group": null
      }
    ]
  }
  ```
</ResponseExample>
