---
title: "JSON to Pydantic (x402)"
method: GET
path: "/x402/v2/json-to-pydantic"
tags: ["x402"]
---

# JSON to Pydantic (x402)

`GET /x402/v2/json-to-pydantic`

## Request

- Base URL: `https://api.strale.io`
- URL: `https://api.strale.io/x402/v2/json-to-pydantic`
- Auth: none required

Convert JSON to Python Pydantic model classes. Handles nested objects, arrays, optional fields. Algorithmic.

## Query parameters

- `json` unknown, required
- `root_name` string

## Response `200`

Success

- object
  - `root_type` string
  - `model_count` integer
  - `pydantic_model` string

## Other responses

- `402`: Payment required (x402 — pay with USDC on Base)

---

[API](https://skmtc.dev/strale/apis/strale-api-2.md) · [All operations](https://skmtc.dev/strale/apis/strale-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/strale/apis/strale-api-2/revisions/a5293878cfc6?raw)
