SDKs overview

Software Development Kits (SDKs) and libraries for IPS Online facilitate programmatically interacting with its suite of computer vision APIs. These include services for Image Tagging, Object Detection, Facial Recognition, and Content Moderation. By abstracting the underlying HTTP requests and JSON parsing, SDKs enable developers to integrate these functionalities using familiar programming language constructs rather than direct API calls. This approach aims to reduce development time and potential errors when building applications.

IPS Online provides official SDKs in several popular programming languages, ensuring broad compatibility and support for various development environments. These SDKs often include features such as authentication management, request marshaling, response unmarshaling, and error handling, which are critical for robust API integration. The availability of a free tier of 5,000 API calls per month allows developers to test these SDKs and their corresponding API functionalities without an initial financial commitment.

Official SDKs by language

IPS Online maintains official SDKs for Python, Node.js, PHP, Ruby, Java, and Go. These SDKs are designed to provide a consistent and idiomatic interface for each language, aligning with typical programming patterns and conventions. The SDKs are regularly updated to reflect changes and enhancements in the IPS Online API, ensuring ongoing compatibility and access to new features. Detailed documentation for each SDK, including installation instructions and usage examples, is available on the IPS Online documentation portal.

The following table summarizes the key official SDKs:

Language Package Manager/Repository Install Command Example Maturity
Python PyPI pip install ipsonline-sdk-python Stable
Node.js npm npm install @ipsonline/sdk-nodejs Stable
PHP Composer composer require ipsonline/sdk-php Stable
Ruby RubyGems gem install ipsonline-sdk-ruby Stable
Java Maven/Gradle Maven: <dependency><groupId>net.ipsonline</groupId><artifactId>sdk-java</artifactId><version>1.0.0</version></dependency> Stable
Go Go Modules go get github.com/ipsonline/sdk-go Stable

Installation

Installation for each SDK typically follows the standard practices of its respective language ecosystem. Developers usually add the SDK as a dependency to their project using a package manager. Here are specific installation steps for the primary languages:

Python

To install the Python SDK, use pip, the standard package installer for Python. It's recommended to do this within a Python virtual environment to manage project dependencies effectively.

pip install ipsonline-sdk-python

Node.js

For Node.js projects, the npm package manager is used to install the SDK. This will add the @ipsonline/sdk-nodejs package to your project's node_modules directory and update your package.json file.

npm install @ipsonline/sdk-nodejs

PHP

The PHP SDK is installed via Composer, the dependency manager for PHP. Ensure Composer is installed on your system before running the command.

composer require ipsonline/sdk-php

Ruby

Ruby projects use RubyGems to manage libraries. The IPS Online Ruby SDK can be installed directly from the command line.

gem install ipsonline-sdk-ruby

Java

For Java, the SDK is typically managed through build tools like Maven or Gradle. If using Maven, add the dependency to your pom.xml file:

<dependency>
    <groupId>net.ipsonline</groupId>
    <artifactId>sdk-java</artifactId>
    <version>1.0.0</version> <!-- Check official documentation for the latest version -->
</dependency>

For Gradle, add it to your build.gradle file:

implementation 'net.ipsonline:sdk-java:1.0.0' // Check official documentation for the latest version

Go

Go modules are used to manage dependencies in Go projects. The Go SDK can be fetched using the go get command.

go get github.com/ipsonline/sdk-go

Quickstart example

This section provides a quickstart example demonstrating how to use the IPS Online SDKs. The examples focus on a common use case: image tagging, which uses the IPS Online Image Tagging API to analyze an image and return relevant tags. To run these examples, you will need an API key, which can be obtained by signing up on the IPS Online website.

Python Quickstart (Image Tagging)

This Python example initializes the SDK client and calls the image tagging service. It assumes you have an image URL to process.

from ipsonline_sdk_python import IPSOnlineClient
from ipsonline_sdk_python.models import ImageTaggingRequest

# Replace with your actual API key
API_KEY = "YOUR_IPS_ONLINE_API_KEY"

# Initialize the client
client = IPSOnlineClient(api_key=API_KEY)

# Prepare the request for image tagging
image_url = "https://example.com/your-image.jpg" # Replace with your image URL
tagging_request = ImageTaggingRequest(image_url=image_url)

try:
    # Call the image tagging API
    response = client.image_tagging.analyze_image(tagging_request)

    print("Image Tagging Results:")
    for tag in response.tags:
        print(f"- {tag.name}: {tag.confidence:.2f}")

except Exception as e:
    print(f"An error occurred: {e}")

Node.js Quickstart (Image Tagging)

The Node.js example demonstrates similar functionality, using asynchronous operations typical of Node.js development to handle the API request and response.

const { IPSOnlineClient, ImageTaggingRequest } = require('@ipsonline/sdk-nodejs');

// Replace with your actual API key
const API_KEY = "YOUR_IPS_ONLINE_API_KEY";

// Initialize the client
const client = new IPSOnlineClient(API_KEY);

// Prepare the request for image tagging
const imageUrl = "https://example.com/your-image.jpg"; // Replace with your image URL
const taggingRequest = new ImageTaggingRequest(imageUrl);

async function tagImage() {
  try {
    // Call the image tagging API
    const response = await client.imageTagging.analyzeImage(taggingRequest);

    console.log("Image Tagging Results:");
    response.tags.forEach(tag => {
      console.log(`- ${tag.name}: ${tag.confidence.toFixed(2)}`);
    });
  } catch (error) {
    console.error(`An error occurred: ${error.message}`);
  }
}

tagImage();

Community libraries

While IPS Online provides a comprehensive set of official SDKs, the developer community sometimes contributes additional libraries, tools, or integrations. These community-driven projects can offer specialized functionalities, integrations with specific frameworks, or alternative language bindings that complement the official offerings. For instance, developers might create wrappers for less common languages, plugins for content management systems, or CLI tools that leverage the IPS Online API for specific automation tasks.

Community libraries are typically hosted on platforms like GitHub or language-specific package repositories (e.g., PyPI, npm, RubyGems). Developers interested in exploring community contributions should consult the IPS Online community resources page or search relevant repositories using keywords like "IPS Online" or "IPSO Vision API." It is important to note that community libraries may not carry the same level of support or maintenance as official SDKs. Developers should review the project's documentation, activity, and licensing before integrating community-contributed code into production systems. For example, some community contributions may focus on integrating computer vision with geospatial data platforms, creating specialized tools for a niche application area.