{"openapi":"3.1.0","info":{"title":"JSON to Types","version":"1.0.0","summary":"Turn any JSON into TypeScript types and a Zod schema.","description":"Convert a JSON sample into TypeScript interfaces and a matching Zod schema. Merges every element of an array into one union rather than typing from the first, distinguishes absent keys from null values, names nested types from their key path, and flags the places where a single sample cannot tell you the real type.\n\n**Not for:** Does not infer types from a JSON Schema or an OpenAPI document — it works from concrete sample data. Does not validate data against a schema, and does not generate types for languages other than TypeScript.\n\nFree tier: 250 calls per UTC day per caller. Past that, endpoints return 402 with x402 payment requirements. An MCP server exposing the same capabilities is available at https://json-to-types.gumballtools.com/api/mcp.","contact":{"url":"https://github.com/bwalvoord/gumball"}},"servers":[{"url":"https://json-to-types.gumballtools.com","description":"Production"}],"externalDocs":{"url":"https://json-to-types.gumballtools.com/llms-full.txt","description":"Full documentation for agents"},"paths":{"/api/v1/convert":{"get":{"operationId":"convertJson","summary":"Turn any JSON into TypeScript types and a Zod schema.","description":"Returns TypeScript interfaces, a matching Zod schema, and warnings naming every place a single sample cannot establish the real type.","parameters":[{"name":"json","in":"query","required":true,"description":"Raw JSON sample — concrete data, not a JSON Schema. Use POST for anything that will not fit in a query string.","schema":{"type":"string"}}],"responses":{"200":{"description":"The result.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input. The body names the field and how to fix it.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","fix_hint","docs"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code."},"message":{"type":"string"},"fix_hint":{"type":"string","description":"What to change before retrying."},"field":{"type":"string"},"token":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}},"docs":{"type":"string","format":"uri"}}}}}}}},"402":{"description":"Free quota of 250 calls per UTC day exhausted. Body is an x402 v1 payment requirement ($0.001 per call). While settlement is disabled the body carries payment_enabled: false and the call cannot be unblocked by paying — wait for quota.resetsAt.","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}