Skip to main content
Samsa runs a remote Model Context Protocol (MCP) server, so any MCP-capable client — Claude, ChatGPT, Claude Code, Cursor, n8n, and more — drives your organization’s Samsa studio as a set of tools. Generate images with your trained style, object, person, and setting models, run Magic Edit, produce video, and check your credit balance — all from inside the app or agent you already work in. Nothing to install: it’s one URL and a sign-in.

Generate images

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 from a prompt — with or without a mask — and reuse the same trained models for on-brand results.

Create video

Produce video from a start frame, from text, or from text styled with your trained models — all as a single tool call.

Track jobs & credits

Poll any job to completion and read your organization’s remaining credit balance — reads are always free.
Server URL — add this one endpoint to any MCP client:
https://api.samsa.ai/mcp
It is a remote server over Streamable HTTP — there is nothing to install, no local process to run, and a single path (/mcp, no trailing slash) serves both authentication modes. The transport is stateless: every tool call returns a single JSON response, and generation tools return a job id immediately so nothing holds a long-lived stream open.

Get connected in three steps

1

Get your credentials

Interactive apps — Claude and ChatGPT — sign in with OAuth; you approve a consent screen in the Samsa app and never paste a key. Headless clients — Claude Code, Cursor, n8n, SDKs — use an API key created in Settings → API Keys.
2

Add the server

Point your client at https://api.samsa.ai/mcp. There’s nothing to install and no local process — see your client below for the exact one-time setup.
3

Start creating

Your client lists the seven Samsa tools. Ask it to generate an image, run a Magic Edit, or make a video — it submits the job and polls it to completion for you.

Authentication

The MCP endpoint accepts two credential types on the same URL. Pick the one that matches your client:
ModeBest forHow it works
OAuth 2.1Interactive apps — Claude (web/desktop), ChatGPTYou sign in with your Samsa account and approve a consent screen in the app. The client handles the token; you never paste a key.
API key (samsa_sk_…)Headless clients — Claude Code, Cursor, VS Code, n8n, SDKsSend Authorization: Bearer samsa_sk_…. Create keys in Settings → API Keys; the key’s scopes gate which tools it can call.
Both act for an organization: credits are drawn from that organization’s pool and generated assets appear in the app under the connected account. See Authentication for how keys, scopes, and organizations work.
OAuth sign-in follows the standard MCP flow: the client discovers Samsa’s authorization server from the 401 challenge, registers itself dynamically (PKCE, no client secret), and sends you through a consent screen before exchanging a short-lived access token. The interactive browser consent flow is in early access — if a sign-in doesn’t complete, tell us at support@samsa.ai.

Tools

The server exposes seven tools. Reads (list_models, get_model, get_job_status, get_credit_balance) are free; the three generation tools cost credits from your organization’s pool, at the same rates as the app and REST API.
ToolWhat it doesScopeCost
list_modelsList your organization’s ready trained models (id, name, category, thumbnail).models.readFree
get_modelFull detail for one model — status, reference images, default prompt, trigger words.models.readFree
generate_imageGenerate images from a prompt, optionally composing your trained models.images.generate5 × outputs × resolution
edit_imageMagic Edit — edit an image from a prompt.images.edit5 per output
generate_videoGenerate video from a start frame, from text, or from text styled with your models.videos.generate5 / second × engine × resolution × audio
get_job_statusPoll a submitted image, edit, video, or model job for status and results.scope of the submitting toolFree
get_credit_balanceRead your organization’s remaining credit balance and billing period.usage.readFree
A tool call rejected for a missing scope returns a structured tool error (not a crash) naming the scope it needs. Keys are created with all scopes by default; an admin can narrow or widen a key in Settings → API Keys.

Parameters

  • category (optional) — filter to one of style, object, person, setting.
Returns your organization’s ready models with id, name, category, and a presigned thumbnail_url. Use the ids as style_id / object_ids / person_ids / setting_ids in generate_image and generate_video.
  • model_id (required) — the model’s id.
Returns full detail: status, readiness, presigned reference-image URLs, the default prompt, and trigger words.
  • prompt (required) — the text prompt.
  • style_id, object_ids, person_ids, setting_ids (optional) — trained model ids from list_models to compose.
  • num_outputs (default 1), aspect_ratio (default "1:1"), resolution (default "1K"; 1K / 2K / 4K).
Async — returns { id, status: "pending", estimated_credits } immediately. Cost: 5 × num_outputs × resolution (1K ×1, 2K ×2, 4K ×4), deducted at submit.
  • prompt (required) — how to edit the image.
  • Exactly one of image_id (an image in your Samsa context) or image_url (a public https URL).
  • engine (optional)nano_banana_pro (default), gemini, or kontext.
Async — returns { id, status: "pending", estimated_credits }. Cost: 5 credits per output (nano_banana_pro scales with resolution: 1K ×1, 2K ×2, 4K ×4), deducted at submit.
  • mode (required) — one of:
    • image_to_video — animate a start frame. Requires exactly one of image_id / image_url; optional end_image_url on end-frame-capable engines; prompt optional.
    • text_to_video — requires prompt.
    • text_to_video_styled — requires prompt and style_id; object_ids / person_ids / setting_ids optional.
  • engine (default veo_3_1_lite), duration (default: the engine’s shortest supported duration, in seconds), aspect_ratio (default "16:9"; also 9:16, 1:1).
