Skip to main content

hermoso

The typed Python client for the Hermoso API: generate image and video ads, publish and schedule posts to your own channels, read your analytics, and call any of Hermoso's tools from your own backend.

pip install "git+https://github.com/hermoso-ai/hermoso-sdks#subdirectory=python"

Python 3.11+. Create an API key at app.hermoso.ai on the API, MCP & CLI tab, under Terminal & API keys, and set it as HERMOSO_API_KEY. New accounts start free with no card.

The client is generated from the API's OpenAPI document, so every /v1 operation has a typed function and every request and response a typed model. Each operation lives in hermoso.api.<group>.<operation> with sync, sync_detailed, asyncio and asyncio_detailed.

Generate an ad

from hermoso import create_client, run_tool, wait_for_job

client = create_client()  # reads HERMOSO_API_KEY

started = run_tool("generate_image", {
    "prompt": 'Summer launch ad for our cold brew: the can on a sunlit cafe table, headline "Cold. Brewed. Yours."',
    "job": "static_ad",
    "aspectRatio": "4:5",
}, client=client, wait=0)
job = wait_for_job(started.job_id, client=client)
print(job.url)  # the finished image, on your saved brand

run_tool reaches every Hermoso tool, the same set an agent gets over MCP: render_ad for video ads, plan_ad, clone_video, competitor research and the ad platforms. GET /v1/tools/{name} (or hermoso.api.tools.get_tool) describes each tool's arguments. Rendering costs credits; polling a job is free.

Schedule a post

import uuid
from hermoso.api.posts import create_post
from hermoso.models import PostCreate

post = create_post.sync(client=client, body=PostCreate.from_dict({
    "channels": ["instagram", "facebook"],
    "caption": "Cold. Brewed. Yours.",
    "media": [job.url],
    "scheduled_at": "2026-12-01T15:00:00Z",
}), idempotency_key=str(uuid.uuid4()))
print(post.id, post.status)

hermoso.api.channels.list_channels lists every channel and whether this brand has it connected. Omit scheduled_at to publish now. Publishing is free.

Read analytics

from hermoso import paginate
from hermoso.api.analytics import get_best_time
from hermoso.api.posts import list_posts

best = get_best_time.sync(client=client, channel="instagram", timezone="America/New_York")
for slot in best.slots[:5]:
    print(slot.day_of_week, slot.hour, slot.avg_engagement)

for post in paginate(list_posts, client=client, status="published"):
    print(post.id, post.scheduled_at)

paginate follows the cursor on any list operation until the last page.

Also

  • create_client(api_key=..., brand="<id from list_brands>") acts on one brand of an account that holds several.
  • wait_for_job(job_id, client=client) polls a render until it is done or error.
  • Errors come back as the typed Error model; the helpers raise HermosoError.
  • Async: every operation has asyncio(...).

Docs: hermoso.ai/docs/sdks · API reference: hermoso.ai/docs/api · OpenAPI: app.hermoso.ai/openapi.json · TypeScript: @hermoso/sdk

MIT licensed. Generated with openapi-python-client.

Metadata

Release files for hermoso 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hermoso 0.1.2
File Size Uploaded Provenance Actions
hermoso-0.1.2.tar.gz 114.3 kB With provenance Details for hermoso-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hermoso 0.1.2
File Interpreter ABI Platform Actions
hermoso-0.1.2-py3-none-any.whl Python 3 none any Details for hermoso-0.1.2-py3-none-any.whl

Total release size: 446.6 kB

Release files / hermoso-0.1.2.tar.gz

Download URL hermoso-0.1.2.tar.gz
Size 114.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7d9b5097fa52011e020adcaca872a63476ac6071bfc79db4e112b3ad5ceb76fd
BLAKE2b-256 checksum
How to use checksums
e82b16f2166dd081d9dbada0a129a8b96669bc169bc2f962c003fea9a74ddbdd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / hermoso-0.1.2-py3-none-any.whl

Download URL hermoso-0.1.2-py3-none-any.whl
Size 332.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ea8458a5adb7ca3742723e27da9762cfd74c7ff6db54ef2d4e1f8a560340fe0a
BLAKE2b-256 checksum
How to use checksums
3d60225789134a62fa75005ded36055dfa5e3cf885ecbbc18993c2abdbac5985
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for hermoso 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hermoso-0.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page