Skip to main content

Official Python SDK for the Crayonz AI API — meme, content, and design generation.

Project description

crayonz

Official Python SDK for the Crayonz AI API — meme, content, and design generation.

Install

pip install crayonz

Quickstart

from crayonz import Client

client = Client(api_key="cz_live_...")  # or os.environ["CRAYONZ_API_KEY"]

# Generate memes
memes = client.memes.generate(topic="coding", tone="sarcastic", count=3)
print(memes["memes"][0]["image_url"])

# Generate a blog post
blog = client.content.generate_blog(topic="campus life productivity", target_length=1500)

# Generate a design
design = client.design.generate(prompt="minimalist mountain logo", style="vector")

Authentication

Get an API key at crayonz.ai/api-console/keys. Keys begin with cz_live_ (production) or cz_test_ (sandbox, free).

Cost-allocation tags

Group usage across projects:

client = Client(api_key="cz_live_...", tag="project=launch-campaign")

The tag shows up in the usage dashboard under "By Tag".

Error handling

from crayonz import Client, CrayonzError

try:
    client.memes.generate(topic="x")
except CrayonzError as e:
    print(e.status, e.endpoint, e.body)

Context manager

with Client(api_key="cz_live_...") as client:
    trends = client.design.discover_trends(category="apparel")

Configuration

Client(
    api_key="cz_live_...",
    tag="project=foo",        # optional cost tag
    timeout=60.0,             # default 60s
    base_urls={               # override service URLs (rare)
        "memes": "https://...",
        "content": "https://...",
        "design": "https://...",
    },
)

Requirements

Python 3.9+.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crayonz-0.1.4.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crayonz-0.1.4-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file crayonz-0.1.4.tar.gz.

File metadata

  • Download URL: crayonz-0.1.4.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for crayonz-0.1.4.tar.gz
Algorithm Hash digest
SHA256 62de04c936ea65203d3c206bb98abaf1d3efd3b2f8adc441afa7070aa5f77a2a
MD5 5be3352616dea170157a50f503316edb
BLAKE2b-256 cc5b7c7350d1e225eb56f5a396da6d8fa2ec0a932ee8874a6daea04f71a54d3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for crayonz-0.1.4.tar.gz:

Publisher: publish.yml on iitian-vibes/crayonz-sdks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file crayonz-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: crayonz-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for crayonz-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fd6a8b8d0695e5d3fb45b60334a7aab9ba09ac255ddae057ae09c2a98922a944
MD5 3f0d6e554925023d6847fb3c2e94ca94
BLAKE2b-256 3645e13d44cd4c0422b9b8836e0262873a24a7571abdeb83f27777ee42767e8a

See more details on using hashes here.

Provenance

The following attestation bundles were made for crayonz-0.1.4-py3-none-any.whl:

Publisher: publish.yml on iitian-vibes/crayonz-sdks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page