Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

api

> 编程语言
Open source

Automatic SDK generation from an OpenAPI definition

692 stars0 likes1 views
WebsiteGitHub

About

Automatic SDK generation from an OpenAPI definition

Magical SDK generation from an OpenAPI definition

  • Installation
  • Usage
    • Authentication
    • Parameters and Payloads
    • Making requests
    • Server configurations
  • How does it work?
  • FAQ

api is a library that facilitates creating an SDK from an OpenAPI definition. You can use its codegen offering to create an opinionated SDK for TypeScript or JS (+ TypeScript types).

bash
$ npx api install https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json
javascript
const petstore = require('@api/petstore');

petstore.listPets().then(({ data }) => {
  console.log(`My pets name is ${data[0].name}!`);
});

The ESM syntax is supported as well:

javascript
import petstore from '@api/petstore';

petstore.listPets().then(({ data }) => {
  console.log(`My pets name is ${data[0].name}!`);
});

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptapiopenapisdkswagger

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言