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

# Generate Structures Data From Text

> Use this endpoint to design your own prompt for transforming website text into structured JSON.

### Headers

<ParamField header="Authorization" required="true" initialValue="Bearer 11111111-1111-1111-1111-111111111111">
  Use your API key to authenticate the request.
</ParamField>

### Body

<ParamField body="JSON request" type="object" required="true" children="A JSON object representing the request you are making to the Isomeric extraction engine.">
  <Expandable title="Toggle object">
    <ParamField body="text" type="string" required="true">
      The text for which you want to extract data from
    </ParamField>

    <ParamField body="schema" type="object" required="true">
      The JSON schema representing the data you would like extracted.

      See our [guide on prompt design](/api-reference/prompting) for more info.

      Also note that while standard JSON does not guarantee key order within objects, with Isomeric prompt design, we ensure the order of your keys is passed through to our inference engine as-is. This is because the order of keys can often influence the quality of data extraction.
    </ParamField>
  </Expandable>
</ParamField>

### Response

The response will be the exact `json` you specified in the `schema` key of your request unless you set `mode` to `stream`.

<RequestExample>
  ```bash Example Request theme={null}
  curl -H "Authorization: Bearer <token>" -d '{
      "text": [INPUT TEXT],
      "schema": {
          "product": {
              "type": "object",
              "properties": {
                  "title": { "type": "string" },
                  "brand": { "type": "string" },
                  "price": {
                      "type": "number",
                  },
                  "currency_code": {
                      "type": "string"
                  },
                  "color": {
                      "type": "string",
                  }
              }
          }
      }
  }' https://api.isomeric.ai/generate
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "product": {
      "brand": "Aura",
      "color": "Gravel with White Mat",
      "currency_code": "USD",
      "price": "179.00",
      "title": "Carver Mat"
    }
  }
  ```
</ResponseExample>
