---
title: "Generate JSON"
method: POST
path: "/global/generate/json/v1"
tags: ["Global", "Croma"]
---

# Generate JSON

`POST /global/generate/json/v1`

## Request

- Base URL: `https://api.croma.run`
- URL: `https://api.croma.run/global/generate/json/v1`
- Auth: HTTP bearer

Read a public web page and return a new object built from it, following your `instructions` and your JSON Schema. Unlike `extract-json`, the fields need not appear on the page: summarize, classify, translate or reshape what is there.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `url` string, uri, required: Public http or https URL of the page to read. Loopback and private addresses are not accepted.
  - `instructions` string, required: What to do with the page: summarize, classify, translate, reformat. Write it as you would brief an analyst.
  - `json_schema` object, required: JSON Schema for the object to return. Field names and nesting are yours; describe each field so it can be located on the page.
  - `effort` 'min' | 'standard' | 'max': Effort to spend on the page: `min` is fastest and may serve a recent copy, `standard` is the balanced default, `max` always reads the page live and handles pages that render themselves in the browser.

## Response `200`

Successful response

- StructuredDataResponse
  - `data` object, required
    - `url` string, uri, required: The page that was read, after any redirects.
    - `result` object, required: The object described by the `json_schema` you sent.

## Other responses

- `400`: Invalid request body
- `401`: Missing or invalid API key
- `404`: Resource not found in upstream source
- `429`: Rate limit exceeded
- `500`: Internal error
- `502`: Upstream source returned an error

---

[API](https://skmtc.dev/usecroma/apis/croma-marketplace-api.md) · [All operations](https://skmtc.dev/usecroma/apis/croma-marketplace-api/llms.txt) · [OpenAPI document](https://skmtc.dev/usecroma/apis/croma-marketplace-api/revisions/df016cdb29d7?raw)
