{
"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"
}
}
Passaggio uno del caricamento di immagini. Invia
il filename, il content_type (image/jpeg, image/png o image/webp) e la
dimensione esatta del file in size_bytes. La risposta restituisce
201 Created con il nuovo image_id, un upload_url presigned (valido 1
ora), il suo expires_at, il limite max_bytes e gli allowed_content_types.Poi fai il PUT dei byte grezzi del file su upload_url con lo stesso
Content-Type e senza header Authorization:
curl -X PUT -H "Content-Type: image/png" --data-binary @photo.png "<upload_url>"
size_bytes è obbligatorio e deve essere la dimensione esatta del file (al massimo
10,485,760 byte): è firmata in upload_url, quindi un PUT di qualsiasi altra
lunghezza viene rifiutato. Puoi avere al massimo 20 upload in attesa di
completamento; oltre, prepare restituisce
429 too_many_pending_uploads.
Richiede uno qualsiasi degli scope images.edit, images.transform o
videos.generate. Gratuito.
Autorizzazioni
Authorization
string
header
obbligatorio
Organization API key (Authorization: Bearer samsa_sk_...) or OAuth 2.1 access token (Authorization: Bearer samsa_at_...).
Corpo
application/json
POST /images/uploads/prepare body — describe the file you will PUT.
filename
string
obbligatorio
Original filename. Stored as the image name; never used as the storage key.
Required string length: 1 - 255
content_type
string
obbligatorio
MIME type of the file — one of: image/jpeg, image/png, image/webp. Send the SAME value as the Content-Type header of the PUT; complete refuses bytes that are a different format.
size_bytes
integer
obbligatorio
The EXACT size of the file in bytes (at most 10485760). It is signed into upload_url: a PUT of any other length is rejected by storage. curl --data-binary @file sends the file's real length.
Intervallo richiesto: 1 <= x <= 10485760
width
integer | null
Optional width in pixels. Only used to refuse an image over the 32 MP limit early; the stored dimensions are measured from the uploaded bytes at complete.
Intervallo richiesto: x >= 1
height
integer | null
Optional height in pixels (see width).
Intervallo richiesto: x >= 1
Risposta
Successful Response
201 body for POST /images/uploads/prepare — where and how to PUT the file.
image_id
string<uuid>
obbligatorio
The new image's id. Send it to POST /images/uploads/{image_id}/complete after the PUT.
upload_url
string
obbligatorio
Presigned URL. PUT the raw file bytes here with the header Content-Type: <content_type> (no Authorization header).
expires_at
string
obbligatorio
UTC instant (ISO 8601) after which upload_url stops accepting the PUT (1 hour after prepare).
max_bytes
integer
obbligatorio
Largest accepted file size in bytes; complete refuses a bigger file.
allowed_content_types
string[]
obbligatorio
The accepted MIME types.
{"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.4143","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":"llms-txt-v2","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":"it/api-reference/uploads/prepare","slug":"/it/api-reference/uploads/prepare","pageMetadata":{"title":"Prepara un upload di immagine","description":"Passaggio 1 dell'upload di immagini: ottieni un image_id e un URL PUT presigned per un file locale.","openapi":"api-reference/openapi.json POST /images/uploads/prepare","href":"/it/api-reference/uploads/prepare"},"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: \"Passaggio 1 dell’upload di immagini: ottieni un image_id e un URL PUT presigned per un file locale.\"\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,Note}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Note)_missingMdxReference(`Note`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Passaggio uno del `,_jsx(_components.a,{href:`/it/api-reference/uploads/overview`,children:`caricamento di immagini`}),`. Invia\nil `,_jsx(_components.code,{children:`filename`}),`, il `,_jsx(_components.code,{children:`content_type`}),` (`,_jsx(_components.code,{children:`image/jpeg`}),`, `,_jsx(_components.code,{children:`image/png`}),` o `,_jsx(_components.code,{children:`image/webp`}),`) e la\ndimensione `,_jsx(_components.strong,{children:`esatta`}),` del file in `,_jsx(_components.code,{children:`size_bytes`}),`. La risposta restituisce\n`,_jsx(_components.strong,{children:_jsx(_components.code,{children:`201 Created`})}),` con il nuovo `,_jsx(_components.code,{children:`image_id`}),`, un `,_jsx(_components.code,{children:`upload_url`}),` presigned (valido `,_jsx(_components.strong,{children:`1\nora`}),`), il suo `,_jsx(_components.code,{children:`expires_at`}),`, il limite `,_jsx(_components.code,{children:`max_bytes`}),` e gli `,_jsx(_components.code,{children:`allowed_content_types`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Poi fai il `,_jsx(_components.code,{children:`PUT`}),` dei byte grezzi del file su `,_jsx(_components.code,{children:`upload_url`}),` con lo stesso\n`,_jsx(_components.code,{children:`Content-Type`}),` e senza header `,_jsx(_components.code,{children:`Authorization`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,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:`1`,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:` PUT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: image/png\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data-binary`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @photo.png`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\u003cupload_url>\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Poi chiama `,_jsx(_components.a,{href:`/it/api-reference/uploads/complete`,children:_jsx(_components.code,{children:`POST /images/uploads/{image_id}/complete`})}),`.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`size_bytes`}),` è obbligatorio e deve essere la dimensione esatta del file (al massimo\n10,485,760 byte): è firmata in `,_jsx(_components.code,{children:`upload_url`}),`, quindi un `,_jsx(_components.code,{children:`PUT`}),` di qualsiasi altra\nlunghezza viene rifiutato. Puoi avere al massimo `,_jsx(_components.strong,{children:`20`}),` upload in attesa di\ncompletamento; oltre, prepare restituisce\n`,_jsx(_components.a,{href:`/it/guides/errors#too_many_pending_uploads`,children:_jsx(_components.code,{children:`429 too_many_pending_uploads`})}),`.\nRichiede uno qualsiasi degli scope `,_jsx(_components.code,{children:`images.edit`}),`, `,_jsx(_components.code,{children:`images.transform`}),` o\n`,_jsx(_components.code,{children:`videos.generate`}),`. Gratuito.`]})})]})}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":"Prepara un upload di immagine","description":"Passaggio 1 dell'upload di immagini: ottieni un image_id e un URL PUT presigned per un file locale.","openapi":"api-reference/openapi.json POST /images/uploads/prepare","href":"/it/api-reference/uploads/prepare"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Images"],"summary":"Start an image upload (get a presigned PUT URL)","description":"Passaggio 1 dell'upload di immagini: ottieni un image_id e un URL PUT presigned per un file locale.","operationId":"prepare_image_upload_images_uploads_prepare_post","requestBody":"acd62c7c-4fda-44e2-97ba-c8d8ca8a8750","responses":{"201":"ec77a1d0-f497-430e-99d9-acf7c18d7c7f","401":"98098b6d-06d4-4ab3-8330-60e6e92efd03","403":"3feb1d18-fc6a-42ff-a1bb-0fbbb46fb2cc","404":"264f3637-646f-4b00-b619-a8b7eebb9937","422":"bd3bed63-85c9-412b-a01d-d29c9100cfc9","429":"ebe139bc-9e25-4d00-b3f6-6f9947c31ee8","500":"a2aa79e4-b105-4be1-ba46-4cdb08045333"},"method":"post","type":"path","servers":["a67142cd-ab67-49c9-9651-75e0f34b1e93"],"security":["a11deb78-1585-485f-a0ea-777224f847bc"],"path":"/images/uploads/prepare","baseUrlOptions":["https://api.samsa.ai/public/v1"],"title":"Start an image upload (get a presigned PUT URL)","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"properties":{"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename","description":"Original filename. Stored as the image name; never used as the storage key.","isRequired":true,"uniqueKey":"filename","typeLabel":"string"},"content_type":{"type":"string","title":"Content Type","description":"MIME type of the file — one of: image/jpeg, image/png, image/webp. Send the SAME value as the `Content-Type` header of the PUT; `complete` refuses bytes that are a different format.","isRequired":true,"uniqueKey":"content_type","typeLabel":"string"},"size_bytes":{"type":"integer","maximum":10485760,"minimum":1,"title":"Size Bytes","description":"The EXACT size of the file in bytes (at most 10485760). It is signed into `upload_url`: a PUT of any other length is rejected by storage. `curl --data-binary @file` sends the file's real length.","isRequired":true,"uniqueKey":"size_bytes","typeLabel":"integer"},"width":{"oneOf":[{"type":"integer","title":"Width","description":"Optional width in pixels. Only used to refuse an image over the 32 MP limit early; the stored dimensions are measured from the uploaded bytes at `complete`.","minimum":1,"uniqueKey":"width.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Width","description":"Optional width in pixels. Only used to refuse an image over the 32 MP limit early; the stored dimensions are measured from the uploaded bytes at `complete`.","uniqueKey":"width.oneOf.1","typeLabel":"null"}],"uniqueKey":"width","typeLabel":"integer | null"},"height":{"oneOf":[{"type":"integer","title":"Height","description":"Optional height in pixels (see `width`).","minimum":1,"uniqueKey":"height.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Height","description":"Optional height in pixels (see `width`).","uniqueKey":"height.oneOf.1","typeLabel":"null"}],"uniqueKey":"height","typeLabel":"integer | null"}},"type":"object","required":["filename","content_type","size_bytes"],"title":"PublicImageUploadPrepareRequest","description":"`POST /images/uploads/prepare` body — describe the file you will PUT.","examples":[{"content_type":"image/png","filename":"christmas-card.png","size_bytes":4718592},{"content_type":"image/jpeg","filename":"product.jpg","height":2000,"size_bytes":1843200,"width":3000}],"uniqueKey":"","typeLabel":"PublicImageUploadPrepareRequest · object"},"examples":{"Example":{"title":"Example","value":{"content_type":"image/png","filename":"christmas-card.png","size_bytes":4718592}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"ec77a1d0-f497-430e-99d9-acf7c18d7c7f":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"image_id":{"type":"string","format":"uuid","title":"Image Id","description":"The new image's id. Send it to `POST /images/uploads/{image_id}/complete` after the PUT.","isRequired":true,"uniqueKey":"image_id","typeLabel":"string\u003cuuid>"},"upload_url":{"type":"string","title":"Upload Url","description":"Presigned URL. PUT the raw file bytes here with the header `Content-Type: \u003ccontent_type>` (no Authorization header).","isRequired":true,"uniqueKey":"upload_url","typeLabel":"string"},"expires_at":{"type":"string","title":"Expires At","description":"UTC instant (ISO 8601) after which `upload_url` stops accepting the PUT (1 hour after prepare).","isRequired":true,"uniqueKey":"expires_at","typeLabel":"string"},"max_bytes":{"type":"integer","title":"Max Bytes","description":"Largest accepted file size in bytes; `complete` refuses a bigger file.","isRequired":true,"uniqueKey":"max_bytes","typeLabel":"integer"},"allowed_content_types":{"items":{"type":"string","uniqueKey":"allowed_content_types.items.[INDEX]","typeLabel":"string"},"type":"array","title":"Allowed Content Types","description":"The accepted MIME types.","isRequired":true,"uniqueKey":"allowed_content_types","typeLabel":"string[]"}},"type":"object","required":["image_id","upload_url","expires_at","max_bytes","allowed_content_types"],"title":"PublicImageUploadPrepareResponse","description":"`201` body for `POST /images/uploads/prepare` — where and how to PUT the file.","examples":[{"allowed_content_types":["image/jpeg","image/png","image/webp"],"expires_at":"2026-10-08T12:00:00Z","image_id":"3f1c2b7e-8d4a-4c1e-9b2f-5a6d7e8f9a0b","max_bytes":10485760,"upload_url":"https://\u003caccount>.r2.cloudflarestorage.com/user-\u003cid>/3f1c2b7e-8d4a-4c1e-9b2f-5a6d7e8f9a0b.png?X-Amz-Algorithm=AWS4-HMAC-SHA256\u0026X-Amz-Signature=..."}],"uniqueKey":"","typeLabel":"PublicImageUploadPrepareResponse · object"},"examples":{"Example":{"title":"Example","value":{"allowed_content_types":["image/jpeg","image/png","image/webp"],"expires_at":"2026-10-08T12:00:00Z","image_id":"3f1c2b7e-8d4a-4c1e-9b2f-5a6d7e8f9a0b","max_bytes":10485760,"upload_url":"https://\u003caccount>.r2.cloudflarestorage.com/user-\u003cid>/3f1c2b7e-8d4a-4c1e-9b2f-5a6d7e8f9a0b.png?X-Amz-Algorithm=AWS4-HMAC-SHA256\u0026X-Amz-Signature=..."}}},"exampleType":"generated"}},"exampleType":"generated"},"98098b6d-06d4-4ab3-8330-60e6e92efd03":{"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"},"3feb1d18-fc6a-42ff-a1bb-0fbbb46fb2cc":{"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"},"264f3637-646f-4b00-b619-a8b7eebb9937":{"description":"Resource not found.","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"},"bd3bed63-85c9-412b-a01d-d29c9100cfc9":{"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"},"ebe139bc-9e25-4d00-b3f6-6f9947c31ee8":{"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"},"a2aa79e4-b105-4be1-ba46-4cdb08045333":{"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"}},"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":"Prepara un upload di immagine - Samsa","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/uploads/prepare","matchLevel":1},"de":{"href":"/de/api-reference/uploads/prepare","matchLevel":1},"fr":{"href":"/fr/api-reference/uploads/prepare","matchLevel":1},"it":{"href":"/it/api-reference/uploads/prepare","matchLevel":0}}},"lastModified":"2026-10-09T08:17:40.239Z","originalFileLocation":"it/api-reference/uploads/prepare.mdx","locale":"it"},"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=\"Passaggio 1 dell\u0026#x27;upload di immagini: ottieni un image_id e un URL PUT presigned per un file locale.\">\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=\"Prepara un upload di immagine - Samsa\">\u003cmeta data-mint-head property=\"og:description\" content=\"Passaggio 1 dell\u0026#x27;upload di immagini: ottieni un image_id e un URL PUT presigned per un file locale.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Samsa\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.samsa.ai/it/api-reference/uploads/prepare\">\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=Caricamento+di+immagini\u0026amp;title=Prepara+un+upload+di+immagine\u0026amp;description=Passaggio+1+dell%27upload+di+immagini%3A+ottieni+un+image_id+e+un+URL+PUT+presigned+per+un+file+locale.\u0026amp;theme=b3c7b7defba13e92508f1219\u0026amp;signature=1c92e2aa9dd2a47a06c003269d59b047d379199db5bd770bfaf8087a8b08e5fe\">\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=\"Prepara un upload di immagine - Samsa\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Passaggio 1 dell\u0026#x27;upload di immagini: ottieni un image_id e un URL PUT presigned per un file locale.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://samsa-6b52d36f.mintlify.site/_mintlify/api/og/v2?division=Caricamento+di+immagini\u0026amp;title=Prepara+un+upload+di+immagine\u0026amp;description=Passaggio+1+dell%27upload+di+immagini%3A+ottieni+un+image_id+e+un+URL+PUT+presigned+per+un+file+locale.\u0026amp;theme=b3c7b7defba13e92508f1219\u0026amp;signature=1c92e2aa9dd2a47a06c003269d59b047d379199db5bd770bfaf8087a8b08e5fe\">\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/it/api-reference/uploads/prepare\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/it/api-reference/uploads/prepare.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"it\" href=\"https://docs.samsa.ai/it/api-reference/uploads/prepare\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.samsa.ai/api-reference/uploads/prepare\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"de\" href=\"https://docs.samsa.ai/de/api-reference/uploads/prepare\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"fr\" href=\"https://docs.samsa.ai/fr/api-reference/uploads/prepare\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.samsa.ai/api-reference/uploads/prepare\">\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/it/api-reference/uploads/prepare#webpage\",\"url\":\"https://docs.samsa.ai/it/api-reference/uploads/prepare\",\"name\":\"Prepara un upload di immagine\",\"description\":\"Passaggio 1 dell'upload di immagini: ottieni un image_id e un URL PUT presigned per un file locale.\",\"dateModified\":\"2026-10-09T08:17:40.239Z\",\"isPartOf\":{\"@id\":\"https://docs.samsa.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.samsa.ai/it/api-reference/uploads/prepare#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.samsa.ai/it/api-reference/uploads/prepare#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoint\",\"item\":\"https://docs.samsa.ai/it/api-reference/images/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Caricamento di immagini\",\"item\":\"https://docs.samsa.ai/it/api-reference/uploads/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Prepara un upload di immagine\",\"item\":\"https://docs.samsa.ai/it/api-reference/uploads/prepare\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.samsa.ai/it/api-reference/uploads/prepare#apireference\",\"headline\":\"Prepara un upload di immagine\",\"name\":\"Prepara un upload di immagine\",\"description\":\"Passaggio 1 dell'upload di immagini: ottieni un image_id e un URL PUT presigned per un file locale.\",\"url\":\"https://docs.samsa.ai/it/api-reference/uploads/prepare\",\"mainEntityOfPage\":{\"@id\":\"https://docs.samsa.ai/it/api-reference/uploads/prepare#webpage\"},\"dateModified\":\"2026-10-09T08:17:40.239Z\",\"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":"/it/api-reference/uploads/prepare.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"}]}]},"pages":[{"title":"en","href":"/api-reference/uploads/prepare"}]},{"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/uploads/prepare"}]},{"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/uploads/prepare"}]},{"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"}]}]},"tabs":[{"tab":"Documentazione","pages":[{"title":"Documentazione","href":"/it"}]},{"tab":"Riferimento API","groups":[{"group":"Panoramica","pages":[{"title":"Samsa API","href":"/it/api"},{"title":"Riferimento API","href":"/it/api-reference/introduction"}]},{"group":"Endpoint","pages":[{"group":"Generazione di immagini","pages":[{"title":"Generazione di immagini","sidebarTitle":"Panoramica","href":"/it/api-reference/images/overview"},{"title":"Genera immagini","openapi":"api-reference/openapi.json POST /images/generations","href":"/it/api-reference/images/generate"},{"title":"Ottieni una generazione di immagini","openapi":"api-reference/openapi.json GET /images/generations/{generation_id}","href":"/it/api-reference/images/get-generation"},{"title":"Elenca gli engine di immagini","openapi":"api-reference/openapi.json GET /images/models","href":"/it/api-reference/images/list-engines"}]},{"group":"Caricamento di immagini","pages":[{"title":"Caricamento di immagini","sidebarTitle":"Panoramica","description":"Carica un file immagine locale per ottenere un image_id da usare come sorgente in modifiche, operazioni sulle immagini e image-to-video.","href":"/it/api-reference/uploads/overview"},{"title":"Prepara un upload di immagine","openapi":"api-reference/openapi.json POST /images/uploads/prepare","href":"/it/api-reference/uploads/prepare"},{"title":"Completa un upload di immagine","description":"Passaggio 3 dell'upload di immagini: verifica il file caricato e rendi utilizzabile il suo image_id.","openapi":"api-reference/openapi.json POST /images/uploads/{image_id}/complete","href":"/it/api-reference/uploads/complete"}]},{"group":"Modifica di immagini","pages":[{"title":"Modifica di immagini","sidebarTitle":"Panoramica","href":"/it/api-reference/edits/overview"},{"title":"Modifica un'immagine","openapi":"api-reference/openapi.json POST /images/edits","href":"/it/api-reference/edits/create"},{"title":"Ottieni una modifica di immagine","openapi":"api-reference/openapi.json GET /images/edits/{edit_id}","href":"/it/api-reference/edits/get-edit"}]},{"group":"Operazioni sulle immagini","pages":[{"title":"Operazioni sulle immagini","sidebarTitle":"Panoramica","href":"/it/api-reference/image-ops/overview"},{"title":"Trasformare immagini (img2img)","openapi":"api-reference/openapi.json POST /images/img2img","href":"/it/api-reference/image-ops/img2img"},{"title":"Recuperare un job img2img","openapi":"api-reference/openapi.json GET /images/img2img/{img2img_id}","href":"/it/api-reference/image-ops/get-img2img"},{"title":"Generare variazioni","openapi":"api-reference/openapi.json POST /images/variations","href":"/it/api-reference/image-ops/variations"},{"title":"Recuperare un job di variazioni","openapi":"api-reference/openapi.json GET /images/variations/{variation_id}","href":"/it/api-reference/image-ops/get-variations"},{"title":"Ingrandire un'immagine","openapi":"api-reference/openapi.json POST /images/upscales","href":"/it/api-reference/image-ops/upscale"},{"title":"Recuperare un job di upscale","openapi":"api-reference/openapi.json GET /images/upscales/{upscale_id}","href":"/it/api-reference/image-ops/get-upscale"},{"title":"Ridimensionare un'immagine","openapi":"api-reference/openapi.json POST /images/resizes","href":"/it/api-reference/image-ops/resize"},{"title":"Recuperare un job di ridimensionamento","openapi":"api-reference/openapi.json GET /images/resizes/{resize_id}","href":"/it/api-reference/image-ops/get-resize"},{"title":"Rimuovere uno sfondo","openapi":"api-reference/openapi.json POST /images/background-removals","href":"/it/api-reference/image-ops/remove-background"},{"title":"Recuperare un job di rimozione dello sfondo","openapi":"api-reference/openapi.json GET /images/background-removals/{background_removal_id}","href":"/it/api-reference/image-ops/get-background-removal"},{"title":"Vettorizzare un'immagine","openapi":"api-reference/openapi.json POST /images/vectorizations","href":"/it/api-reference/image-ops/vectorize"},{"title":"Recuperare un job di vettorizzazione","openapi":"api-reference/openapi.json GET /images/vectorizations/{vectorization_id}","href":"/it/api-reference/image-ops/get-vectorization"}]},{"group":"Generazione di video","pages":[{"title":"Generazione di video","sidebarTitle":"Panoramica","href":"/it/api-reference/videos/overview"},{"title":"Genera un video","openapi":"api-reference/openapi.json POST /videos/generations","href":"/it/api-reference/videos/generate"},{"title":"Ottieni una generazione di video","openapi":"api-reference/openapi.json GET /videos/generations/{generation_id}","href":"/it/api-reference/videos/get-generation"},{"title":"Elenca gli engine video","openapi":"api-reference/openapi.json GET /videos/models","href":"/it/api-reference/videos/list-engines"}]},{"group":"Miglioramento dei prompt","pages":[{"title":"Miglioramento dei prompt","sidebarTitle":"Panoramica","href":"/it/api-reference/prompts/overview"},{"title":"Migliorare un prompt","openapi":"api-reference/openapi.json POST /prompts/improve","href":"/it/api-reference/prompts/improve"}]},{"group":"Addestramento di modelli","pages":[{"title":"Addestramento di modelli","sidebarTitle":"Panoramica","href":"/it/api-reference/model-training/overview"},{"title":"Crea un modello","openapi":"api-reference/openapi.json POST /models","href":"/it/api-reference/model-training/create"},{"title":"Prepara l'upload di un modello","openapi":"api-reference/openapi.json POST /models/prepare","href":"/it/api-reference/model-training/prepare"},{"title":"Completa l'upload di un modello","openapi":"api-reference/openapi.json POST /models/{model_id}/complete","href":"/it/api-reference/model-training/complete"},{"title":"Ottieni lo stato del modello","openapi":"api-reference/openapi.json GET /models/{model_id}/status","href":"/it/api-reference/model-training/status"}]},{"group":"Modelli","pages":[{"title":"Modelli","sidebarTitle":"Panoramica","href":"/it/api-reference/models/overview"},{"title":"Elenca i modelli","openapi":"api-reference/openapi.json GET /models","href":"/it/api-reference/models/list"},{"title":"Ottieni un modello","openapi":"api-reference/openapi.json GET /models/{model_id}","href":"/it/api-reference/models/get"},{"title":"Aggiorna un modello","openapi":"api-reference/openapi.json PATCH /models/{model_id}","href":"/it/api-reference/models/update"},{"title":"Elimina un modello","openapi":"api-reference/openapi.json DELETE /models/{model_id}","href":"/it/api-reference/models/delete"}]},{"group":"Account \u0026 utilizzo","pages":[{"title":"Account \u0026 utilizzo","sidebarTitle":"Panoramica","href":"/it/api-reference/account/overview"},{"title":"Ottieni la chiave corrente (me)","openapi":"api-reference/openapi.json GET /me","href":"/it/api-reference/account/me"},{"title":"Ottieni i credits","openapi":"api-reference/openapi.json GET /credits","href":"/it/api-reference/account/credits"},{"title":"Ottieni l'utilizzo","openapi":"api-reference/openapi.json GET /usage","href":"/it/api-reference/account/usage"}]}]}]},{"tab":"MCP server","pages":[{"title":"MCP server","href":"/it/mcp-server"}]},{"tab":"Verifica dei contenuti","pages":[{"title":"Verifica dei contenuti","href":"/it/content-verification/overview"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/it/changelog"}]}]}]},"basePath":"","title":"Prepara un upload di immagine - Samsa","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DdEMm2kG.js","utils-BMo572L7.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C-4m9KAx.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DPLK2Oq9.js","snippetPresets-BKjfJMC9.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-DTsgtCEj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C8vmhyQM.js","shallow-r9w8LQGS.js","getApiPlaygroundDisplay-DjPI64HQ.js","CodeSnippet-C8Bvhl16.js","CodeSnippets-BtWUwcMy.js","Page-BIYvYBgk.js","getPastedJson-Dcm_3Pgl.js","icon-BXwrTpjc.js","MethodPill-CcjfVmmy.js","DuplicateIcon-BuKIbXAQ.js","createIcon-DaL9yXsO.js","DynamicMarkdown-Co5nikxh.js","SectionHeading-P4UNTsMZ.js","axios-vUo_bRtp.js","Markdown-CEfymfIH.js","clsx-Dq9TQuNi.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-D2J8knkn.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BgZ2ThuU.js"]}