Skip to content

Quick Start

Go from zero to live AI inference in under 5 minutes with the Socaity Python SDK.

Prerequisites

Python ≥ 3.10On your PATH
Socaity accountFree at socaity.ai

Step 1: Install the SDK

terminal
pip install socaity

Requires Python ≥ 3.10. Also installs media-toolkit for automatic file handling.

Step 2: Install a service

pip install socaity does not add every catalog client. Run socaity install <handle> for each service you call. Find the handle on the API catalog at socaity.ai (for example black-forest-labs/flux-schnell).

terminal
socaity install black-forest-labs/flux-schnell

Step 3: Import the client

Official Socaity-hosted models import from the top-level package:

python
# Socaity-hosted (official) models
from socaity import face2face

Third-party models use a deeper path. For flux_schnell the segments are replicate (platform), black_forest_labs (developer), and flux_schnell (service):

python
# Third-party models (routed via Socaity; no REPLICATE_API_KEY)
from socaity.sdk.replicate.black_forest_labs import flux_schnell

flux = flux_schnell()

Step 4: Run inference

python
# flux(...) submits the job and returns a handle immediately.
# .get_result() blocks until the job finishes (default timeout: 3600s).
result = flux(
    prompt="a lone astronaut on a neon planet, cinematic",
    num_outputs=1,
).get_result()

result.save("astronaut.png")

Step 5: Get your API key (optional)

  1. Sign in at socaity.ai
  2. Navigate to Account → Secrets
  3. Click Create key and copy the value

What's next?