Installation
Get started with PerceptOS in just a few minutes. Choose your preferred language and install the SDK.
Python
Install the Python SDK using pip:
bash
pip install perceptosThen import and initialize:
python
import perceptos
client = perceptos.Client(api_key="pk_live_...")JavaScript/Node.js
Install the JavaScript SDK using npm:
bash
npm install @perceptos/sdkThen import and initialize:
javascript
import { PerceptosClient } from "@perceptos/sdk";
const client = new PerceptosClient({
apiKey: "pk_live_..."
});Ruby
Install the Ruby gem:
bash
gem install perceptosThen require and initialize:
ruby
require 'perceptos'
client = Perceptos::Client.new(api_key: 'pk_live_...')Environment Variables
Store your API key as an environment variable:
bash
export PERCEPTOS_API_KEY="pk_live_..."Then load it automatically:
python
import os
import perceptos
api_key = os.getenv("PERCEPTOS_API_KEY")
client = perceptos.Client(api_key=api_key)Verify Installation
Test your installation by making a simple request:
python
import perceptos
client = perceptos.Client(api_key="pk_live_...")
response = client.detect(
image="https://example.com/image.jpg"
)
print(response)