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

# Generate

> Read a public web page and return a new object built from it, following your instructions and your JSON Schema.

Read a public web page and return an object built from it: a summary, a
classification, a translation, a reshaped record. Unlike
[Extract](/guides/global/extract), the fields need not appear on the page.

## Page into an object

`POST /global/generate/json/v1`

| Field          | Type   | Notes                                                                                                                         |
| -------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------- |
| `url`          | string | **Required.** Public http or https URL. Loopback and private addresses are rejected.                                          |
| `instructions` | string | **Required.** 3-20,000 chars. What to do with the page. Write it as you would brief an analyst.                               |
| `json_schema`  | object | **Required.** JSON Schema for the object to return.                                                                           |
| `effort`       | enum   | `min`, `standard`, or `max`. Default `standard`. `min` is fastest; `max` handles pages that render themselves in the browser. |
| `country`      | string | ISO 3166-1 alpha-2 code (e.g. `CO`) for pages that serve different content by country. Omit for the default route.            |

```bash theme={"dark"}
curl https://api.croma.run/global/generate/json/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://www.funcionpublica.gov.co/eva/gestornormativo/norma.php?i=304", "instructions": "Resume la norma en dos frases y clasifica su materia principal.", "json_schema": { "type": "object", "required": ["summary", "subject"], "properties": { "summary": { "type": "string" }, "subject": { "type": "string" } } } }'
```

| Field    | Notes                                               |
| -------- | --------------------------------------------------- |
| `url`    | The page that was read, after any redirects.        |
| `result` | The object described by the `json_schema` you sent. |

<Note>
  The output is written from the page, so treat it as a draft: check anything
  you act on against the page itself, which
  [Extract](/guides/global/extract) returns verbatim.
</Note>

<Warning>
  Generate has a tighter quota than most endpoints: **60 requests per hour** per
  organization, shared with Extract. See [Rate limits](/rate-limits).
</Warning>

<Card title="Full reference" icon="code" href="/api-reference/overview">
  Schemas, all response fields, and an interactive playground.
</Card>
