x402

JSON to Pydantic (x402)

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

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

Query parameters

jsonunknown required
root_namestring

Response

Success

root_typestring
model_countinteger
pydantic_modelstring

Example response

{
  "root_type": "Root",
  "model_count": 1,
  "pydantic_model": "from pydantic import BaseModel\nfrom typing import Any, List, Optional\n\nclass Root(BaseModel):\n    name: str\n    age: int"
}

Changes

No recorded changes to this operation across all 1 revision of this API.