SDKs

Official SDKs for Python, Node.js, and the FairStack CLI.

FairStack provides official SDKs for common languages and a CLI tool for terminal workflows.

Python SDK

pip install fairstack
from fairstack import FairStack

client = FairStack(api_key="fs_live_YOUR_KEY")

# Generate an image
result = client.generate.image(
    model="z-image-turbo",
    prompt="A mountain landscape at dawn"
)
print(result.url)

Node.js SDK

npm install fairstack
import {'{'} FairStack } from "fairstack";

const client = new FairStack({'{'} apiKey: "fs_live_YOUR_KEY" });

const result = await client.generate.image({'{'}
  model: "z-image-turbo",
  prompt: "A mountain landscape at dawn",
});
console.log(result.url);

REST API

All endpoints are accessible via standard HTTP requests. See the API Reference for full documentation.

curl -X POST https://api.fairstack.ai/v1/generations/image \
  -H "Authorization: Bearer $FAIRSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{'{'}"model": "z-image-turbo", "prompt": "A mountain landscape"}'

Next steps