Learning-oriented guides
Hands-on lessons that guide you through building something concrete with Socaity AI. Optimized for learning, not production use.
Socaity AI is built around three layers that work in concert:
Import AI models as functions. Works locally and in production. Available for Python and JavaScript.
Build and deploy AI services. Wrap any model with a task endpoint and ship it to the cloud.
Serverless or dedicated GPU hosting. Scales to zero between requests, with no DevOps overhead.
In this tutorial you'll install the Socaity SDK, import a model, and run your first inference.
Install the SDK
pip install socaityImport a model
import os
from socaity import flux_schnell
flux = flux_schnell(api_key=os.getenv("SOCAITY_API_KEY"))Run inference
result = flux(
prompt="A cat wearing sunglasses on the moon",
num_outputs=1,
).get_result()
result[0].save("my_first_image.png")Build an image service with APIPod and deploy it to serverless GPU — no DevOps required.
Install APIPod
pip install apipodDefine a task endpoint
from apipod import APIPod
app = APIPod()
@app.endpoint("/generate")
def generate(prompt: str):
return model.generate(prompt)Deploy to the cloud
apipod --build Unified socaity deploy CLI coming soon — it will mirror apipod for convenience.