api  by instant-dev

Framework for building type-safe web APIs with JavaScript

created 1 year ago
252 stars

Top 99.7% on sourcepulse

GitHubView on GitHub
Project Summary

Instant API is a JavaScript framework for building type-safe web APIs, designed to eliminate the need for separate schema validation libraries. It targets developers building APIs, especially those integrating with LLMs, by automatically generating OpenAPI specifications from JSDoc comments and offering first-class support for Server-Sent Events (SSE) and LLM function calling.

How It Works

Instant API leverages JSDoc comments within JavaScript functions to define API endpoints, parameters, and return types. This approach enforces type safety directly at the HTTP interface, automatically generating OpenAPI (JSON/YAML) and JSON schemas. For LLM integrations, it supports SSE for streaming responses and JSON schema output for function calling.

Quick Start & Requirements

  • Install: npm i instant.dev -g
  • Initialize Project: instant init
  • Run Server: instant serve or npm start
  • Prerequisites: Node.js. Optional: instant.dev CLI for project generation and deployment.
  • Docs: instant.dev

Highlighted Details

  • Type-safe API development via JSDoc annotations.
  • Automatic OpenAPI and JSON schema generation.
  • First-class support for Server-Sent Events (SSE) for LLM streaming.
  • Built-in support for LLM function calling via JSON schema.
  • Background execution for webhooks and chatbots.
  • Integrated testing framework.

Maintenance & Community

  • Developed over six years as the engine for the Autocode serverless platform, handling over 100M requests daily.
  • Community links: Discord, X.

Licensing & Compatibility

  • The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The project's license is not clearly stated in the README, which could be a concern for commercial adoption. While it mentions six years of development, it also refers to itself as an "early release."

Health Check
Last commit

2 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
1 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Travis Fischer Travis Fischer(Founder of Agentic), and
1 more.

fastmcp by punkpeye

3.7%
2k
TypeScript framework for building MCP servers handling client sessions
created 7 months ago
updated 3 days ago
Feedback? Help us improve.