What Agents Should Prefer
For interactive agents, prefer hosted MCP:LAMINA_API_KEY. Hosted MCP and REST share the
same runtime model: create work, preserve runId, wait or subscribe to completion, inspect typed
outputs, and reuse final artifacts explicitly.
Recipe 1: Hosted MCP Creative Run
After installing Lamina MCP in Claude Code, Codex, Cursor, or another MCP client, use this flow:1
Create
Call
lamina_create with brief, platform, and modality.2
Clarify if needed
If the response status is
needs_input, ask the user for the listed missing fields and call
lamina_create again with those values in inputs.3
Wait
Call
lamina_status with runId and wait=true.4
Reuse
Inspect each output’s
type, status, and value. Reuse completed asset URLs as explicit
references in the next Lamina run.Recipe 2: TypeScript Agent With SDK
Use this for Node.js agents, backend workers, and agent runtimes that own their own API key.Recipe 3: Python Agent With REST
Use this when the agent is written in Python or runs in an environment without the TypeScript SDK.Recipe 4: Brand-Aware Planning
Agents should call brand context before generating when the user asks for brand-safe, campaign-safe, or performance-aware content.lamina_brand before lamina_create when the agent needs explicit voice,
visual, guardrail, or winning-pattern context.
Recipe 5: Artifact Reuse
Agents should not scrape provider-specific payloads. Treat completed outputs with stringvalue
fields as reusable artifact URLs.
Smoke Test Checklist
Run this checklist for every supported MCP client before broad distribution:- Install
https://app.uselamina.ai/mcp/agent. - Complete OAuth and choose a workspace.
- Confirm the client lists the Lamina tools.
- Call
lamina_discoverfor an image or video launch brief. - Call
lamina_createwith a simple brief. - If
needs_inputis returned, provide the missing input and retry. - Call
lamina_statuswithwait=true. - Confirm completed outputs include typed values the agent can reuse.
- Remove or revoke the client after testing if it used a temporary workspace.
Troubleshooting
authorization_required: start OAuth from the MCP client or reinstall the hosted server.insufficient_scope: reconnect and approve the requested scope.needs_input: ask the user for the listed missing field; do not start a run with guessed data.failed: surfaceerrorMessageand output-level errors; do not blindly retry invalid inputs.- Timeout while waiting: call
lamina_statusagain with the samerunId.