Skip to main content

promtexpress

Official Python client for the PromtExpress API. Standard library only, Python 3.9+.

pip install promtexpress

Usage

from promtexpress import PromtExpress

client = PromtExpress()  # reads PROMTEXPRESS_API_KEY

result = client.generate(
    "product launch email for a note-taking app, friendly tone",
    "text",  # text | code | image | video | audio | music
)
print(result["output"])
print(result["creditsRemaining"], "credits left")

Clarifying questions and iteration

if result.get("chipQuestions"):
    better = client.generate(
        "product launch email for a note-taking app",
        "text",
        answers=[{"question": result["chipQuestions"][0]["label"], "answer": "developers"}],
    )

refined = client.generate(
    "product launch email for a note-taking app",
    "text",
    iteration={"ofPromptId": result["promptId"], "feedback": "shorter, mention the free tier"},
)

Templates and history

templates = client.list_templates(modality="image")

page = client.list_history(page=0, limit=50)

for entry in client.iter_history(modality="video"):
    print(entry["date"], entry["title"])

API key scopes

Create keys in the PromtExpress dashboard under API Keys. The read scope covers list_templates, list_history and iter_history; generate covers generate (consumes credits); admin allows everything. Each key has its own rate limit.

Errors

All errors inherit from PromtExpressError: InvalidRequestError (400), AuthenticationError (401), PermissionDeniedError (403, with missing_scope), InsufficientCreditsError (402, with remaining and required), RateLimitError (429, with retry_after), ServerError (5xx) and APIConnectionError (network or timeout).

Time-based rate limits are retried automatically (max_retries, default 2).

License

MIT

Metadata

Release files for promtexpress 0.2.0

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

Source distribution (sdist)

Source distribution for promtexpress 0.2.0
File Size Uploaded
promtexpress-0.2.0.tar.gz 8.6 kB Details

Built distribution (wheel)

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

Total release size: 15.6 kB

Release files / promtexpress-0.2.0.tar.gz

Download URL promtexpress-0.2.0.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b45761124ed6089973e84a7d4b1d62bf7e266d9f2de4d4a81c8ac1750b81cbd4
BLAKE2b-256 checksum
How to use checksums
eeb3ca5772364432ab7bfcf7c65e8c4d8d1d1750a90885193f86725c661651b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 14, 2026.

Transparency log

Release files / promtexpress-0.2.0-py3-none-any.whl

Download URL promtexpress-0.2.0-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c2dcedb0064b9e13f0763d62005520db373c98e7224245cbbac78c54f89e044
BLAKE2b-256 checksum
How to use checksums
0d6ae6bbcde38b666b91c7f86bd01a4e70815afd98b6966d592dea680224357a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 14, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.1

2 release files

This release

0.2.0 This release

2 release files

0.1.0

2 release files

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