Metadata-Version: 2.4
Name: hexgenerative
Version: 1.0.0
Summary: Official Python SDK for Hexa AI - Lightning-Fast AI API
Author-email: Hexa Innovate <support@shipflowstore.store>
Maintainer-email: Hexa Innovate <support@shipflowstore.store>
License: MIT
Project-URL: Homepage, https://shipflowstore.store
Project-URL: Documentation, https://docs.shipflowstore.store
Project-URL: Repository, https://github.com/hexainnovate/hexgenerative-python
Project-URL: Changelog, https://github.com/hexainnovate/hexgenerative-python/blob/main/CHANGELOG.md
Project-URL: Bug Tracker, https://github.com/hexainnovate/hexgenerative-python/issues
Keywords: ai,api,hexa,llm,chat,generative,openai,gpt,machine-learning
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx>=0.24.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Dynamic: license-file

# Hexa Generative AI - Python SDK

Official Python client for Hexa AI API.

## Installation

```bash
pip install hexgenerative
```

## Quick Start

```python
from hexgenerative import HexaAI

# Initialize client
client = HexaAI(api_key="hgx-your-api-key")

# Create chat completion
response = client.chat.completions.create(
    model="hexa-pro",
    messages=[
        {"role": "user", "content": "Explain quantum computing in simple terms"}
    ]
)

print(response.choices[0].message.content)
```

## Available Models

| Model | Description | Best For |
|-------|-------------|----------|
| `hexa-instant` | Fastest model | Quick responses, simple tasks |
| `hexa-balanced` | General purpose | Most use cases |
| `hexa-reasoning` | Deep analysis | Complex reasoning |
| `hexa-advanced` | Coding expert | Programming tasks |
| `hexa-pro` | Premium quality | Best results |
| `hexa-vision-scout` | Vision model | Image understanding |

## Smart Routing

Let Hexa AI pick the best model automatically:

```python
# By task type
response = client.chat.completions.create(
    task="coding",
    messages=[{"role": "user", "content": "Write a Python function"}]
)

# By optimization preference
response = client.chat.completions.create(
    optimize_for="speed",
    messages=[{"role": "user", "content": "Quick answer please"}]
)

# Full auto-select
response = client.chat.completions.create(
    auto_select=True,
    messages=[{"role": "user", "content": "Your message"}]
)
```

## Async Support

```python
import asyncio
from hexgenerative import HexaAI

client = HexaAI(api_key="hgx-your-api-key")

async def main():
    response = await client.chat.completions.acreate(
        model="hexa-pro",
        messages=[{"role": "user", "content": "Hello!"}]
    )
    print(response.choices[0].message.content)

asyncio.run(main())
```

## Error Handling

```python
from hexgenerative import HexaAI
from hexgenerative.client import HexaAIError

client = HexaAI(api_key="hgx-your-api-key")

try:
    response = client.chat.completions.create(
        model="hexa-pro",
        messages=[{"role": "user", "content": "Hello"}]
    )
except HexaAIError as e:
    print(f"Error: {e.message}")
    print(f"Status: {e.status_code}")
```

## License

MIT
