Swagger spec for the Image Intelligence API


402.6.13 years ago4 years agoMinified + gzip package size for @image-intelligence/api-specification in KB



Welcome to API Specifications!

This project contains OpenAPI specifications for the Image Intelligence API. There are currently two versions of our API (api-v1.json and v2/Api.js). Note that V1 will be marked for deprecation soon after the release of V2. If you've just started out, please build against V2.

Installation & Usage

npm install @image-intelligence/api-specification
import ApiSpec from '@image-intelligence/api-specification';


console.log(JSON.stringify(ApiSpec.v2, null, 2));

Development & Swagger

git clone git@github.com:ImageIntelligence/api-specification.git

When you're making changes to the API specification, it is often useful to verify the schema is valid:

npm install -g swagger-cli
swagger-cli help
swagger-cli validate xxx.json

Our JSON schema is generated from JavaScript files. To generate the schema:

node -e "console.log(JSON.stringify(require('./index').v2, null, 2))" | jq .
node -e "console.log(JSON.stringify(require('./index').v2, null, 2))" >! schema.json
node -e "console.log(JSON.stringify(require('./index').v2, null, 2))" | pbcopy

When editing the schema, perhaps you want a preview of your changes. The Swagger Editor can be useful here.

Not sure what Swagger or OpenAPI is? Check out this article.


To publish a new version of api-specifications, update "version" in package.json and then create a GitHub Release.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.