Skip to main content

Python SDK for AI Image Generator API

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.4.post20250314132522.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.4.post20250314132522.tar.gz.

File metadata

File hashes

Hashes for ai_img_gen_python-0.1.4.post20250314132522.tar.gz
Algorithm Hash digest
SHA256 9246010f4eb0cc7039c729fd73b68cb28f2d34c0ceea1dc11e98687e2b71a677
MD5 2250f9a854d0f71156258f4395792d3c
BLAKE2b-256 739080b805b8eb4668fcce9c1eb658e5b7e05549b2bc5f264ecd6897e7370b36

See more details on using hashes here.

File details

Details for the file ai_img_gen_python-0.1.4.post20250314132522-py3-none-any.whl.

File metadata

File hashes

Hashes for ai_img_gen_python-0.1.4.post20250314132522-py3-none-any.whl
Algorithm Hash digest
SHA256 f114746a4cb476cb7d7f18a47b670528c4a723382fd91680bd26cffcc20eb2c8
MD5 cb789b1c82ccc4c00c9b48699d1de6d5
BLAKE2b-256 4be6defd007929b779add8a411585542d8c3bbd545024f8a85076c7546cb57d2

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