Create a session
Open Pro Studio, choose Blank workflow or a workflow template, then name the session so it is easy to find later.
A practical guide to building reusable Pro workflows, preparing templates, controlling GPU runtime, and integrating recipe-based session creation.
Open Pro Studio, choose Blank workflow or a workflow template, then name the session so it is easy to find later.
Use Text, Upload Photo, Upload Video, or Upload Audio nodes as stable sources. Keep reusable source material in the session instead of rebuilding it.
Drag from an output socket to a compatible input socket. Image, video, audio, text, media, and GPU trigger sockets use separate colors so incompatible links are visible before you run.
Run the whole workflow for the first pass. After that, rerun a single node when only one step needs a different prompt, seed, or media input.
Group the nodes that form a repeatable branch, then use loops or templates when the same structure should be reused across variants.
A saved workspace containing the graph, node settings, media, viewport, tabs, sharing state, and execution history.
A unit of work: upload, prompt, generation, utility processing, loop control, comment, or GPU runtime control.
A typed input or output. Connections describe what value moves from one node to another and which backend field receives it.
The runtime gate for GPU-heavy nodes. GPU nodes are auto-wired to it so users can see and control paid runtime explicitly.
Generated and uploaded media that can be previewed, reused, downloaded, or selected as input for another workflow.
A server-side workflow template that creates a session from validated inputs. Recipes are ideal for onboarding and repeatable production flows.
Nodes should be treated as reusable production steps. Keep source inputs explicit, connect only compatible socket types, and make important model parameters visible in the Inspector so a teammate can understand the workflow later.
Use presets for image, video, music, lyrics, translation, summarization, rewriting, keywords, or custom instructions. The system prompt and negative prompt are editable so teams can tune behavior without changing backend code.
Connect source media and text, then tune exact template controls such as seed, steps, CFG, denoise, resolution, FPS, and negative prompts.
Upload nodes resize around their content, support selected/random outputs, and can feed any compatible downstream node.
Frame extract, trim, split, mux, and text overlay nodes keep final assembly inside the workflow instead of forcing external tools.
Use comments for production notes and groups for branches that move together, rerun together, or become loop targets.
Use Loop when a branch already works and you want structured variants: camera angles, languages, products, seeds, durations, prompts, or model controls. Select a group, add iterations, then override only the fields that should change for each pass.
Users can manage personal API keys from /profile in the API Key tab. API keys use the mas_ prefix and authenticate as the key owner, so recipes, sessions, billing, media, and sharing permissions behave exactly like the web account.
/api/v2/account/api-keyRead whether API access is enabled and show the current safe key prefix.
/api/v2/account/api-keyEnable or disable the current user's API key.
/api/v2/account/api-key/regenerateIssue a new mas_ key. The full secret is returned once and must be copied immediately.
Recipes create ready-made workflow sessions from validated input. They are the right integration point for templates, onboarding flows, and external systems that should open a prepared canvas for the user.
/api/v2/recipesList available workflow recipes with metadata and input schemas.
/api/v2/recipes/{id}Inspect one recipe: name, description, version, inputs, and JSON Schema.
/api/v2/recipes/{id}/runCreate a session from a recipe. Set execute=false to open the prepared workflow without running it.
POST /api/v2/recipes/image_magic/run
Authorization: Bearer <token>
Content-Type: application/json
{
"session_name": "Product hero variants",
"execute": false,
"inputs": {
"source_image_url": "https://example.com/product.png",
"edit_prompt": "premium studio lighting on a dark reflective surface",
"negative_prompt": "blur, watermark, distorted logo",
"seed": 0
}
}{
"session_id": "72494ed2-73ad-4baa-9bf3-5f09a3efde7a"
}Use execute: false when the user should inspect or edit the workflow first. Use execute: true only when all required inputs are final and the account is ready for GPU runtime.
Generate a character or brand avatar from text.
Start from an image and describe the change.
Turn a still image into a short motion clip.
Apply atmosphere, VFX, or scene changes to a video.
Increase image resolution and detail.
Retouch, replace, or fill part of an image.
Swap a face into a still image.
Apply a face reference across a video.
Use a higher-control face swap workflow.
Create music from style notes, mood, tempo, and lyrics.
Place titles, captions, or labels onto image/video.
Split a video into separate visual and audio tracks.
Combine a video track with audio.
Pull a clean still from a video.
Cut a video to the exact segment needed.
Improve rough prompts for creative generation.
Generate a depth reference from an image.
Extract a pose guide from an image.
Recreate an image from a new camera angle.
The Go SDK is a small stdlib-only client for the Mini AI Studio /api/v2 API. Use it for server-side integrations, automation jobs, recipe-based onboarding, and internal tools that need to create sessions, run workflows, poll progress, and read outputs.
require miniaistudio-go-sdk v0.0.0
replace miniaistudio-go-sdk => ./miniaistudioctx := context.Background()
c := &miniaistudio.Client{APIKey: os.Getenv("MINIAI_API_KEY")}
created, err := c.CreateSessionFromRecipe(ctx, "prompt_to_avatar", map[string]any{
"prompt": "a cinematic avatar portrait",
}, "Avatar workflow")
if err != nil {
log.Fatal(err)
}
fmt.Println(created.SessionID)run, err := c.RunRecipe(ctx, "prompt_to_avatar", miniaistudio.RunRecipeRequest{
Inputs: map[string]any{"prompt": "a portrait"},
Execute: true,
})
if err != nil {
log.Fatal(err)
}
raw, err := c.PollSession(ctx, run.SessionID, 2*time.Second, done)
outputs, err := miniaistudio.ParseExecutionOutputs(raw)
images := outputs.FlattenImages()Set Client.APIKey for user API keys such as mas_..., or Client.Token for a login JWT. Session-scoped methods send X-Session-ID automatically where required.
ListRecipes, GetRecipe, CreateSessionFromRecipe, RunRecipe
NewSession, PutStudioFlow, GetSession, PollSession
ExecuteFull, StopSession, CancelNodeExecution
ParseExecutionOutputs, GetSessionExecution, FlattenImages, FlattenVideos, FlattenAudios
UploadStudioFile, AbsoluteURL
ListLoRAs, ResolveLoRAChain, ResolveLoRAChainByFilename
GetBalance
Ping, GetGPUSchedulerHealth, GetGPUStatus, StartGPU, StopGPU
Media endpoints expose the same generated and uploaded assets shown in My Gallery and the dashboard gallery picker. Use media ids for downloads rather than raw URLs so access checks stay server-side.
/api/v2/mediaList generated and uploaded media grouped by session. Supports media_type, pagination, date range, and include_shared=true.
/api/v2/media/sessions/{session_id}List all media for one accessible session.
/api/v2/media/download-zipDownload selected media by id as a zip archive. The ids array must be non-empty.
Sharing is role-based. Viewers can inspect, runners can execute, and editors can modify the graph. Owners can set monthly or total credit limits for collaborators before inviting them.
/api/v2/session/{id}/shareInvite a collaborator by email with viewer, runner, or editor access and optional credit limits.
/api/v2/session/{id}/sharesList accepted and pending collaborators for a session.
/api/v2/session/share/{shareId}Change role or credit-limit settings for an existing share.
/api/v2/session/share/{shareId}Revoke a collaborator's access.
/api/v2/invitationsList invitations for the signed-in user.
/api/v2/invitations/{shareId}/acceptAccept an invitation and gain access to the shared session.
Execution endpoints operate on the active session. Send X-Session-ID and the authenticated bearer token. Backend errors include a stable code field so clients can localize messages without parsing English text.
/api/v2/session/executeRun the active session. Body: { mode: "full" } or { mode: "from_node", target_node_id }.
/api/v2/session/nodes/{nodeId}/rerun?isolated=trueRerun one node without rebuilding unrelated branches.
/api/v2/session/nodes/{nodeId}/cancelCancel a queued or running node.
/api/v2/session/stopStop workflow execution and leave saved session state intact.
GPU-heavy nodes require runtime. Mini AI Studio tracks active GPU sessions, elapsed paid time, task count, expiry, and estimated refund if the user stops early.
/api/v2/billing/balanceRead available, reserved, and total credits.
/api/v2/billing/payment-intentCreate a Stripe checkout session for credit top-up.
/api/v2/billing/usage-historyList GPU-minute usage records.
/api/v2/billing/gpu-activeRead the active smart-billing session, elapsed time, and refund estimate.
/api/v2/gpu/statusRead GPU readiness, state, and task acceptance status.
/api/v2/gpu/startRequest GPU startup for generation workloads.
/api/v2/gpu/stopRequest graceful or immediate GPU shutdown.
API errors include a stable code field when possible. Client applications should translate from that code and avoid parsing English message text.
The request is missing a valid bearer token.
The user is authenticated but the current role cannot perform the action.
Recipe inputs failed validation. Check the recipe input_schema.
A session-scoped endpoint needs X-Session-ID or a session cookie.
The session does not exist or the current user does not have access.
Credits or billing service state prevents GPU execution.
A shared-user credit limit blocks the run.
Media download ids are missing or inaccessible.
Check required sockets, missing uploads, empty prompts, GPU readiness, and account balance. The Inspector lists connected and missing inputs.
Inspect the exact node settings, negative prompt, selected media index, and whether a loop override changed the run.
Read the backend error code, validate the recipe input schema, and confirm required URLs or text inputs are present.
Open Billing to confirm available balance and active GPU sessions. If the project is large, contact sales for capacity planning.