Async — returns { id, status: "pending", estimated_credits }. Cost: 5 / second × engine × resolution × audio multipliers; styled mode adds a flat 10 for the intermediate image. See pricing.
  • kind (required)image_generation, image_edit, video, or model.
  • id (required) — the job or model id a submit tool returned.
Returns the status (pendingprocessingcompleted / failed) and, once completed, presigned result URLs valid for 24 hours. Requires the scope of the submitting tool (models.read for kind: "model").
No parameters. Returns your organization’s available total, plan credits, top-up credits, and the current billing period.

The async pattern

The three generation tools are asynchronous — they enqueue a job and return right away, so your client never blocks waiting for a render.
1

Submit

Call generate_image, edit_image, or generate_video. It returns { id, status: "pending", estimated_credits, next_step } in milliseconds, and the estimated credits are deducted from your organization’s pool at submit.
2

Poll

Call get_job_status(kind=…, id=…) with the id you received. The status moves pendingprocessingcompleted (or failed). Image jobs typically finish in 30 seconds to two minutes; video in one to five.
3

Collect

Once completed, the response carries presigned result URLs valid for 24 hours. If a job ends failed on Samsa’s side, the credits are automatically refunded to the same pool.
The server tells connected models this itself: every submit result includes a next_step string with the exact get_job_status call to make, so a capable agent polls without extra prompting.

Set up your client

Add https://api.samsa.ai/mcp to your client below. Claude and ChatGPT sign in with OAuth; every other client authenticates with an API key (Authorization: Bearer samsa_sk_…).
The API-key snippets below show the key inline for readability. In any config that is committed or shared, don’t store a real key — use your client’s environment-variable interpolation (shown for Claude Code, Cursor, and VS Code) or keep the config user-level. A leaked samsa_sk_… should be revoked immediately.
OAuth · early access — tell us if this breaksClaude (web and desktop) connects to remote MCP servers as a custom connector:
1

Add the connector

Open Settings → Connectors → Add custom connector and set the URL to https://api.samsa.ai/mcp.
2

Sign in

Claude opens Samsa’s OAuth sign-in; sign in and approve the consent screen. Claude’s tools list then shows the Samsa tools.
Exact menu labels vary by version — the essentials are the custom-connector flow and the Samsa server URL. Claude web calls /mcp from the browser with Origin: https://claude.ai, which Samsa allows, so discovery and sign-in work without extra configuration. On desktop, follow Anthropic’s current connector instructions and use the same server URL.
Config snippets for Claude Code, Cursor, VS Code, Windsurf, Codex, n8n, Claude web, ChatGPT, and the MCP Inspector come from Samsa’s backend client-config verification matrix. Platforms marked early access were not exercised end-to-end at the time of writing — if a step is off, email support@samsa.ai and we’ll fix it fast.

Security, credits & access

MCP tool calls are real actions on your organization — they spend credits and create assets exactly like the app and REST API. Treat an API key connected to an MCP client like any other production secret.
  • Credits. generate_image, edit_image, and generate_video draw from your organization’s shared credit pool at the app’s rates. Reads are free. Check the balance any time with get_credit_balance.
  • Scopes. Every tool requires a scope. An API key or OAuth token only exposes the tools its scopes allow — narrow a key to exactly what an integration needs.
  • Revoking access. An admin revokes an API key in Settings → API Keys; revocation is terminal and takes effect on the very next call. For an OAuth connection, disconnect the connector in your client (Claude or ChatGPT connector settings); access tokens can also be revoked at Samsa’s OAuth revocation endpoint. A revoked credential stops working immediately.

Troubleshooting

A 401 is the server asking the client to (re)authenticate.
  • OAuth clients: disconnect the Samsa connector and reconnect to restart the sign-in. If consent never completes, it may be the early-access browser flow — tell us.
  • API-key clients: confirm the header is exactly Authorization: Bearer samsa_sk_... and the key is valid — a missing, expired, or revoked key returns 401 invalid_api_key. Create a fresh key in Settings → API Keys if in doubt.
A credential always acts for one organization. An API key acts for the organization that owns it — to act for a different org, use a key created in that org. An OAuth connection acts for the account and organization you signed in with — reconnect to switch. Credits are drawn from, and assets appear in, that organization.
If your organization’s pool can’t cover a generation, the submit tool returns a structured insufficient_credits error before any job runs — nothing is charged. Check get_credit_balance, then top up or upgrade in the Samsa app. Reads are always free.
Three independent limits can slow a burst of calls:
  • Per-key request rate — 60 requests/minute; excess returns rate_limited.
  • Per-organization concurrency — at most 5 in-flight jobs at once; a sixth returns too_many_active_jobs. Let jobs finish (poll get_job_status) before submitting more.
  • MCP transport concurrency — a burst of simultaneous /mcp requests on a single worker can return a transient 429 concurrency_limit_exceeded with Retry-After: 1. Wait one second and retry.
See Rate limits for the full picture and back-off guidance.
Tools you can’t call are hidden or rejected because the connected credential lacks their scope. For example, generate_image needs images.generate. Edit the key’s scopes (or issue a new key) in Settings → API Keys, then reconnect.

See also

Authentication

Organization keys, scopes, and the Bearer header.

Pricing

How image, edit, and video credits are calculated.

Rate limits

Per-key rate, per-org concurrency, and back-off.

API reference

The REST surface behind the same tools.