# Samsa > Developer documentation for the Samsa public API — image generation with trained models, Magic Edit, video generation, model training, and the MCP server. ## Documentation ### Get started - [Welcome to the Samsa API](https://docs.samsa.ai/index.md): Samsa's image and video studio, available to your own code — over REST, from any MCP client, or as a free content check. - [Quickstart](https://docs.samsa.ai/quickstart.md): Create an API key and generate your first image with a trained style model in five steps. ### Guides - [Authentication](https://docs.samsa.ai/guides/authentication.md): Organization API keys, scopes, and the Bearer header every Samsa API request needs. - [Image inputs](https://docs.samsa.ai/guides/image-inputs.md): How to supply source images to the API and MCP tools — by image_id, https URL, or base64 — with size, format, and URL-fetch rules. - [Errors](https://docs.samsa.ai/guides/errors.md): The Samsa API error envelope, every error code, and how to handle each one. - [Rate limits](https://docs.samsa.ai/guides/rate-limits.md): Per-key request limits, per-organization concurrency caps, the headers to watch, and how to back off. - [Pricing](https://docs.samsa.ai/guides/pricing.md): How API actions draw credits from your organization's pool, with cost tables for images, edits, models, and video. - [Webhooks](https://docs.samsa.ai/guides/webhooks.md): Receive a signed callback when a job finishes, verify the signature, and handle retries. - [Content provenance](https://docs.samsa.ai/guides/content-provenance.md): How the Samsa API marks AI-generated and AI-modified images — C2PA signing, invisible watermarking, and the SVG scope-out — and how to verify a file. ## API reference ### Overview - [Samsa API](https://docs.samsa.ai/api.md): Generate images, edit and transform them, produce video, and train custom models — programmatically, from your organization's Samsa account. - [API reference](https://docs.samsa.ai/api-reference/introduction.md): The Samsa public REST API — base URL, authentication, and conventions. ### Endpoints #### Image Generation - [Image Generation](https://docs.samsa.ai/api-reference/images/overview.md): Generate images from a prompt, optionally composing your organization's trained models. - [Generate images](https://docs.samsa.ai/api-reference/images/generate.md): Submit an image-generation job — prompt plus optional trained models — and get a job id back. - [Get an image generation](https://docs.samsa.ai/api-reference/images/get-generation.md): Poll an image-generation job for status and, once completed, the produced images. - [List image engines](https://docs.samsa.ai/api-reference/images/list-engines.md): The text-to-image engines you can use — aspect ratios, resolutions, credits, and trained-model support per engine. #### Image Uploads - [Image Uploads](https://docs.samsa.ai/api-reference/uploads/overview.md): Upload a local image file to get an image_id you can use as a source in edits, image operations, and image-to-video. - [Prepare an image upload](https://docs.samsa.ai/api-reference/uploads/prepare.md): Step 1 of the image upload: get an image_id and a presigned PUT URL for a local file. - [Complete an image upload](https://docs.samsa.ai/api-reference/uploads/complete.md): Step 3 of the image upload: verify the uploaded file and make its image_id usable. #### Image Editing - [Image Editing](https://docs.samsa.ai/api-reference/edits/overview.md): Edit an existing image with a prompt — with or without a mask — reusing your trained models. - [Edit an image](https://docs.samsa.ai/api-reference/edits/create.md): Submit a Magic Edit job — a source image plus a prompt, optionally masked and styled. - [Get an image edit](https://docs.samsa.ai/api-reference/edits/get-edit.md): Poll a Magic Edit job for status and, once completed, the edited images. #### Image Operations - [Image Operations](https://docs.samsa.ai/api-reference/image-ops/overview.md): Transform an existing image — img2img, variations, upscale, resize, background removal, and vectorization. - [Transform images (img2img)](https://docs.samsa.ai/api-reference/image-ops/img2img.md): Submit an img2img job — 1–14 reference images plus a prompt — and get a job id back. - [Get an img2img job](https://docs.samsa.ai/api-reference/image-ops/get-img2img.md): Poll an img2img job for status and, once completed, the produced images. - [Generate variations](https://docs.samsa.ai/api-reference/image-ops/variations.md): Submit a variations job — one source image, optionally guided — and get a job id back. - [Get a variations job](https://docs.samsa.ai/api-reference/image-ops/get-variations.md): Poll a variations job for status and, once completed, the produced images. - [Upscale an image](https://docs.samsa.ai/api-reference/image-ops/upscale.md): Submit an upscale job — one source image to a higher target resolution — and get a job id back. - [Get an upscale job](https://docs.samsa.ai/api-reference/image-ops/get-upscale.md): Poll an upscale job for status and, once completed, the produced image. - [Resize an image](https://docs.samsa.ai/api-reference/image-ops/resize.md): Submit a resize job — one source image to a new aspect ratio (server-side outpaint). - [Get a resize job](https://docs.samsa.ai/api-reference/image-ops/get-resize.md): Poll a resize job for status and, once completed, the produced images. - [Remove a background](https://docs.samsa.ai/api-reference/image-ops/remove-background.md): Submit a background-removal job — one source image — and get a transparent PNG back. - [Get a background-removal job](https://docs.samsa.ai/api-reference/image-ops/get-background-removal.md): Poll a background-removal job for status and, once completed, the transparent PNG. - [Vectorize an image](https://docs.samsa.ai/api-reference/image-ops/vectorize.md): Submit a vectorization job — one source image to SVG — and get a job id back. - [Get a vectorization job](https://docs.samsa.ai/api-reference/image-ops/get-vectorization.md): Poll a vectorization job for status and, once completed, the produced SVG. #### Video Generation - [Video Generation](https://docs.samsa.ai/api-reference/videos/overview.md): Produce video from a start frame, from text, or from text styled with your trained models. - [Generate a video](https://docs.samsa.ai/api-reference/videos/generate.md): Submit a video job in image-to-video, text-to-video, or text-to-video-styled mode. - [Get a video generation](https://docs.samsa.ai/api-reference/videos/get-generation.md): Poll a video-generation job for status and, once completed, the produced video. - [List video engines](https://docs.samsa.ai/api-reference/videos/list-engines.md): The public video engine catalog — modes, durations, resolutions, and pricing per engine. #### Prompt Improvement - [Prompt Improvement](https://docs.samsa.ai/api-reference/prompts/overview.md): Turn a short prompt into a detailed, generation-ready prompt for an image or a video — 1 credit per call. Coming soon. - [Improve a prompt](https://docs.samsa.ai/api-reference/prompts/improve.md): Rewrite a short prompt into a detailed prompt for an image or a video generation. Synchronous, 1 credit per call. Coming soon. #### Model Training - [Model Training](https://docs.samsa.ai/api-reference/model-training/overview.md): Create custom models — style, object, person, or setting — from reference images. - [Create a model](https://docs.samsa.ai/api-reference/model-training/create.md): Create a model from 1–10 reference images supplied as URLs or inline base64. - [Prepare a model upload](https://docs.samsa.ai/api-reference/model-training/prepare.md): Request presigned PUT URLs for a new model's reference images (two-step upload). - [Complete a model upload](https://docs.samsa.ai/api-reference/model-training/complete.md): Finalize a prepared model after uploading its images to the presigned URLs. - [Get model status](https://docs.samsa.ai/api-reference/model-training/status.md): Poll a model's creation lifecycle status. #### Models - [Models](https://docs.samsa.ai/api-reference/models/overview.md): List, retrieve, update, and delete your organization's models. - [List models](https://docs.samsa.ai/api-reference/models/list.md): List your organization's models, newest first, with category/status filters and paging. - [Get a model](https://docs.samsa.ai/api-reference/models/get.md): Retrieve full detail for one of your organization's models. - [Update a model](https://docs.samsa.ai/api-reference/models/update.md): Update the editable fields (name, default prompt, instruction) of one of your models. - [Delete a model](https://docs.samsa.ai/api-reference/models/delete.md): Soft-delete one of your organization's models. #### Account & Usage - [Account & Usage](https://docs.samsa.ai/api-reference/account/overview.md): Introspect the authenticated key, read the credit balance, and review API usage. - [Get current key (me)](https://docs.samsa.ai/api-reference/account/me.md): Introspect the authenticated key, its organization, and available credits. - [Get credits](https://docs.samsa.ai/api-reference/account/credits.md): Read the credit balance this API key can spend. - [Get usage](https://docs.samsa.ai/api-reference/account/usage.md): Read the organization's API usage, grouped by action or day. ## MCP server - [MCP server](https://docs.samsa.ai/mcp-server.md): Connect Samsa to Claude, ChatGPT, Microsoft Copilot, and any MCP client: images with your trained models, Magic Edit, and video. - [MCP tools](https://docs.samsa.ai/mcp-server/tools.md): Every tool the Samsa MCP server exposes, with its parameters, required scope, and credit cost. - [Connect your client](https://docs.samsa.ai/mcp-server/clients.md): One-time setup for Claude, ChatGPT, Microsoft Copilot, Claude Code, Cursor, VS Code, n8n, and more. - [Security & troubleshooting](https://docs.samsa.ai/mcp-server/troubleshooting.md): Security, credits and access — plus what to do when a sign-in loops, a tool is missing, or a call is rejected. ## Content verification - [Content verification](https://docs.samsa.ai/content-verification/overview.md): The free, unauthenticated public API for checking whether an image or video was made with Samsa. - [Check an image or video](https://docs.samsa.ai/content-verification/detect.md): Upload one asset and get a per-technique detection result, with the C2PA verdict as the authoritative answer. - [Get detection info](https://docs.samsa.ai/content-verification/info.md): A machine-readable description of every Samsa marking technique, its decoder, and its hosted-decode status. - [Download a result PDF](https://docs.samsa.ai/content-verification/results.md): Fetch a digitally signed PDF record of a past detection result, available for 24 hours. ## Changelog - [Changelog](https://docs.samsa.ai/changelog.md): New endpoints, new MCP tools, and behaviour changes in the Samsa public API — newest first. ## OpenAPI Specs - [openapi](/api-reference/openapi.json) > The links below point to documentation indexes. Follow each `/_llms/` index recursively until you reach documentation pages. ## Indexes - [German (63 pages)](https://docs.samsa.ai/_llms/de.txt): Dokumentation, API-Referenz, MCP server, Inhaltsverifizierung, Changelog. - [French (63 pages)](https://docs.samsa.ai/_llms/fr.txt): Documentation, Référence API, MCP server, Vérification de contenu, Changelog. - [Italian (63 pages)](https://docs.samsa.ai/_llms/it.txt): Documentazione, Riferimento API, MCP server, Verifica dei contenuti, Changelog. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.