# Lamina for Developers

> The creative API for AI agents and apps. Pass a brief and a brand kit; get a full campaign back. Available as a REST API, a TypeScript and Python SDK, and an MCP server that any agent client (Claude, Cursor, Windsurf, VS Code, Zed) can call directly.

Canonical page: https://uselamina.ai/developers

## What you get

- **One creative API** instead of stitching together image, video, try-on, and editing models.
- **Typed JSON responses**, schema-validated end to end. Safe for agent parsing.
- **Idempotent jobs** — every job accepts an idempotency key. Retries are free.
- **SSE streaming** of phase and progress events for every long-running job.
- **Deterministic** — same brief + brand + seed produces the same output.
- **Brand grounding** — every output respects palette, voice, and rules from the brand kit.
- **Rubric-based evaluation** — score outputs against the brand kit before shipping.
- **Distribution** — push assets to S3, Google Drive, Sanity, Shopify, or any webhook.

## Three integration paths

1. **REST API** — `https://api.uselamina.ai/v1`. Auth via `Authorization: Bearer <api_key>`.
2. **SDK** — `@lamina/sdk` (TypeScript) and `lamina` (Python). Typed responses (Zod / Pydantic).
3. **MCP server** — `@lamina/mcp`. Install with `npx @lamina/mcp install`. Works in any MCP client.

## Quickstart (3 minutes)

```bash
# 1. Install the MCP server (or just use the SDK / REST directly)
npx @lamina/mcp install

# 2. Set your API key
export LAMINA_API_KEY=sk_live_...

# 3. From your agent client (Claude, Cursor, etc.), call:
#    lamina.brand_lookup → lamina.create → lamina.track → lamina.evaluate → lamina.distribute
```

## REST endpoints (selected)

- `POST /v1/jobs` — create a creative job. Body: `{ app, brief, brand_id, seed?, idempotency_key? }`. Returns `{ job_id, status, eta_ms }`.
- `GET /v1/jobs/{job_id}` — fetch job status and outputs.
- `GET /v1/jobs/{job_id}/events` — SSE stream of phase and progress events.
- `POST /v1/jobs/{job_id}/evaluate` — score outputs against a rubric.
- `POST /v1/distribute` — push assets to S3, Drive, Sanity, Shopify, or a webhook.
- `GET /v1/brands/{brand_id}` — fetch a brand kit.
- `GET /v1/apps` — list creative apps available in the account.

## MCP tools (5)

1. **`lamina.create(app, brief, brand) -> { job_id, eta_ms }`** — kick off any creative app.
2. **`lamina.track(job_id) -> stream<{ phase, progress, asset_url? }>`** — stream phase + progress events.
3. **`lamina.evaluate(job_id, rubric) -> { scores[] }`** — score outputs against a brand rubric.
4. **`lamina.distribute(assets, targets[]) -> { ok, deliveries[] }`** — deliver to S3, Drive, Sanity, Shopify, or a webhook.
5. **`lamina.brand_lookup(brand) -> { palette, voice, rules, references[] }`** — read brand kit for grounded prompts.

## Agent integration patterns

- **One-shot**: `brand_lookup` → `create` → `track` → `evaluate` → `distribute`.
- **Iterative refinement**: `create` with seed S → `evaluate` → re-`create` with adjusted brief and same seed for controlled variation.
- **Bulk**: parallelize `create` across SKUs; fan in via `evaluate` and ship the top-K per SKU through `distribute`.

## Supported MCP clients

Claude (desktop and Claude Code), Cursor, Windsurf, VS Code, Zed, and any other MCP-compatible client. Non-MCP automation tools (Raycast, n8n, Zapier) integrate via the REST API.

## Open source

- GitHub org: https://github.com/uselamina
- SDK: https://github.com/uselamina/sdk
- MCP server: https://github.com/uselamina/lamina-mcp
- CLI: https://github.com/uselamina/lamina-cli

## Pricing

Per-credit pricing. Credits are consumed by job type (a packshot costs less than a 9:16 reel). See https://uselamina.ai/pricing.

## Trust & security

- SOC 2 posture and sub-processor disclosure: https://uselamina.ai/security and https://uselamina.ai/sub-processors.
- Customer assets are not used to train third-party foundation models.
- Brand kits and outputs are tenant-isolated.

## Related

- [HTML page](https://uselamina.ai/developers)
- [llms.txt](https://uselamina.ai/llms.txt)
- [llms-full.txt](https://uselamina.ai/llms-full.txt)
- [Pricing](https://uselamina.ai/pricing) · [Apps](https://uselamina.ai/apps) · [FAQ](https://uselamina.ai/faq)
