{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The provided API key is invalid, expired, or revoked.",
"request_id": "8f14e45fceea167a5a36dedd4bea2543",
"param": "aspect_ratio"
}
}
{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The provided API key is invalid, expired, or revoked.",
"request_id": "8f14e45fceea167a5a36dedd4bea2543",
"param": "aspect_ratio"
}
}
{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The provided API key is invalid, expired, or revoked.",
"request_id": "8f14e45fceea167a5a36dedd4bea2543",
"param": "aspect_ratio"
}
}
{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The provided API key is invalid, expired, or revoked.",
"request_id": "8f14e45fceea167a5a36dedd4bea2543",
"param": "aspect_ratio"
}
}
{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The provided API key is invalid, expired, or revoked.",
"request_id": "8f14e45fceea167a5a36dedd4bea2543",
"param": "aspect_ratio"
}
}
{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The provided API key is invalid, expired, or revoked.",
"request_id": "8f14e45fceea167a5a36dedd4bea2543",
"param": "aspect_ratio"
}
}
{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The provided API key is invalid, expired, or revoked.",
"request_id": "8f14e45fceea167a5a36dedd4bea2543",
"param": "aspect_ratio"
}
}
{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The provided API key is invalid, expired, or revoked.",
"request_id": "8f14e45fceea167a5a36dedd4bea2543",
"param": "aspect_ratio"
}
}
Create a model from reference images supplied inline. The call returns
202 Accepted with a model id; poll
GET /models/{id}/status until completed.
Each of the 1–10 images is either an httpsurl (downloaded server-side
under SSRF guards) or inline base64 + mime_type (image/jpeg, image/png,
or image/webp, ≤ 10 MB each). The optional instruction is the model’s
always-applied guidance — injected as mandatory (“MUST FOLLOW”) direction into
every generation that composes the model, not a passive usage note (edit it later
with PATCH /models/{id}). Requires the
models.write scope.
Each image is either a urlorbase64 + mime_type, not both. For large
files, use the presigned upload flow
instead. category is one of style, object, person, setting.
Authorizations
Authorization
string
header
required
Organization API key (Authorization: Bearer samsa_sk_...) or OAuth 2.1 access token (Authorization: Bearer samsa_at_...).
Body
application/json
POST /models body — inline base64 and/or https-URL reference images.
name
string
required
Required string length: 1 - 100
Example:
"Acme Brand Style"
category
enum<string>
required
Model category — one of style, object, person, setting.
Available options:
style,
object,
person,
setting
Example:
"style"
images
PublicModelImageInput · object[]
required
1-10 reference images, each a url or inline base64+mime_type.
Required array length: 1 - 10 elements
Show child attributes
instruction
string | null
Optional free-text guidance for how to use the model.
Maximum string length: 8000
Example:
"Use for hero banners and social posts."
webhook_url
string | null
Optional https webhook notified once on terminal status (signed per the webhook signature scheme; see the webhooks docs).
Example:
"https://example.com/webhooks/samsa"
Response
Successful Response
202 body for POST /models and POST /models/{id}/complete (ADR §7.1).
id
string<uuid>
required
The created model's id — poll GET /models/{id}/status.
status
enum<string>
required
Initial status: pending (create) or processing (complete).
Available options:
pending,
processing,
completed,
failed
Example:
"pending"
estimated_credits
integer
required
Credits the finished job will cost (model creation is free = 0).
Example:
0
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Samsa","description":"Developer documentation for the Samsa public API — image generation with trained models, Magic Edit, video generation, model training, and the MCP server.","colors":{"primary":"#15123A","light":"#F3F0EA","dark":"#15123A"},"logo":{"light":"https://mintcdn.com/samsa-6b52d36f/KpPcBLFywFmPfDV-/logo/light.svg?fit=max\u0026auto=format\u0026n=KpPcBLFywFmPfDV-\u0026q=85\u0026s=7959ddf7b4b354d12d95c8cdd42b4c61","dark":"https://mintcdn.com/samsa-6b52d36f/KpPcBLFywFmPfDV-/logo/dark.svg?fit=max\u0026auto=format\u0026n=KpPcBLFywFmPfDV-\u0026q=85\u0026s=74213957254837206e4bb0ce9e2096b6","href":"https://samsa.ai"},"favicon":"https://mintcdn.com/samsa-6b52d36f/KpPcBLFywFmPfDV-/favicon.svg?fit=max\u0026auto=format\u0026n=KpPcBLFywFmPfDV-\u0026q=85\u0026s=24292e198dbc5bbc4dcbc1a41e807c52","appearance":{"default":"system"},"navbar":{"links":[{"href":"mailto:support@samsa.ai","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.samsa.ai"}},"seo":{"organization":{"id":"https://samsa.ai/#organization","name":"Samsa","legalName":"Samsa Labs AG","url":"https://samsa.ai","logo":"https://samsa.ai/wp-content/uploads/2026/01/samsa_logo.webp","sameAs":["https://www.linkedin.com/company/samsa-ai/"]}},"contextual":{"options":["copy","chatgpt","claude","cursor","vscode",{"title":"Connect to Microsoft Copilot","description":"Install MCP Server in Microsoft Copilot","icon":"microsoft","href":"https://docs.samsa.ai/mcp-server/clients"}],"display":"header"},"thumbnails":{"appearance":"dark","background":"https://mintcdn.com/samsa-6b52d36f/KpPcBLFywFmPfDV-/images/thumbnail-world.webp?fit=max\u0026auto=format\u0026n=KpPcBLFywFmPfDV-\u0026q=85\u0026s=ad0e6f187da0ece3388c05736841babd"},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/samsa-ai","website":"https://samsa.ai"},"links":[{"header":"Information","items":[{"label":"Docs home","href":"/"},{"label":"Changelog","href":"/changelog"},{"label":"Dashboard","href":"https://app.samsa.ai"},{"label":"Pricing","href":"https://samsa.ai/pricing"},{"label":"Contact us","href":"https://samsa.ai/contact"}]},{"header":"Legal","items":[{"label":"Terms of Service","href":"https://samsa.ai/terms-of-service"},{"label":"Acceptable Use Policy","href":"https://samsa.ai/acceptable-use-policy"},{"label":"Privacy Policy","href":"https://samsa.ai/privacy-policy"},{"label":"Imprint","href":"https://samsa.ai/imprint"}]}]},"href":""},{"language":"de","footer":{"socials":{"linkedin":"https://www.linkedin.com/company/samsa-ai","website":"https://samsa.ai"},"links":[{"header":"Informationen","items":[{"label":"Doku-Startseite","href":"/de"},{"label":"Changelog","href":"/de/changelog"},{"label":"Dashboard","href":"https://app.samsa.ai"},{"label":"Preise","href":"https://samsa.ai/de/preise"},{"label":"Kontakt","href":"https://samsa.ai/de/kontakt"}]},{"header":"Rechtliches","items":[{"label":"AGB","href":"https://samsa.ai/de/agb"},{"label":"Nutzungsrichtlinie","href":"https://samsa.ai/de/nutzungsrichtlinie"},{"label":"Datenschutz","href":"https://samsa.ai/de/datenschutz"},{"label":"Impressum","href":"https://samsa.ai/de/impressum"}]}]},"href":"de"},{"language":"fr","footer":{"socials":{"linkedin":"https://www.linkedin.com/company/samsa-ai","website":"https://samsa.ai"},"links":[{"header":"Informations","items":[{"label":"Accueil documentation","href":"/fr"},{"label":"Changelog","href":"/fr/changelog"},{"label":"Dashboard","href":"https://app.samsa.ai"},{"label":"Tarifs","href":"https://samsa.ai/fr/prix"},{"label":"Contact","href":"https://samsa.ai/fr/contact"}]},{"header":"Légal","items":[{"label":"Conditions générales","href":"https://samsa.ai/fr/conditions-generales"},{"label":"Politique d'utilisation acceptable","href":"https://samsa.ai/fr/politique-utilisation-acceptable"},{"label":"Politique de confidentialité","href":"https://samsa.ai/fr/politique-de-confidentialite"},{"label":"Mentions légales","href":"https://samsa.ai/fr/mentions-legales"}]}]},"href":"fr"},{"language":"it","footer":{"socials":{"linkedin":"https://www.linkedin.com/company/samsa-ai","website":"https://samsa.ai"},"links":[{"header":"Informazioni","items":[{"label":"Home documentazione","href":"/it"},{"label":"Changelog","href":"/it/changelog"},{"label":"Dashboard","href":"https://app.samsa.ai"},{"label":"Prezzi","href":"https://samsa.ai/it/prezzi"},{"label":"Contatti","href":"https://samsa.ai/it/contatto"}]},{"header":"Legale","items":[{"label":"Termini e condizioni","href":"https://samsa.ai/it/termini-e-condizioni"},{"label":"Politica di utilizzo accettabile","href":"https://samsa.ai/it/politica-utilizzo-accettabile"},{"label":"Informativa sulla privacy","href":"https://samsa.ai/it/informativa-sulla-privacy"},{"label":"Note legali","href":"https://samsa.ai/it/impronta"}]}]},"href":"it"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"samsa-6b52d36f","hasAudioNarration":false,"actualSubdomain":"samsa-6b52d36f","customDomains":["docs.samsa.ai"],"gitSource":{"type":"github","owner":"samsa-ai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"agentFeedback":true,"thumbs":false},"entitlements":{},"buildId":"6ae19d13f8179dd80879abc1","clientVersion":"0.0.4227","searchFilterCounts":[{"language":"en","tag":"API reference","count":45},{"language":"de","tag":"API-Referenz","count":45},{"language":"fr","tag":"Référence API","count":45},{"language":"it","tag":"Riferimento API","count":45},{"language":"en","tag":"Endpoints","count":43},{"language":"de","tag":"Endpunkte","count":43},{"language":"fr","tag":"Points de terminaison","count":43},{"language":"it","tag":"Endpoint","count":43},{"language":"en","tag":"Image Operations","count":13},{"language":"de","tag":"Bildoperationen","count":13},{"language":"fr","tag":"Opérations d'images","count":13},{"language":"it","tag":"Operazioni sulle immagini","count":13},{"language":"en","tag":"Documentation","count":9},{"language":"de","tag":"Dokumentation","count":9},{"language":"fr","tag":"Documentation","count":9},{"language":"it","tag":"Documentazione","count":9},{"language":"en","tag":"Guides","count":7},{"language":"de","tag":"Leitfäden","count":7},{"language":"fr","tag":"Guides","count":7},{"language":"it","tag":"Guide","count":7},{"language":"en","tag":"Model Training","count":5},{"language":"en","tag":"Models","count":5},{"language":"de","tag":"Modelltraining","count":5},{"language":"de","tag":"Modelle","count":5},{"language":"fr","tag":"Entraînement de modèles","count":5},{"language":"fr","tag":"Modèles","count":5},{"language":"it","tag":"Addestramento di modelli","count":5},{"language":"it","tag":"Modelli","count":5},{"language":"en","tag":"Account \u0026 Usage","count":4},{"language":"en","tag":"Image Generation","count":4},{"language":"en","tag":"Video Generation","count":4},{"language":"de","tag":"Konto \u0026 Nutzung","count":4},{"language":"de","tag":"Bildgenerierung","count":4},{"language":"de","tag":"Videogenerierung","count":4},{"language":"fr","tag":"Compte \u0026 utilisation","count":4},{"language":"fr","tag":"Génération d'images","count":4},{"language":"fr","tag":"Génération de vidéos","count":4},{"language":"it","tag":"Account \u0026 utilizzo","count":4},{"language":"it","tag":"Generazione di immagini","count":4},{"language":"it","tag":"Generazione di video","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#navigation-items>div:not(:first-child):has(>.sidebar-group-header){border-top:1px solid rgb(17 24 39 / 0.08);padding-top:1.25rem}:is(html.dark,.dark,[data-theme=\"dark\"]) #navigation-items>div:not(:first-child):has(>.sidebar-group-header){border-top-color:rgb(255 255 255 / 0.1)}img.nav-logo{height:25px;margin-bottom:3px}:root{--samsa-ink: #15123a;--samsa-paper: #f3f0ea;--samsa-night: #0e0c16;--samsa-signal: #ff4f1a;--samsa-signal-text: #c43d0b;--samsa-ring: #c43d0b}html.dark{--samsa-signal: #ff5a24;--samsa-signal-text: #ff8a5c;--samsa-ring: #ff5a24;--primary-dark: 243 240 234}:is(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline-style:solid!important;outline-width:2px!important;outline-color:var(--samsa-ring)!important}.prose a:not(.card,[data-client-link],[class*=\"samsa-hero__\"]):hover,.prose a:not(.card,[data-client-link],[class*=\"samsa-hero__\"]):hover code{color:var(--samsa-signal-text);border-bottom-color:var(--samsa-signal-text)}a:has(>.bg-primary-dark):hover>.bg-primary-dark,button:has(>.bg-primary-dark):hover>.bg-primary-dark{background-color:var(--samsa-signal);opacity:1!important}html.dark a:has(>.bg-primary-dark) :is(.text-white,[class*=\"text-white/\"]),html.dark button:has(>.bg-primary-dark) :is(.text-white,[class*=\"text-white/\"]){color:var(--samsa-night)}html.dark a:has(>.bg-primary-dark):hover :is(.text-white,[class*=\"text-white/\"]),html.dark button:has(>.bg-primary-dark):hover :is(.text-white,[class*=\"text-white/\"]){color:#fff}[data-component-part=\"card-icon\"] svg[class]{background-color:var(--samsa-signal-text)}[data-component-part=\"card-icon\"] svg:not([style*=\"mask\"]){background-color:transparent;color:var(--samsa-signal-text);fill:currentColor}.card:hover [data-component-part=\"card-title\"]{color:var(--samsa-signal-text)}:root{--world-grain: url(\"/images/worlds/grain-128.ca7f55b1c0.webp\");--world-grain-size: 128px;--world-dim: 34.5 32.5 41.5}@media (min-resolution: 1.25dppx){:root{--world-grain-size: 102.4px}}@media (min-resolution: 1.5dppx){:root{--world-grain-size: 85.333px}}@media (min-resolution: 1.75dppx){:root{--world-grain-size: 73.143px}}@media (min-resolution: 2dppx){:root{--world-grain-size: 64px}}@media (min-resolution: 2.25dppx){:root{--world-grain-size: 56.889px}}@media (min-resolution: 2.5dppx){:root{--world-grain-size: 51.2px}}@media (min-resolution: 2.625dppx){:root{--world-grain-size: 48.762px}}@media (min-resolution: 2.75dppx){:root{--world-grain-size: 46.545px}}@media (min-resolution: 3dppx){:root{--world-grain-size: 42.667px}}@media (min-resolution: 3.5dppx){:root{--world-grain-size: 36.571px}}@media (min-resolution: 4dppx){:root{--world-grain-size: 32px}}.samsa-hero,#footer{--world: url(\"/images/worlds/lucerne-night-1600.a0818645bc.webp\");--world-base: #383439;--world-vig: 44 49 53}@media (max-width: 767px){.samsa-hero,#footer{--world: url(\"/images/worlds/lucerne-night-800.774b073457.webp\")}}.samsa-hero,#footer{--vig: 0.25;--world-scrim: linear-gradient(transparent, transparent);position:relative;isolation:isolate;overflow:hidden;background-color:var(--world-base);-webkit-mask-image:linear-gradient(#000 0 0);mask-image:linear-gradient(#000 0 0)}.samsa-hero::before,#footer::before{--world-vignette: radial-gradient(\n farthest-corner ellipse at 50% 50%,\n rgb(var(--world-vig) / 0) 30%,\n rgb(var(--world-vig) / calc(var(--vig) * 0.0138)) 40%,\n rgb(var(--world-vig) / calc(var(--vig) * 0.0635)) 50%,\n rgb(var(--world-vig) / calc(var(--vig) * 0.155)) 60%,\n rgb(var(--world-vig) / calc(var(--vig) * 0.292)) 70%,\n rgb(var(--world-vig) / calc(var(--vig) * 0.477)) 80%,\n rgb(var(--world-vig) / calc(var(--vig) * 0.7124)) 90%,\n rgb(var(--world-vig) / var(--vig)) 100%\n );--world-shade-layer: linear-gradient(\n rgb(var(--world-dim) / var(--world-shade, 0)),\n rgb(var(--world-dim) / var(--world-shade, 0))\n );content:\"\";position:absolute;inset:0;z-index:-2;pointer-events:none;background-image:var(--world-shade-layer),\n var(--world-scrim),\n var(--world-vignette),\n var(--world);background-position:var(--world-x, 50%) var(--world-y, 50%);background-size:calc(100% / var(--world-zoom, 1)) calc(100% / var(--world-zoom, 1)),\n calc(100% / var(--world-zoom, 1)) calc(100% / var(--world-zoom, 1)),\n calc(100% / var(--world-zoom, 1)) calc(100% / var(--world-zoom, 1)),\n cover;background-repeat:no-repeat;transform-origin:var(--world-x, 50%) var(--world-y, 50%);scale:var(--world-zoom, 1)}.samsa-hero::after,#footer::after{content:\"\";position:absolute;inset:0;z-index:-1;pointer-events:none;border-radius:inherit;background:var(--world-grain) 0 0 / var(--world-grain-size) var(--world-grain-size);mix-blend-mode:difference}.samsa-hero{--world-x: 70%;--world-y: 40%;--world-zoom: 1.4;--world-shade: 0;--vig: 0.25;--world-scrim: radial-gradient(\n 72% 140% at 22% 50%,\n rgb(var(--world-dim) / 0.56),\n rgb(var(--world-dim) / 0.36) 60%,\n rgb(var(--world-dim) / 0)\n );margin:1.75rem 0 2.75rem;padding:2.25rem 2rem;border-radius:1rem;color:#f3f0ea}.samsa-hero__title{margin:0 0 0.55rem;max-width:22ch;font-size:1.8rem;font-weight:650;line-height:1.15;letter-spacing:-0.021em;color:#f3f0ea}.samsa-hero__lede{margin:0 0 1.35rem;max-width:46ch;font-size:0.95rem;line-height:1.6;color:#f3f0ea}.samsa-hero__actions{display:flex;flex-wrap:wrap;align-items:center;gap:0.75rem 1.25rem}.samsa-hero__cta,.samsa-hero__link{text-decoration:none;font-size:0.875rem;font-weight:600;border-radius:0.6rem}.samsa-hero__cta{display:inline-flex;align-items:center;padding:0.58rem 1.1rem;border:0;background:#f3f0ea;color:#0e0c16;transition:background-color 0.15s ease, color 0.15s ease}.samsa-hero__cta:hover{background:#ff5a24;color:#fff}.samsa-hero .samsa-hero__link{color:#f3f0ea;border-bottom:2px solid rgb(243 240 234 / 0.45);border-radius:0;padding-bottom:2px;transition:border-color 0.15s ease, box-shadow 0.15s ease}.samsa-hero .samsa-hero__link:hover{color:#f3f0ea;border-bottom-color:#ff5a24;box-shadow:0 1px 0 #ff5a24}.samsa-hero__cta:focus-visible,.samsa-hero__link:focus-visible{outline:2px solid #ff5a24!important;outline-offset:3px}@media (max-width: 640px){.samsa-hero{--world-x: 70%;--world-y: 40%;--world-zoom: 1.2;--world-scrim: radial-gradient(\n 150% 90% at 40% 35%,\n rgb(var(--world-dim) / 0.5),\n rgb(var(--world-dim) / 0.32) 60%,\n rgb(var(--world-dim) / 0.1)\n );padding:1.75rem 1.35rem}.samsa-hero__title{font-size:1.5rem}}#footer{--world-x: 60%;--world-y: 35%;--world-zoom: 1.7;--world-shade: 0.06;--vig: 0.35;--foot-glass: rgb(255 255 255 / 0.72);--foot-glass-solid: rgb(255 255 255 / 0.96);--foot-edge: rgb(21 18 58 / 0.08);--foot-rim: rgb(255 255 255 / 0.9);--foot-heading: #15123a;--foot-text: #3f3c56;--foot-quiet: #5e5a72;--foot-hover: #c43d0b;--foot-chip: rgb(21 18 58 / 0.08);margin:2.5rem 1rem 1rem;padding:2.5rem 1rem;border:0;border-radius:28px}html.dark #footer{--foot-glass: rgb(28 26 40 / 0.66);--foot-glass-solid: rgb(26 24 36 / 0.97);--foot-edge: rgb(0 0 0 / 0.4);--foot-rim: rgb(255 255 255 / 0.12);--foot-heading: #f3f0ea;--foot-text: #c2bdd1;--foot-quiet: #a7a2b8;--foot-hover: #ff8a5c;--foot-chip: rgb(255 255 255 / 0.12)}@media (min-width: 768px){#footer{margin:3rem 1.5rem 1.5rem;padding:4rem 2rem;border-radius:36px}}#footer>div{position:relative;padding:2.5rem 1.75rem 1.75rem;border-radius:24px;background:var(--foot-glass);box-shadow:0 0 0 1px var(--foot-edge),\n 0 30px 60px -28px rgb(21 18 58 / 0.32);-webkit-backdrop-filter:blur(32px) saturate(1.8) brightness(1.12);backdrop-filter:blur(32px) saturate(1.8) brightness(1.12)}@media (min-width: 768px){#footer>div{padding:3rem 3rem 2rem}}@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){#footer>div{background:var(--foot-glass-solid)}}#footer>div::before{content:\"\";position:absolute;inset:0;border-radius:inherit;padding:1px;background:linear-gradient(180deg, var(--foot-rim), transparent 40%);-webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none}#footer p{color:var(--foot-heading)}#footer a{color:var(--foot-text)}#footer a:hover{color:var(--foot-hover)}#footer svg[style*=\"mask\"]{background-color:var(--foot-text)}#footer a:hover svg[style*=\"mask\"]{background-color:var(--foot-hover)}#footer a[href*=\"mintlify.com\"]{color:var(--foot-text)}#footer a[href*=\"mintlify.com\"]:hover{color:var(--foot-hover)}#footer [class*=\"h-px\"]{background-color:var(--foot-edge)}#footer button[data-testid^=\"mode-switch\"]{color:var(--foot-quiet);background-color:transparent}#footer button[data-testid^=\"mode-switch\"][aria-pressed=\"true\"]{color:var(--foot-heading);background-color:var(--foot-chip)}#footer button[data-testid^=\"mode-switch\"]:hover{color:var(--foot-hover)}@media (min-width: 1024px) and (prefers-reduced-motion: no-preference){.samsa-hero,#footer{--world-dim: 9 7 16;--world-vig: 18 23 27;--vig: 0.3}.samsa-hero{--vig: 0.45}.samsa-hero::before,#footer::before{position:fixed;inset:0;scale:none;background-color:var(--world-base);background-image:var(--world-grain), url(\"/images/worlds/lucerne-night-1600.a0818645bc.webp\");background-position:0 0, 50% 60%;background-size:var(--world-grain-size) var(--world-grain-size),\n calc(max(100vw, 177.78vh) * 1.15) auto;background-repeat:repeat, no-repeat;background-blend-mode:difference, normal}.samsa-hero::after,#footer::after{mix-blend-mode:normal;background:linear-gradient(\n rgb(var(--world-dim) / var(--world-shade, 0)),\n rgb(var(--world-dim) / var(--world-shade, 0))\n ),\n var(--world-scrim),\n radial-gradient(\n farthest-corner ellipse at 50% 50%,\n rgb(var(--world-vig) / 0) 30%,\n rgb(var(--world-vig) / calc(var(--vig) * 0.0138)) 40%,\n rgb(var(--world-vig) / calc(var(--vig) * 0.0635)) 50%,\n rgb(var(--world-vig) / calc(var(--vig) * 0.155)) 60%,\n rgb(var(--world-vig) / calc(var(--vig) * 0.292)) 70%,\n rgb(var(--world-vig) / calc(var(--vig) * 0.477)) 80%,\n rgb(var(--world-vig) / calc(var(--vig) * 0.7124)) 90%,\n rgb(var(--world-vig) / var(--vig)) 100%\n )}}#footer a.select-none{display:flex;flex-direction:column;align-items:flex-start;gap:14px}#footer a.select-none::after{content:\"The Brand System for AI Agents\";font-size:1rem;line-height:1.5;color:var(--foot-text);white-space:nowrap}@media (max-width: 767px){#footer div:has(>a.select-none){flex-wrap:wrap;row-gap:20px}#footer a.select-none{flex-basis:100%}#footer a.select-none+div{justify-content:flex-start}}@media (min-width: 768px) and (max-width: 1023px){#footer div:has(>div>a.select-none){flex-wrap:wrap}#footer div:has(>a.select-none){flex-basis:100%}}"}]}
{"page":{"pagePath":"api-reference/model-training/create","slug":"/api-reference/model-training/create","pageMetadata":{"title":"Create a model","description":"Create a model from 1–10 reference images supplied as URLs or inline base64.","openapi":"api-reference/openapi.json POST /models","href":"/api-reference/model-training/create"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Create a model from 1–10 reference images supplied as URLs or inline base64.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Note}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Create a model from reference images supplied inline. The call returns\n`,_jsx(_components.strong,{children:_jsx(_components.code,{children:`202 Accepted`})}),` with a model `,_jsx(_components.code,{children:`id`}),`; poll\n`,_jsx(_components.a,{href:`/api-reference/model-training/status`,children:_jsx(_components.code,{children:`GET /models/{id}/status`})}),` until `,_jsx(_components.code,{children:`completed`}),`.\nEach of the 1–10 `,_jsx(_components.code,{children:`images`}),` is `,_jsx(_components.strong,{children:`either`}),` an `,_jsx(_components.code,{children:`https`}),` `,_jsx(_components.code,{children:`url`}),` (downloaded server-side\nunder SSRF guards) `,_jsx(_components.strong,{children:`or`}),` inline `,_jsx(_components.code,{children:`base64`}),` + `,_jsx(_components.code,{children:`mime_type`}),` (`,_jsx(_components.code,{children:`image/jpeg`}),`, `,_jsx(_components.code,{children:`image/png`}),`,\nor `,_jsx(_components.code,{children:`image/webp`}),`, ≤ 10 MB each). The optional `,_jsx(_components.code,{children:`instruction`}),` is the model’s\nalways-applied guidance — injected as mandatory (“MUST FOLLOW”) direction into\nevery generation that composes the model, not a passive usage note (edit it later\nwith `,_jsx(_components.a,{href:`/api-reference/models/update`,children:_jsx(_components.code,{children:`PATCH /models/{id}`})}),`). Requires the\n`,_jsx(_components.code,{children:`models.write`}),` scope.`]}),`\n`,_jsx(Heading,{level:`2`,id:`example-create-a-style-model-from-urls`,children:`Example: create a style model from URLs`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`curl`,numberOfLines:`14`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.samsa.ai/public/v1/models`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$SAMSA_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Acme Brand Style\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"category\": \"style\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"images\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"url\": \"https://cdn.example.com/ref-0.png\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"url\": \"https://cdn.example.com/ref-1.png\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"url\": \"https://cdn.example.com/ref-2.png\" }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"instruction\": \"Always render on a clean, seamless white background.\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"webhook_url\": \"https://api.example.com/hooks/samsa\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Body`,numberOfLines:`11`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Acme Brand Style\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"category\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"style\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"images\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://cdn.example.com/ref-0.png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://cdn.example.com/ref-1.png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://cdn.example.com/ref-2.png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"instruction\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Always render on a clean, seamless white background.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"webhook_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.example.com/hooks/samsa\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Each image is `,_jsx(_components.strong,{children:`either`}),` a `,_jsx(_components.code,{children:`url`}),` `,_jsx(_components.strong,{children:`or`}),` `,_jsx(_components.code,{children:`base64`}),` + `,_jsx(_components.code,{children:`mime_type`}),`, not both. For large\nfiles, use the `,_jsx(_components.a,{href:`/api-reference/model-training/prepare`,children:`presigned upload flow`}),`\ninstead. `,_jsx(_components.code,{children:`category`}),` is one of `,_jsx(_components.code,{children:`style`}),`, `,_jsx(_components.code,{children:`object`}),`, `,_jsx(_components.code,{children:`person`}),`, `,_jsx(_components.code,{children:`setting`}),`.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create a model","description":"Create a model from 1–10 reference images supplied as URLs or inline base64.","openapi":"api-reference/openapi.json POST /models","href":"/api-reference/model-training/create"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Example: create a style model from URLs","slug":"example-create-a-style-model-from-urls","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Models"],"summary":"Create a model from reference images (URLs and/or base64)","description":"Create a model from 1–10 reference images supplied as URLs or inline base64.","operationId":"create_model_models_post","requestBody":"aeb67c6d-0edf-4f22-9623-494705b5da7d","responses":{"202":"e9c32d25-2aa6-42a0-8c08-bde55e82709b","401":"1f3dbf80-8ad1-4bf4-bfe8-501bac434301","402":"da899200-ff61-46da-8bb4-2e38dc1f0686","403":"36c7a292-76e1-4f6c-b991-1267f24c3200","404":"1636b7e2-6ffc-4590-9d32-a82267bc8995","422":"a2572176-e694-4c3d-836f-42ebe42fb04a","429":"71cfa13b-9334-4710-9600-2193e3b4bb1f","500":"7fa1e231-15b9-44d2-bfd6-38f8aeae6927","503":"900215e0-bfa4-43e4-a71d-e0e8788383ab"},"method":"post","type":"path","servers":["a67142cd-ab67-49c9-9651-75e0f34b1e93"],"security":["a11deb78-1585-485f-a0ea-777224f847bc"],"path":"/models","baseUrlOptions":["https://api.samsa.ai/public/v1"],"title":"Create a model from reference images (URLs and/or base64)","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","examples":["Acme Brand Style"],"isRequired":true,"uniqueKey":"name","typeLabel":"string"},"category":{"type":"string","enum":["style","object","person","setting"],"title":"PublicModelCategory","description":"Model category — one of `style`, `object`, `person`, `setting`.","examples":["style"],"isRequired":true,"uniqueKey":"category","typeLabel":"enum\u003cstring>"},"images":{"items":{"properties":{"url":{"oneOf":[{"type":"string","title":"Url","description":"https URL of the reference image (downloaded under SSRF guards).","example":"https://cdn.example.com/ref-0.png","uniqueKey":"images.items.[INDEX].url.oneOf.0","typeLabel":"string"},{"type":"null","title":"Url","description":"https URL of the reference image (downloaded under SSRF guards).","example":"https://cdn.example.com/ref-0.png","uniqueKey":"images.items.[INDEX].url.oneOf.1","typeLabel":"null"}],"uniqueKey":"images.items.[INDEX].url","typeLabel":"string | null"},"base64":{"oneOf":[{"type":"string","title":"Base64","description":"Base64-encoded image bytes (send with `mime_type`).","uniqueKey":"images.items.[INDEX].base64.oneOf.0","typeLabel":"string"},{"type":"null","title":"Base64","description":"Base64-encoded image bytes (send with `mime_type`).","uniqueKey":"images.items.[INDEX].base64.oneOf.1","typeLabel":"null"}],"uniqueKey":"images.items.[INDEX].base64","typeLabel":"string | null"},"mime_type":{"oneOf":[{"type":"string","title":"Mime Type","description":"MIME type for a base64 image — one of: image/jpeg, image/png, image/webp.","example":"image/png","uniqueKey":"images.items.[INDEX].mime_type.oneOf.0","typeLabel":"string"},{"type":"null","title":"Mime Type","description":"MIME type for a base64 image — one of: image/jpeg, image/png, image/webp.","example":"image/png","uniqueKey":"images.items.[INDEX].mime_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"images.items.[INDEX].mime_type","typeLabel":"string | null"}},"type":"object","title":"PublicModelImageInput","description":"One reference image — either an ``https`` ``url`` to download OR inline base64.\n\nExactly one mode: ``url`` (server-side SSRF-guarded download) XOR\n(``base64`` + ``mime_type``). Base64 ``mime_type`` must be in the public\nallow-list; decoded-size validation happens in the route (§1) so we do not\nbase64-decode inside the schema.","uniqueKey":"images.items.[INDEX]","typeLabel":"PublicModelImageInput · object"},"type":"array","maxItems":10,"minItems":1,"title":"Images","description":"1-10 reference images, each a `url` or inline `base64`+`mime_type`.","isRequired":true,"uniqueKey":"images","typeLabel":"PublicModelImageInput · object[]"},"instruction":{"oneOf":[{"type":"string","title":"Instruction","description":"Optional free-text guidance for how to use the model.","maxLength":8000,"example":"Use for hero banners and social posts.","uniqueKey":"instruction.oneOf.0","typeLabel":"string"},{"type":"null","title":"Instruction","description":"Optional free-text guidance for how to use the model.","example":"Use for hero banners and social posts.","uniqueKey":"instruction.oneOf.1","typeLabel":"null"}],"uniqueKey":"instruction","typeLabel":"string | null"},"webhook_url":{"oneOf":[{"type":"string","title":"Webhook Url","description":"Optional https webhook notified once on terminal status (signed per the webhook signature scheme; see the webhooks docs).","example":"https://example.com/webhooks/samsa","uniqueKey":"webhook_url.oneOf.0","typeLabel":"string"},{"type":"null","title":"Webhook Url","description":"Optional https webhook notified once on terminal status (signed per the webhook signature scheme; see the webhooks docs).","example":"https://example.com/webhooks/samsa","uniqueKey":"webhook_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"webhook_url","typeLabel":"string | null"}},"type":"object","required":["name","category","images"],"title":"PublicModelCreateRequest","description":"`POST /models` body — inline base64 and/or https-URL reference images.","uniqueKey":"","typeLabel":"PublicModelCreateRequest · object"},"examples":{"Example":{"title":"Example","value":{"name":"Acme Brand Style","category":"style","images":[{"url":"https://cdn.example.com/ref-0.png","base64":"\u003cstring>","mime_type":"image/png"}],"instruction":"Use for hero banners and social posts.","webhook_url":"https://example.com/webhooks/samsa"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"e9c32d25-2aa6-42a0-8c08-bde55e82709b":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The created model's id — poll `GET /models/{id}/status`.","isRequired":true,"uniqueKey":"id","typeLabel":"string\u003cuuid>"},"status":{"type":"string","enum":["pending","processing","completed","failed"],"title":"PublicModelStatus","description":"Initial status: `pending` (create) or `processing` (complete).","examples":["pending"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"estimated_credits":{"type":"integer","title":"Estimated Credits","description":"Credits the finished job will cost (model creation is free = 0).","examples":[0],"isRequired":true,"uniqueKey":"estimated_credits","typeLabel":"integer"}},"type":"object","required":["id","status","estimated_credits"],"title":"PublicModelCreateAccepted","description":"`202` body for `POST /models` and `POST /models/{id}/complete` (ADR §7.1).","uniqueKey":"","typeLabel":"PublicModelCreateAccepted · object"},"examples":{"Example":{"title":"Example","value":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","status":"pending","estimated_credits":0}}},"exampleType":"generated"}},"exampleType":"generated"},"1f3dbf80-8ad1-4bf4-bfe8-501bac434301":{"description":"Missing, invalid, expired, or revoked API key.","content":{"application/json":{"schema":{"properties":{"error":{"properties":{"type":{"type":"string","title":"Type","examples":["authentication_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","title":"Code","examples":["invalid_api_key"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","examples":["The provided API key is invalid, expired, or revoked."],"isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","title":"Request Id","examples":["8f14e45fceea167a5a36dedd4bea2543"],"isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"Present on validation errors — names the offending field.","example":"aspect_ratio","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"Present on validation errors — names the offending field.","example":"aspect_ratio","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"}},"type":"object","required":["type","code","message","request_id"],"title":"ErrorDetail","description":"The ``error`` object of the public envelope (ADR §5).","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"type":"object","required":["error"],"title":"ErrorEnvelope","description":"The complete public error body — an ``error`` object wrapper (ADR §5).","uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"authentication_error","code":"invalid_api_key","message":"The provided API key is invalid, expired, or revoked.","request_id":"8f14e45fceea167a5a36dedd4bea2543","param":"aspect_ratio"}}}},"exampleType":"generated"}},"exampleType":"generated"},"da899200-ff61-46da-8bb4-2e38dc1f0686":{"description":"The organization has no usable subscription.","content":{"application/json":{"schema":{"properties":{"error":{"properties":{"type":{"type":"string","title":"Type","examples":["authentication_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","title":"Code","examples":["invalid_api_key"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","examples":["The provided API key is invalid, expired, or revoked."],"isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","title":"Request Id","examples":["8f14e45fceea167a5a36dedd4bea2543"],"isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"Present on validation errors — names the offending field.","example":"aspect_ratio","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"Present on validation errors — names the offending field.","example":"aspect_ratio","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"}},"type":"object","required":["type","code","message","request_id"],"title":"ErrorDetail","description":"The ``error`` object of the public envelope (ADR §5).","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"type":"object","required":["error"],"title":"ErrorEnvelope","description":"The complete public error body — an ``error`` object wrapper (ADR §5).","uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"authentication_error","code":"invalid_api_key","message":"The provided API key is invalid, expired, or revoked.","request_id":"8f14e45fceea167a5a36dedd4bea2543","param":"aspect_ratio"}}}},"exampleType":"generated"}},"exampleType":"generated"},"36c7a292-76e1-4f6c-b991-1267f24c3200":{"description":"The API key lacks the required scope.","content":{"application/json":{"schema":{"properties":{"error":{"properties":{"type":{"type":"string","title":"Type","examples":["authentication_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","title":"Code","examples":["invalid_api_key"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","examples":["The provided API key is invalid, expired, or revoked."],"isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","title":"Request Id","examples":["8f14e45fceea167a5a36dedd4bea2543"],"isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"Present on validation errors — names the offending field.","example":"aspect_ratio","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"Present on validation errors — names the offending field.","example":"aspect_ratio","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"}},"type":"object","required":["type","code","message","request_id"],"title":"ErrorDetail","description":"The ``error`` object of the public envelope (ADR §5).","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"type":"object","required":["error"],"title":"ErrorEnvelope","description":"The complete public error body — an ``error`` object wrapper (ADR §5).","uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"authentication_error","code":"invalid_api_key","message":"The provided API key is invalid, expired, or revoked.","request_id":"8f14e45fceea167a5a36dedd4bea2543","param":"aspect_ratio"}}}},"exampleType":"generated"}},"exampleType":"generated"},"1636b7e2-6ffc-4590-9d32-a82267bc8995":{"description":"Model not found (unknown id, another user's private model, another organization, a Samsa default/library model, deleted, or not public). Your own models — including your private ones — and non-private models in your organization are accessible.","content":{"application/json":{"schema":{"properties":{"error":{"properties":{"type":{"type":"string","title":"Type","examples":["authentication_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","title":"Code","examples":["invalid_api_key"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","examples":["The provided API key is invalid, expired, or revoked."],"isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","title":"Request Id","examples":["8f14e45fceea167a5a36dedd4bea2543"],"isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"Present on validation errors — names the offending field.","example":"aspect_ratio","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"Present on validation errors — names the offending field.","example":"aspect_ratio","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"}},"type":"object","required":["type","code","message","request_id"],"title":"ErrorDetail","description":"The ``error`` object of the public envelope (ADR §5).","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"type":"object","required":["error"],"title":"ErrorEnvelope","description":"The complete public error body — an ``error`` object wrapper (ADR §5).","uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"authentication_error","code":"invalid_api_key","message":"The provided API key is invalid, expired, or revoked.","request_id":"8f14e45fceea167a5a36dedd4bea2543","param":"aspect_ratio"}}}},"exampleType":"generated"}},"exampleType":"generated"},"a2572176-e694-4c3d-836f-42ebe42fb04a":{"description":"Request validation failed.","content":{"application/json":{"schema":{"properties":{"error":{"properties":{"type":{"type":"string","title":"Type","examples":["authentication_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","title":"Code","examples":["invalid_api_key"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","examples":["The provided API key is invalid, expired, or revoked."],"isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","title":"Request Id","examples":["8f14e45fceea167a5a36dedd4bea2543"],"isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"Present on validation errors — names the offending field.","example":"aspect_ratio","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"Present on validation errors — names the offending field.","example":"aspect_ratio","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"}},"type":"object","required":["type","code","message","request_id"],"title":"ErrorDetail","description":"The ``error`` object of the public envelope (ADR §5).","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"type":"object","required":["error"],"title":"ErrorEnvelope","description":"The complete public error body — an ``error`` object wrapper (ADR §5).","uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"authentication_error","code":"invalid_api_key","message":"The provided API key is invalid, expired, or revoked.","request_id":"8f14e45fceea167a5a36dedd4bea2543","param":"aspect_ratio"}}}},"exampleType":"generated"}},"exampleType":"generated"},"71cfa13b-9334-4710-9600-2193e3b4bb1f":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"properties":{"error":{"properties":{"type":{"type":"string","title":"Type","examples":["authentication_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","title":"Code","examples":["invalid_api_key"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","examples":["The provided API key is invalid, expired, or revoked."],"isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","title":"Request Id","examples":["8f14e45fceea167a5a36dedd4bea2543"],"isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"Present on validation errors — names the offending field.","example":"aspect_ratio","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"Present on validation errors — names the offending field.","example":"aspect_ratio","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"}},"type":"object","required":["type","code","message","request_id"],"title":"ErrorDetail","description":"The ``error`` object of the public envelope (ADR §5).","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"type":"object","required":["error"],"title":"ErrorEnvelope","description":"The complete public error body — an ``error`` object wrapper (ADR §5).","uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"authentication_error","code":"invalid_api_key","message":"The provided API key is invalid, expired, or revoked.","request_id":"8f14e45fceea167a5a36dedd4bea2543","param":"aspect_ratio"}}}},"exampleType":"generated"}},"exampleType":"generated"},"7fa1e231-15b9-44d2-bfd6-38f8aeae6927":{"description":"Internal server error.","content":{"application/json":{"schema":{"properties":{"error":{"properties":{"type":{"type":"string","title":"Type","examples":["authentication_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","title":"Code","examples":["invalid_api_key"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","examples":["The provided API key is invalid, expired, or revoked."],"isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","title":"Request Id","examples":["8f14e45fceea167a5a36dedd4bea2543"],"isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"Present on validation errors — names the offending field.","example":"aspect_ratio","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"Present on validation errors — names the offending field.","example":"aspect_ratio","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"}},"type":"object","required":["type","code","message","request_id"],"title":"ErrorDetail","description":"The ``error`` object of the public envelope (ADR §5).","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"type":"object","required":["error"],"title":"ErrorEnvelope","description":"The complete public error body — an ``error`` object wrapper (ADR §5).","uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"authentication_error","code":"invalid_api_key","message":"The provided API key is invalid, expired, or revoked.","request_id":"8f14e45fceea167a5a36dedd4bea2543","param":"aspect_ratio"}}}},"exampleType":"generated"}},"exampleType":"generated"},"900215e0-bfa4-43e4-a71d-e0e8788383ab":{"description":"Model creation is disabled on this deployment.","content":{"application/json":{"schema":{"properties":{"error":{"properties":{"type":{"type":"string","title":"Type","examples":["authentication_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","title":"Code","examples":["invalid_api_key"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","examples":["The provided API key is invalid, expired, or revoked."],"isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","title":"Request Id","examples":["8f14e45fceea167a5a36dedd4bea2543"],"isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"Present on validation errors — names the offending field.","example":"aspect_ratio","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"Present on validation errors — names the offending field.","example":"aspect_ratio","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"}},"type":"object","required":["type","code","message","request_id"],"title":"ErrorDetail","description":"The ``error`` object of the public envelope (ADR §5).","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"type":"object","required":["error"],"title":"ErrorEnvelope","description":"The complete public error body — an ``error`` object wrapper (ADR §5).","uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"authentication_error","code":"invalid_api_key","message":"The provided API key is invalid, expired, or revoked.","request_id":"8f14e45fceea167a5a36dedd4bea2543","param":"aspect_ratio"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"a11deb78-1585-485f-a0ea-777224f847bc":{"BearerAuth":{"type":"http","scheme":"bearer","description":"Organization API key (`Authorization: Bearer samsa_sk_...`) or OAuth 2.1 access token (`Authorization: Bearer samsa_at_...`).","scopes":[],"schemeName":"BearerAuth"}}},"servers":{"a67142cd-ab67-49c9-9651-75e0f34b1e93":{"url":"https://api.samsa.ai/public/v1"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Organization API key (`Authorization: Bearer samsa_sk_...`) or OAuth 2.1 access token (`Authorization: Bearer samsa_at_...`).","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Organization API key (`Authorization: Bearer samsa_sk_...`) or OAuth 2.1 access token (`Authorization: Bearer samsa_at_...`).","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"samsa-6b52d36f","siteName":"Samsa","title":"Create a model - Samsa","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/model-training/create","matchLevel":0},"de":{"href":"/de/api-reference/model-training/create","matchLevel":1},"fr":{"href":"/fr/api-reference/model-training/create","matchLevel":1},"it":{"href":"/it/api-reference/model-training/create","matchLevel":1}}},"lastModified":"2026-07-10T12:39:41.018Z","originalFileLocation":"api-reference/model-training/create.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create a model from 1–10 reference images supplied as URLs or inline base64.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Samsa\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/samsa-6b52d36f/d_WeLiSBvKQ9voQx/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/samsa-6b52d36f/d_WeLiSBvKQ9voQx/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/samsa-6b52d36f/d_WeLiSBvKQ9voQx/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/samsa-6b52d36f/d_WeLiSBvKQ9voQx/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/samsa-6b52d36f/d_WeLiSBvKQ9voQx/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/samsa-6b52d36f/d_WeLiSBvKQ9voQx/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/samsa-6b52d36f/d_WeLiSBvKQ9voQx/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/samsa-6b52d36f/d_WeLiSBvKQ9voQx/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/samsa-6b52d36f/d_WeLiSBvKQ9voQx/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a model - Samsa\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create a model from 1–10 reference images supplied as URLs or inline base64.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Samsa\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.samsa.ai/api-reference/model-training/create\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://samsa-6b52d36f.mintlify.site/_mintlify/api/og/v2?division=Model+Training\u0026amp;title=Create+a+model\u0026amp;description=Create+a+model+from+1%E2%80%9310+reference+images+supplied+as+URLs+or+inline+base64.\u0026amp;theme=b3c7b7defba13e92508f1219\u0026amp;signature=ecd07f7d98a50675bf86a1abb81c76510ca503504e5697e2e895e93198c5b9d7\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create a model - Samsa\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create a model from 1–10 reference images supplied as URLs or inline base64.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://samsa-6b52d36f.mintlify.site/_mintlify/api/og/v2?division=Model+Training\u0026amp;title=Create+a+model\u0026amp;description=Create+a+model+from+1%E2%80%9310+reference+images+supplied+as+URLs+or+inline+base64.\u0026amp;theme=b3c7b7defba13e92508f1219\u0026amp;signature=ecd07f7d98a50675bf86a1abb81c76510ca503504e5697e2e895e93198c5b9d7\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/samsa-6b52d36f/d_WeLiSBvKQ9voQx/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Samsa\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#15123A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.samsa.ai/api-reference/model-training/create\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/model-training/create.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.samsa.ai/api-reference/model-training/create\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"de\" href=\"https://docs.samsa.ai/de/api-reference/model-training/create\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"fr\" href=\"https://docs.samsa.ai/fr/api-reference/model-training/create\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"it\" href=\"https://docs.samsa.ai/it/api-reference/model-training/create\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.samsa.ai/api-reference/model-training/create\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://samsa.ai/#organization\",\"name\":\"Samsa\",\"legalName\":\"Samsa Labs AG\",\"url\":\"https://samsa.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://samsa.ai/wp-content/uploads/2026/01/samsa_logo.webp\"},\"sameAs\":[\"https://www.linkedin.com/company/samsa-ai/\"]},{\"@type\":\"WebSite\",\"@id\":\"https://docs.samsa.ai#website\",\"name\":\"Samsa\",\"url\":\"https://docs.samsa.ai\",\"publisher\":{\"@id\":\"https://samsa.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.samsa.ai/api-reference/model-training/create#webpage\",\"url\":\"https://docs.samsa.ai/api-reference/model-training/create\",\"name\":\"Create a model\",\"description\":\"Create a model from 1–10 reference images supplied as URLs or inline base64.\",\"dateModified\":\"2026-07-10T12:39:41.018Z\",\"isPartOf\":{\"@id\":\"https://docs.samsa.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.samsa.ai/api-reference/model-training/create#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.samsa.ai/api-reference/model-training/create#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://docs.samsa.ai/api-reference/images/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Model Training\",\"item\":\"https://docs.samsa.ai/api-reference/model-training/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Create a model\",\"item\":\"https://docs.samsa.ai/api-reference/model-training/create\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.samsa.ai/api-reference/model-training/create#apireference\",\"headline\":\"Create a model\",\"name\":\"Create a model\",\"description\":\"Create a model from 1–10 reference images supplied as URLs or inline base64.\",\"url\":\"https://docs.samsa.ai/api-reference/model-training/create\",\"mainEntityOfPage\":{\"@id\":\"https://docs.samsa.ai/api-reference/model-training/create#webpage\"},\"dateModified\":\"2026-07-10T12:39:41.018Z\",\"publisher\":{\"@id\":\"https://samsa.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.samsa.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Samsa\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Samsa\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/model-training/create.md","siteName":"Samsa","nav":{"global":null,"languages":[{"language":"en","default":true,"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/samsa-ai","website":"https://samsa.ai"},"links":[{"header":"Information","items":[{"label":"Docs home","href":"/"},{"label":"Changelog","href":"/changelog"},{"label":"Dashboard","href":"https://app.samsa.ai"},{"label":"Pricing","href":"https://samsa.ai/pricing"},{"label":"Contact us","href":"https://samsa.ai/contact"}]},{"header":"Legal","items":[{"label":"Terms of Service","href":"https://samsa.ai/terms-of-service"},{"label":"Acceptable Use Policy","href":"https://samsa.ai/acceptable-use-policy"},{"label":"Privacy Policy","href":"https://samsa.ai/privacy-policy"},{"label":"Imprint","href":"https://samsa.ai/imprint"}]}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"API reference","groups":[{"group":"Overview","pages":[{"title":"Samsa API","href":"/api"},{"title":"API reference","href":"/api-reference/introduction"}]},{"group":"Endpoints","pages":[{"group":"Image Generation","pages":[{"title":"Image Generation","sidebarTitle":"Overview","href":"/api-reference/images/overview"},{"title":"Generate images","openapi":"api-reference/openapi.json POST /images/generations","href":"/api-reference/images/generate"},{"title":"Get an image generation","openapi":"api-reference/openapi.json GET /images/generations/{generation_id}","href":"/api-reference/images/get-generation"},{"title":"List image engines","openapi":"api-reference/openapi.json GET /images/models","href":"/api-reference/images/list-engines"}]},{"group":"Image Uploads","pages":[{"title":"Image Uploads","sidebarTitle":"Overview","href":"/api-reference/uploads/overview"},{"title":"Prepare an image upload","openapi":"api-reference/openapi.json POST /images/uploads/prepare","href":"/api-reference/uploads/prepare"},{"title":"Complete an image upload","openapi":"api-reference/openapi.json POST /images/uploads/{image_id}/complete","href":"/api-reference/uploads/complete"}]},{"group":"Image Editing","pages":[{"title":"Image Editing","sidebarTitle":"Overview","href":"/api-reference/edits/overview"},{"title":"Edit an image","openapi":"api-reference/openapi.json POST /images/edits","href":"/api-reference/edits/create"},{"title":"Get an image edit","openapi":"api-reference/openapi.json GET /images/edits/{edit_id}","href":"/api-reference/edits/get-edit"}]},{"group":"Image Operations","pages":[{"title":"Image Operations","sidebarTitle":"Overview","href":"/api-reference/image-ops/overview"},{"title":"Transform images (img2img)","openapi":"api-reference/openapi.json POST /images/img2img","href":"/api-reference/image-ops/img2img"},{"title":"Get an img2img job","openapi":"api-reference/openapi.json GET /images/img2img/{img2img_id}","href":"/api-reference/image-ops/get-img2img"},{"title":"Generate variations","openapi":"api-reference/openapi.json POST /images/variations","href":"/api-reference/image-ops/variations"},{"title":"Get a variations job","openapi":"api-reference/openapi.json GET /images/variations/{variation_id}","href":"/api-reference/image-ops/get-variations"},{"title":"Upscale an image","openapi":"api-reference/openapi.json POST /images/upscales","href":"/api-reference/image-ops/upscale"},{"title":"Get an upscale job","openapi":"api-reference/openapi.json GET /images/upscales/{upscale_id}","href":"/api-reference/image-ops/get-upscale"},{"title":"Resize an image","openapi":"api-reference/openapi.json POST /images/resizes","href":"/api-reference/image-ops/resize"},{"title":"Get a resize job","openapi":"api-reference/openapi.json GET /images/resizes/{resize_id}","href":"/api-reference/image-ops/get-resize"},{"title":"Remove a background","openapi":"api-reference/openapi.json POST /images/background-removals","href":"/api-reference/image-ops/remove-background"},{"title":"Get a background-removal job","openapi":"api-reference/openapi.json GET /images/background-removals/{background_removal_id}","href":"/api-reference/image-ops/get-background-removal"},{"title":"Vectorize an image","openapi":"api-reference/openapi.json POST /images/vectorizations","href":"/api-reference/image-ops/vectorize"},{"title":"Get a vectorization job","openapi":"api-reference/openapi.json GET /images/vectorizations/{vectorization_id}","href":"/api-reference/image-ops/get-vectorization"}]},{"group":"Video Generation","pages":[{"title":"Video Generation","sidebarTitle":"Overview","href":"/api-reference/videos/overview"},{"title":"Generate a video","openapi":"api-reference/openapi.json POST /videos/generations","href":"/api-reference/videos/generate"},{"title":"Get a video generation","openapi":"api-reference/openapi.json GET /videos/generations/{generation_id}","href":"/api-reference/videos/get-generation"},{"title":"List video engines","openapi":"api-reference/openapi.json GET /videos/models","href":"/api-reference/videos/list-engines"}]},{"group":"Prompt Improvement","pages":[{"title":"Prompt Improvement","sidebarTitle":"Overview","href":"/api-reference/prompts/overview"},{"title":"Improve a prompt","openapi":"api-reference/openapi.json POST /prompts/improve","href":"/api-reference/prompts/improve"}]},{"group":"Model Training","pages":[{"title":"Model Training","sidebarTitle":"Overview","description":"Create custom models — style, object, person, or setting — from reference images.","href":"/api-reference/model-training/overview"},{"title":"Create a model","openapi":"api-reference/openapi.json POST /models","href":"/api-reference/model-training/create"},{"title":"Prepare a model upload","description":"Request presigned PUT URLs for a new model's reference images (two-step upload).","openapi":"api-reference/openapi.json POST /models/prepare","href":"/api-reference/model-training/prepare"},{"title":"Complete a model upload","openapi":"api-reference/openapi.json POST /models/{model_id}/complete","href":"/api-reference/model-training/complete"},{"title":"Get model status","openapi":"api-reference/openapi.json GET /models/{model_id}/status","href":"/api-reference/model-training/status"}]},{"group":"Models","pages":[{"title":"Models","sidebarTitle":"Overview","href":"/api-reference/models/overview"},{"title":"List models","openapi":"api-reference/openapi.json GET /models","href":"/api-reference/models/list"},{"title":"Get a model","openapi":"api-reference/openapi.json GET /models/{model_id}","href":"/api-reference/models/get"},{"title":"Update a model","openapi":"api-reference/openapi.json PATCH /models/{model_id}","href":"/api-reference/models/update"},{"title":"Delete a model","openapi":"api-reference/openapi.json DELETE /models/{model_id}","href":"/api-reference/models/delete"}]},{"group":"Account \u0026 Usage","pages":[{"title":"Account \u0026 Usage","sidebarTitle":"Overview","href":"/api-reference/account/overview"},{"title":"Get current key (me)","openapi":"api-reference/openapi.json GET /me","href":"/api-reference/account/me"},{"title":"Get credits","openapi":"api-reference/openapi.json GET /credits","href":"/api-reference/account/credits"},{"title":"Get usage","openapi":"api-reference/openapi.json GET /usage","href":"/api-reference/account/usage"}]}]}]},{"tab":"MCP server","pages":[{"title":"MCP server","href":"/mcp-server"}]},{"tab":"Content verification","pages":[{"title":"Content verification","href":"/content-verification/overview"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},{"language":"de","footer":{"socials":{"linkedin":"https://www.linkedin.com/company/samsa-ai","website":"https://samsa.ai"},"links":[{"header":"Informationen","items":[{"label":"Doku-Startseite","href":"/de"},{"label":"Changelog","href":"/de/changelog"},{"label":"Dashboard","href":"https://app.samsa.ai"},{"label":"Preise","href":"https://samsa.ai/de/preise"},{"label":"Kontakt","href":"https://samsa.ai/de/kontakt"}]},{"header":"Rechtliches","items":[{"label":"AGB","href":"https://samsa.ai/de/agb"},{"label":"Nutzungsrichtlinie","href":"https://samsa.ai/de/nutzungsrichtlinie"},{"label":"Datenschutz","href":"https://samsa.ai/de/datenschutz"},{"label":"Impressum","href":"https://samsa.ai/de/impressum"}]}]},"pages":[{"title":"de","href":"/de/api-reference/model-training/create"}]},{"language":"fr","footer":{"socials":{"linkedin":"https://www.linkedin.com/company/samsa-ai","website":"https://samsa.ai"},"links":[{"header":"Informations","items":[{"label":"Accueil documentation","href":"/fr"},{"label":"Changelog","href":"/fr/changelog"},{"label":"Dashboard","href":"https://app.samsa.ai"},{"label":"Tarifs","href":"https://samsa.ai/fr/prix"},{"label":"Contact","href":"https://samsa.ai/fr/contact"}]},{"header":"Légal","items":[{"label":"Conditions générales","href":"https://samsa.ai/fr/conditions-generales"},{"label":"Politique d'utilisation acceptable","href":"https://samsa.ai/fr/politique-utilisation-acceptable"},{"label":"Politique de confidentialité","href":"https://samsa.ai/fr/politique-de-confidentialite"},{"label":"Mentions légales","href":"https://samsa.ai/fr/mentions-legales"}]}]},"pages":[{"title":"fr","href":"/fr/api-reference/model-training/create"}]},{"language":"it","footer":{"socials":{"linkedin":"https://www.linkedin.com/company/samsa-ai","website":"https://samsa.ai"},"links":[{"header":"Informazioni","items":[{"label":"Home documentazione","href":"/it"},{"label":"Changelog","href":"/it/changelog"},{"label":"Dashboard","href":"https://app.samsa.ai"},{"label":"Prezzi","href":"https://samsa.ai/it/prezzi"},{"label":"Contatti","href":"https://samsa.ai/it/contatto"}]},{"header":"Legale","items":[{"label":"Termini e condizioni","href":"https://samsa.ai/it/termini-e-condizioni"},{"label":"Politica di utilizzo accettabile","href":"https://samsa.ai/it/politica-utilizzo-accettabile"},{"label":"Informativa sulla privacy","href":"https://samsa.ai/it/informativa-sulla-privacy"},{"label":"Note legali","href":"https://samsa.ai/it/impronta"}]}]},"pages":[{"title":"it","href":"/it/api-reference/model-training/create"}]}]},"basePath":"","title":"Create a model - Samsa","deploymentId":"dpl_vSEmv961Ncyvz1psVwgUnTXQMSYk","buildId":"dpl_vSEmv961Ncyvz1psVwgUnTXQMSYk","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CrDfRf61.js","snippetPresets-Dv-cOUrx.js","utils-BUTreAgv.js","style-to-object-BY3JEAdk.js","utils-wsznt9RM.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-DEsMlaPy.js","conditional-requirements-CFM0id0Q.js","cloneDeep-DontW4xJ.js","_Uint8Array-pP7X6_RM.js","isObject-FP1Yky1u.js","ApiExamples-CU_aGGP0.js","usePlaygroundInputsStore-7dNmUIbS.js","shallow-fTtruD8x.js","isEqual-BRfNFpSD.js","CodeSnippets-52884wUJ.js","CodeSnippet-eoRjC4Le.js","getApiPlaygroundDisplay-CZyAPlR2.js","Page-Cr9IwkK7.js","DynamicMarkdown-NFqqduU7.js","SectionHeading-DQ-mJoAt.js","icon-DXTBUt6s.js","MethodPill-2v-b3js5.js","getPastedJson-v_8Y1_4v.js","DuplicateIcon-DXIkhZIo.js","createIcon-DRpYuPZs.js","axios-CsQoIw0U.js","Markdown-CwtoSfEf.js","AssistantPageLink-CTqa3eoi.js","dist-DIfYWxfm.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}