Skip to main content

Python SDK for AI Image Generator API

Reason this release was yanked:

expo url

Project description

AI Image Generator Python SDK

PyPI version License: MIT Python Versions

A Python SDK for interacting with the AI Image Generator API.

Installation

pip install ai-img-gen-python

Quick Start

from ai_img_gen import AIImageGeneratorClient, ClientConfig, ImageGenerationOptions

# Initialize the client
client = AIImageGeneratorClient(
    ClientConfig(
        base_url="https://api.img-gen.ai",
        api_key="your_api_key_here"
    )
)

Generate an image

options = ImageGenerationOptions(
    width=512,
    height=512,
    prompt="A futuristic city with flying cars and neon lights",
    model="dall-e-2",
    format="png",
    quality=90,
    optimize=True
)

image_url = client.generate_image(options)
print(f"Generated image URL: {image_url}")
  1. Let's create a basic example:
from ai_img_gen import AIImageGeneratorClient, ClientConfig, ImageGenerationOptions

# Initialize the client
client = AIImageGeneratorClient(
    ClientConfig(
        base_url="https://api.img-gen.ai",
        api_key="your_api_key_here"
    )
)

# Generate an image
options = ImageGenerationOptions(
    width=512,
    height=512,
    prompt="A futuristic city with flying cars and neon lights",
    model="dall-e-2",
    format="png",
    quality=90,
    optimize=True
)

image_url = client.generate_image(options)
print(f"Generated image URL: {image_url}")

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

ai_img_gen_python-0.1.3.post20250314131817.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file ai_img_gen_python-0.1.3.post20250314131817.tar.gz.

File metadata

File hashes

Hashes for ai_img_gen_python-0.1.3.post20250314131817.tar.gz
Algorithm Hash digest
SHA256 238bf0685b45e25ee5b554189093820aea60c645371c22820061b54c14f82774
MD5 ec7c212bc084466751815c7a35e68a5b
BLAKE2b-256 a723e79beca2ac8ccead4298168baadc91cf9a3a3a447d34ce308e6b217a5c6f

See more details on using hashes here.

File details

Details for the file ai_img_gen_python-0.1.3.post20250314131817-py3-none-any.whl.

File metadata

File hashes

Hashes for ai_img_gen_python-0.1.3.post20250314131817-py3-none-any.whl
Algorithm Hash digest
SHA256 1ae41862799d9bb947bd6afb08d21fdac4477a2d4fe9d39b72429baa6d852aca
MD5 5f06696fead9132a86a0fe9f1be5b2d8
BLAKE2b-256 02dd2acb87dd58ad0a25ffe7ff458cb36c2e2eb6de3597f7a6e8dcadf64ad33c

See more details on using hashes here.

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