Skip to main content
The Samsa API brings Samsa’s generative image and video studio to your own applications. Authenticate with an organization API key, submit a job, and poll for the result — the same models, trained assets, and credit pool your team already uses in the app, now available over a clean REST interface and a remote MCP server.
Base URL — all REST endpoints live under
https://api.samsa.ai/public/v1
Preview 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.
Every generation endpoint is asynchronous: a 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:
Authorization: Bearer samsa_sk_your_key_here
Keys carry scopes (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:
https://api.samsa.ai/mcp
The MCP endpoint supports dual authentication — OAuth 2.1 (with a consent screen in the Samsa app) for interactive clients such as ChatGPT and Claude, and 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 costs 5 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.