Skip to main content

The official SynapsAI Cloud Python SDK

Project description

SynapsAI Python SDK

License Python Version

The official SynapsAI Cloud AI inference Python SDK. Seamlessly integrate multi-modal AI capabilities into your applications.


Installation

Install the latest version of the SDK:

pip install --upgrade synapsai-python

Requirements

  • Python >= 3.8
  • httpx >= 0.23.0, < 1.0.0
  • pydantic >= 2.0, < 3
  • typing-extensions >= 4.5, < 5
  • Pillow >= 9.5.0, < 11
  • numpy >= 1.21.0, < 2

Quick Start

1. Setup Environment Variables

You can configure the SDK using environment variables instead of hardcoding your credentials:

  • SYNAPSAI_API_KEY - Your SynapsAI API key
  • SYNAPSAI_API_BASE - Custom base URL (Defaults to https://api.synapsai.cloud/v1)

2. Initialization & Example Usage

Here is how to initialize the client and fetch a list of all deployed models on your account:

import os
from synapsai import SynapsAI

# Initialize the client (picks up env variables automatically if arguments are omitted)
client = SynapsAI(
    api_key=os.environ.get("SYNAPSAI_API_KEY"),
)

# Fetch and view deployed models
models_page = client.models.list()
for model in models_page.data:
    print(f"Model ID: {model.id} | Status: {model.status}")

Documentation

For advanced configurations, deep-dive usage guides, and comprehensive code examples for every resource, visit our Examples Documentation.


Available Resources

The SDK provides native support for the following SynapsAI Cloud capabilities:

Resource Description
models Model management and discovery
chat.completions Chat completions and real-time streaming
completions Classic text completions
embeddings Text embeddings generation
images Image generation and manipulation
audio Speech-to-text and text-to-speech processing
videos Video generation and processing
classifications Text classification tasks
question_answering Targeted question answering
feature_extraction Feature extraction pipelines
fill_mask Masked Language Modeling (MLM)
rerank Text reranking for search optimization

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

synapsai_python-0.1.0.tar.gz (37.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

synapsai_python-0.1.0-py3-none-any.whl (56.7 kB view details)

Uploaded Python 3

File details

Details for the file synapsai_python-0.1.0.tar.gz.

File metadata

  • Download URL: synapsai_python-0.1.0.tar.gz
  • Upload date:
  • Size: 37.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for synapsai_python-0.1.0.tar.gz
Algorithm Hash digest
SHA256 579ed57b1ebc09951ded056a2b8b57d7ead08d0d07f763547e5dc0179d8572da
MD5 d6ef2a2c4ed0cba0ce6967d14686c3c2
BLAKE2b-256 83d194d156b465dba527eff7f7a4274b1361c59da655a88a2613042ec11231b2

See more details on using hashes here.

File details

Details for the file synapsai_python-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for synapsai_python-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d1c9f0a09873b55ba95e3e31270b26c42377f9f01d74df92721eb31bcf2da0b3
MD5 69965680ae8f9d385f592583f54bd51f
BLAKE2b-256 0012e34bcd799a5f5a5ee382e560072f8038ebc805563781cb4f154d232eef73

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page