Skip to main content

Python SDK for AI Image Generator API

Reason this release was yanked:

final 0.1.4

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://images.chargingev.app",
        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://images.chargingev.app",
        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.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

ai_img_gen_python-0.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file ai_img_gen_python-0.1.0.tar.gz.

File metadata

  • Download URL: ai_img_gen_python-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for ai_img_gen_python-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1031c1af1739f773a5ead15ef2a1bfa8cae316e5e4326a81bc673faf0eab89a3
MD5 072a9ec0d16e7cf1845e58038def5eb3
BLAKE2b-256 66fd9336cbc590a53b06d5962834b524e515b945575a907c59adfd1e7fa8f044

See more details on using hashes here.

File details

Details for the file ai_img_gen_python-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ai_img_gen_python-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51549cd63a4d9ae53e55d37d836dc399b699d8e7e7a92d8ff53d4f7dc1c2dc04
MD5 fabc88149d7d1c264ee599f80d3e4a74
BLAKE2b-256 b06be0f8fb64926048eb02c0e47b2a432b28934a9c1b0347aae21a972301087e

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