---
title: "JSON"
method: POST
path: "/generate/json"
tags: ["Generate"]
---

# JSON

`POST /generate/json`

Fetches URL content, extracts data, and transforms it using AI based on custom instructions. Use this to generate new content, summaries, or restructured data.

## Request body

- V1GenerateJSONRequest
  - `effort` 'min' | 'standard' | 'max' — Fetch effort level controlling speed vs. capability tradeoff. "min": fastest, no fallback (1-5s). "standard": balanced with enhanced reliability (default, 3-15s). "max": full browser rendering for JS-heavy sites (15-60s).
  - `geo_target` GeotargetGeoTarget
    - `country` string — Country code using ISO 3166-1 alpha-2 standard (2 letters, e.g., "US", "GB", "JP"). See: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
  - `instructions` string, required — Instructions describing how to transform the data. Maximum 20,000 characters.
  - `json_schema` object, required — JSON schema defining the structure of the transformed output
  - `nocache` boolean — Bypass cache and force fresh data retrieval
  - `url` string, uri, required — URL to fetch content from

## Response `200`

OK

- V1GenerateJSONResponse

## Other responses

- `400` — Bad request - invalid input
- `401` — Unauthorized - Invalid or missing Bearer token
- `402` — Payment Required - organization is out of credits
- `422` — Invalid URL or inaccessible resource
- `429` — Too Many Requests - rate limit exceeded
- `500` — Server error

## Changes

- **2026-08-10** `f3f7ba7d83e4` — 2 info
  - added the non-success response with the status `402`
  - added the non-success response with the status `429`
- **2026-04-10** `ab135cad4c10` — 1 warning
  - the `instructions` request property's maxLength was set to `20000`
- **2026-03-12** `8f80078ef30b` — 1 info
  - added the new optional request property `effort`
- **2026-01-30** `48ec35c63b70` — 1 info
  - added the new optional request property `geo_target`

[Change history](https://skmtc.dev/mozilla-ocho/apis/tabs-api/changes/generate/json/post.md)

---

[API](https://skmtc.dev/mozilla-ocho/apis/tabs-api.md) · [All operations](https://skmtc.dev/mozilla-ocho/apis/tabs-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mozilla-ocho/tabs-api/revisions/f3f7ba7d83e4/schema)
