The examples use a fake key (
samsa_sk_example…) and placeholder ids. Replace
them with your own. Store your key in an environment variable so it never lands
in source control:Create an API key
API keys are organization-owned and can only be created by an organization admin (OWNER or ADMIN).
1
Open your organization settings
In the Samsa app, go to your organization settings and
open the API Keys tab.
2
Create a key
Give the key a name. By default it is granted all scopes
(
images.generate, images.edit, videos.generate, models.read,
models.write, usage.read); narrow them if the integration needs less.
You can also set an optional expiry.3
Copy the key now
Verify the key with GET /me
GET /me is the fastest way to confirm a key works. It returns the key’s
organization, its safe metadata (prefix, scopes, expiry — never the secret), and
the organization’s available credit balance.
Response
Generate an image
Submit a prompt toPOST /images/generations. Here we also compose one of the
organization’s trained style models by passing its id or name as style_id —
a name resolves to a model visible to you. You can combine object_ids,
person_ids, setting_ids, and a color_palette_id the same way — each by name
or id. The request returns 202 immediately with a job id; the image is
produced asynchronously.
Response — 202 Accepted
The default engine is
nano_banana_pro (pass engine to choose
nano_banana_2). num_outputs defaults to 1; each output costs
5 credits at 1K, scaling with resolution (1K ×1, 2K ×2, 4K ×4). The
style_id — an id or a name — must reference a completed model visible to you.Poll for the result
PollGET /images/generations/{id} until status is completed (or failed).
Statuses are pending, processing, completed, failed, and cancelled.
Response — completed
Download the result
Each entry inimages carries a presigned HTTPS url that is valid for 24
hours — download and store the asset before it expires.
Next steps
API reference
The base URL, authentication, and the conventions every endpoint shares.
MCP server
Connect Samsa to Claude, ChatGPT, or any MCP client and generate media as
tools — over OAuth or an API key.

