Schema Forg AI

Overview

Schema Forg AI is a specialized language model designed to generate production-ready API schemas using the @asteasolutions/zod-to-openapi library.

Unlike generic code generation models, Schema Forg AI was specifically fine-tuned to understand the relationship between JSON structures, OpenAPI specifications, and Zod schemas, producing code compatible with the zod-to-openapi ecosystem.

The goal of the project is to simplify API documentation workflows by generating a single source of truth based on Zod, from which OpenAPI JSON and YAML specifications can be automatically exported.

What the model can do

The model can generate:

  • Zod schemas
  • @asteasolutions/zod-to-openapi code
  • OpenAPI JSON
  • OpenAPI YAML

Starting from inputs such as:

  • Raw JSON
  • Existing OpenAPI specifications
  • API endpoint definitions
  • Structured objects

Why this model?

The JavaScript ecosystem already provides excellent tools such as @asteasolutions/zod-to-openapi, but creating high-quality schemas manually is still repetitive and time-consuming.

Schema Forg AI was created to automate this process using a domain-specific language model trained exclusively for API schema generation.

Training

The model was fine-tuned on thousands of synthetic examples covering:

  • JSON โ†’ Zod
  • JSON โ†’ zod-to-openapi
  • Zod โ†’ OpenAPI
  • OpenAPI โ†’ Zod
  • OpenAPI JSON
  • OpenAPI YAML

The dataset emphasizes:

  • Nested objects
  • Arrays
  • Enums
  • Validation rules
  • Nullable fields
  • Optional properties
  • API endpoints
  • Request/Response schemas
  • Components
  • Parameters

Intended Use

This model is intended for developers working with:

  • TypeScript
  • Zod
  • @asteasolutions/zod-to-openapi
  • OpenAPI
  • REST APIs
  • Backend development

Limitations

This model is highly specialized.

It performs best on API schema generation and conversion tasks and should not be considered a general-purpose coding assistant.

Author

Developed by Edson Carvalho Inturia as an educational research project exploring synthetic dataset generation, LoRA fine-tuning, and specialized language models for API development.

Downloads last month
19
Safetensors
Model size
4B params
Tensor type
F16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for edsoncarvalhointuria/merged-schema-forg-ai

Finetuned
(1)
this model
Quantizations
1 model

Dataset used to train edsoncarvalhointuria/merged-schema-forg-ai

Space using edsoncarvalhointuria/merged-schema-forg-ai 1