Base URL — all REST endpoints live underPreview environments mirror the surface on
https://preview.api.samsa.ai/public/v1.Start here
Quickstart
Create a key and generate your first image in five steps, with copy-paste
curl, Python, and TypeScript.
API reference
The base URL, authentication, and the conventions every endpoint shares.
Create an API key
Keys are organization-owned, scoped, and shown once. An org admin creates
them in your Samsa settings.
MCP server
Connect Samsa to ChatGPT, Claude, or any MCP client over OAuth or an API key.
What you can build
Image generation
Turn a prompt into images, optionally composing your organization’s trained
style, object, person, and setting models and color palettes.
Magic Edit
Edit an existing image with a prompt — with or without a mask — and reuse the
same trained models for on-brand results.
Video generation
Produce video from a start frame (with an optional end frame), from text, or
from text styled with your trained models.
Model training
Create custom models in four categories — style, object, person, and setting —
from a handful of reference images.
POST returns 202 Accepted
with a job id, you poll the matching GET endpoint for status, and — once the
job is completed — the response carries presigned URLs to the finished assets.
You can also pass a webhook_url to be notified on completion instead of polling.
Authentication
Send your key as a bearer token on every request:images.generate, images.edit, videos.generate,
models.read, models.write, usage.read) and act for the key’s organization —
credits are drawn from that organization’s pool and generated assets appear in the
app under the key creator’s account. See the quickstart to create
your first key.
Model Context Protocol (MCP)
Samsa also exposes a remote MCP server so agentic clients can generate and edit media as tools:Authorization: Bearer <api key> for headless clients such as scripts and n8n.
See the MCP server guide for the tool catalog and per-client setup.
Credits and pricing
API actions draw from your organization’s existing Samsa credit pool at the same rates as the app — for example, image generation costs5 credits per output at
1K, scaling with resolution (1K ×1, 2K ×2, 4K ×4). When the pool is
exhausted, requests return 402. Check your balance any time with
GET /credits or GET /me.