π Web tool that converts OpenAPI YAML/JSON specifications into structured, LLM-friendly markdown optimized for AI codegen assistants. api-ingest.com
- Dereferences
$refschemas β Inline references for readability - Surfaces authentication β Security schemes pulled into each endpoint
- Base URLs highlighted β Server information prominently displayed
- Runnable examples β Auto-generated curl commands with placeholders
- Strict separators β Delimiters prevent boundary confusion (Inspired by GitIngest, see below)
- Tag grouping β Organized by tags, alphabetically sorted
- Type normalization β Clean type display (string (uuid), array, etc.)
- Token-aware β Designed to keep endpoint chunks under 2-4K tokens
# Clone the repository
git clone https://github.com/mohidbt/apic.git
cd apic
# Terminal 1 - Start Backend
cd backend
pip install -r requirements.txt
python main.py
# Terminal 2 - Start Frontend
cd frontend
npm install
npm run devThen open http://localhost:3000 in your browser!
-
Web Interface (Recommended)
- Open http://localhost:3000
- Drag and drop your OpenAPI YAML/JSON file
- Click "Convert to Markdown"
- Download starts automatically!
-
Command Line
cd backend python transformation.py ../examples/APIs.guru-swagger.yaml -
API Endpoint
curl -X POST http://localhost:8000/convert \ -F "file=@openapi-spec.yaml" \ -o output.md
apiingest/
βββ backend/ # FastAPI server
β βββ main.py # API server with file upload
β βββ transformation.py # Core OpenAPIβMarkdown converter
β βββ requirements.txt # Python dependencies
β βββ README.md # Backend documentation
βββ frontend/ # Next.js web application
β βββ src/ # React components and pages
β βββ public/ # Static assets
β βββ package.json # Node dependencies
β βββ .env.example # Environment variables template
βββ examples/ # Example OpenAPI specifications
β βββ APIs.guru-swagger.yaml
β βββ APIs.guru-swagger.json
β βββ README.md
βββ docs/ # Documentation
β βββ SETUP.md # Detailed setup guide
β βββ DEPLOYMENT.md # Koyeb deployment instructions
β βββ QUICK_REFERENCE.md
βββ .koyeb/ # Deployment configuration
β βββ config.yaml
βββ README.md # This file
The generated markdown follows a strict, LLM-optimized structure:
# API Title
**Version:** 1.0.0
Brief description...
## Base URLs
- https://api.example.com β Production
- https://sandbox.api.example.com β Sandbox
## Authentication
- bearerAuth: HTTP BEARER
- apiKey: API Key (header: X-API-Key)Each endpoint uses strict delimiters (inspired by Gitingest):
================================================================================
ENDPOINT: [GET] /users/{id}
TAGS: Users
SUMMARY: Get a user by ID
DESCRIPTION: Retrieves detailed user information...
AUTH: Bearer token
REQUEST
Path params:
- id (string (uuid), required)
Query params:
- verbose (boolean, optional)
Body:
none
RESPONSES
- 200 (application/json): Success
- id: string (uuid, required)
- name: string (required)
- email: string (email, required)
- 404: User not found
EXAMPLE (curl)
curl -X GET \
"https://api.example.com/users/123?verbose=true" \
-H "Authorization: Bearer $TOKEN"
================================================================================
- Strict Delimiters β
=bars prevent AI from confusing endpoint boundaries - Dereferenced Schemas β No need to chase
$refpointers during code generation - Inline Auth β Security requirements visible per-endpoint
- Runnable Examples β Copy-paste curl commands with placeholder variables
- Normalized Types β Consistent type display helps pattern recognition
- Tag Grouping β Logical organization mimics developer thinking
- Token-Optimized β Chunks designed to fit in context windows
This format borrows from Gitingest's approach:
- Three-section structure (header, TOC, content)
- Repeated delimiters between entries
- Stable, deterministic ordering
- Noise filtering for clarity
Two deployment options:
Deploy backend + frontend together in one container.
See KOYEB_SINGLE_SERVICE.md for detailed instructions.
Quick steps:
- Use root-level
Dockerfile - Set environment variables (PORT, ALLOWED_ORIGINS, etc.)
- Deploy as one service
- Both services run together via supervisord
Environment Variables:
PORT=8000
ALLOWED_ORIGINS=https://{{ KOYEB_PUBLIC_DOMAIN }}/
NEXT_PUBLIC_API_URL=http://localhost:8000
NODE_ENV=productionDeploy backend and frontend as independent services.
See docs/DEPLOYMENT.md for complete instructions.
Quick Overview:
- Deploy backend service (FastAPI) from
backend/directory - Deploy frontend service (Next.js) from
frontend/directory - Set environment variables for both services
- Update CORS settings with deployed URLs
- FastAPI β Modern Python web framework
- uvicorn β ASGI server
- PyYAML β YAML parsing
- Python 3.8+
- Next.js 15 β React framework
- TypeScript β Type safety
- Tailwind CSS β Styling
- shadcn/ui β UI components
- Sonner β Toast notifications
- SETUP.md β Detailed installation and configuration
- DEPLOYMENT.md β Koyeb deployment guide
- QUICK_REFERENCE.md β Command reference
- Backend README β API documentation
- Examples β Example specifications
Try it with the included examples:
# Backend directory
cd backend
# Convert example spec
python transformation.py ../examples/APIs.guru-swagger.yaml
# Start API server for testing
python main.pyContributions welcome! This project prioritizes LLM readability over human aesthetics.
Key principles:
- Strict structure β Consistent delimiters and ordering
- Inline critical info β Auth, types, examples per endpoint
- Token efficiency β Truncate where necessary
- Deterministic output β Same input = same output
MIT β Feel free to use, modify, and distribute.
- Gitingest β LLM-optimized code repository digests
- AI Coding Assistants β Feed API docs to Claude, GPT, etc.
- API Documentation β Generate readable docs from OpenAPI specs
- Developer Onboarding β Clear, structured API references
- RAG Systems β Token-optimized chunks for retrieval
- Code Generation β Help AI understand your API structure
Found a bug or have a question?
- Open an issue on GitHub
- Check existing documentation
- Try with example files
Built with inspiration from:
- Gitingest's LLM-friendly formatting approach
- OpenAPI Specification community
- Modern web development best practices
Made with β€οΈ for developers working with LLMs