api  by instant-dev

Framework for building type-safe web APIs with JavaScript

Created 1 year ago
252 stars

Top 99.6% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
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

3 weeks ago

Responsiveness

Inactive

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

Explore Similar Projects

Feedback? Help us improve.