Metadata-Version: 2.5
Name: usemo
Version: 0.1.1
Summary: Minimal zero-dependency Python client and CLI for the UseMo AI creative API.
Project-URL: Homepage, https://usemo.com/agents
Project-URL: Documentation, https://usemo.com/agents/start.md
Project-URL: Repository, https://github.com/gaufire/usemo-mcp
Project-URL: Issues, https://github.com/gaufire/usemo-mcp/issues
Author-email: UseMo <support@usemo.com>
License-Expression: MIT
License-File: LICENSE
Keywords: ad-creative,ai-video,digital-twin,image-generation,mcp,talking-head,usemo
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# usemo

Minimal, zero-dependency Python client and CLI for the UseMo AI creative API (`https://api.usemo.com/api/v1`).

UseMo runs open-source and third-party base models (FLUX, SDXL, Wan, Qwen, Seedance, Seedream) inside a workspace-scoped pipeline with Brand Hub context and automated quality gates. Failed renders are refunded automatically.

- **Job Router (start here):** [https://usemo.com/agents/start.md](https://usemo.com/agents/start.md)
- **Agent & API Hub:** [https://usemo.com/agents](https://usemo.com/agents)
- **Hosted Streamable HTTP MCP (OAuth 2.1):** `https://api.usemo.com/mcp`
- **Universal Host Configs & Skills:** [https://github.com/gaufire/usemo-mcp](https://github.com/gaufire/usemo-mcp)

## Install

```bash
pip install usemo
```

## Quickstart

Create a workspace API key (`usm_...`) in `https://app.usemo.com/settings` and set `USEMO_API_KEY`:

```python
import os
from usemo import UseMoClient

client = UseMoClient(api_key=os.environ["USEMO_API_KEY"])

# 1. Verify workspace & credits (read-only)
me = client.whoami()

# 2. Estimate cost before rendering
quote = client.estimate_cost(lines=["Morning. Here is our Q4 update."])

# 3. Submit an idempotent image or video job
job = client.generate_image(
    "studio product photo of a ceramic coffee mug on warm oak",
    aspect_ratio="1:1",
    idempotency_key="mug-hero-001",
)

# 4. Poll job status
status = client.get_job(job["job_id"])
```

### Video & Talking-Head Methods

```python
video = client.create_video(
    "15-second product launch video for our API platform",
    idempotency_key="launch-001",
)

th = client.talking_head(
    face_image_url="https://example.com/presenter.jpg",
    lines=["Thanks, that works for me."],
    voice_id="onyx",
    idempotency_key="th-001",
)
```

### CLI Usage

```bash
export USEMO_API_KEY="usm_..."
usemo whoami
usemo estimate-cost --line "Hello from UseMo."
usemo generate-image "matte bottle on warm oak" --aspect-ratio 1:1
usemo get-job <job_id>
```

## Identity, Voice & Likeness Authorization

Digital twins, voice cloning, and portrait or face swaps require explicit documented authorization (`consent_confirmed: true` for adult face swaps and verified durable consent records for twins) and return HTTP `422` when authorization is missing or out of policy.

## License

MIT
