Skip to main content

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

Local guides live in docs/ (getting started, every resource, CLI, async, errors).

Online examples: docs.synapsai.cloud.


Available Resources

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

Resource Description
models Model management and discovery
chat.completions Chat completions, streaming, and stored CRUD
responses Responses API create / retrieve / delete
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
vector_stores Vector stores and file ingestion/search
model_artifacts Model artifact upload sessions
agents Persisted agent runs (AG-UI SSE)

CLI

After install, the synapsai command is available:

# Upload a model directory into an existing artifact (default host: upload.synapsai.cloud)
synapsai upload-model ./my-model --artifact-id artifact-demo-abc12345

# Upload files or directories into a vector store
synapsai upload-vector-store-files vs_abc123 ./docs ./readme.md

Environment variables:

  • SYNAPSAI_API_KEY — API key
  • SYNAPSAI_API_BASE — Inference/API base (default https://api.synapsai.cloud/v1)
  • SYNAPSAI_UPLOAD_BASE — Model upload base (default https://upload.synapsai.cloud/v1)

License

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

Metadata

Release files for synapsai-python 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for synapsai-python 0.1.1
File Size Uploaded Provenance Actions
synapsai_python-0.1.1.tar.gz 49.1 kB Without provenance Details for synapsai_python-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for synapsai-python 0.1.1
File Interpreter ABI Platform Actions
synapsai_python-0.1.1-py3-none-any.whl Python 3 none any Details for synapsai_python-0.1.1-py3-none-any.whl

Total release size: 123.1 kB

Release files / synapsai_python-0.1.1.tar.gz

Download URL synapsai_python-0.1.1.tar.gz
Size 49.1 kB
Tags Source
SHA-256 checksum
How to use checksums
94c10a1a0712f1bd42774981eddfa8fdac32845636123928eeeb2334b573bf4a
BLAKE2b-256 checksum
How to use checksums
834e14107020f9f50173514328d68d1d9f0fc8dbb9e8908ece772a36b5e1c83c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.3

Release files / synapsai_python-0.1.1-py3-none-any.whl

Download URL synapsai_python-0.1.1-py3-none-any.whl
Size 74.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e77c2d2af78d911c031362c822c34bdc7be65cae40baba52e47f482c053a212d
BLAKE2b-256 checksum
How to use checksums
2e0f04ab7344dea32ea2b8f021e2fcad8e8efea49fcc2225c7b3f649fb1e1109
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.3

Security for synapsai-python 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page