Metadata-Version: 2.1
Name: aether-ai-sdk
Version: 0.3.3
Summary: Official Python SDK for Aether AI (https://aiaether.ai.studio) - Chat with AI models via streaming API.
Project-URL: Homepage, https://aiaether.ai.studio
Project-URL: Documentation, https://aiaether.ai.studio
Project-URL: Repository, https://pypi.org/project/aether-ai-sdk
License: MIT
Requires-Python: >=3.10
Requires-Dist: httpx<1,>=0.27
Requires-Dist: pydantic<3,>=2.7
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Description-Content-Type: text/markdown

# Aether AI SDK

Official Python SDK for [Aether AI](https://aiaether.ai.studio) - Chat with AI models and generate images via streaming API.

## Installation

```bash
pip install aether-ai-sdk
```

## Getting Your API Key

1. Visit [https://aiaether.ai.studio](https://aiaether.ai.studio)
2. Sign up or log in to your account
3. Navigate to **Settings > API Keys**
4. Click **Create New Key**
5. Copy your API key (starts with `at_live_`)

## Quick Start

```python
from aether_ai_sdk import AI

# Initialize client with your API key
client = AI(api_key="at_live_your_api_key_here")

# Send a message
response = client.chat.create(
    model="DeepSeek-R1-Distill-Llama-8B-OpenSource",
    messages=[{"role": "user", "content": "Hello, how are you?"}]
)
print(response.output_text)
```

## Chat

### Create a Conversation

```python
from aether_ai_sdk import AI

client = AI(api_key="at_live_your_api_key_here")

# Create a new conversation
conversation = client.chat.conversations.create(
    model="DeepSeek-R1-Distill-Llama-8B-OpenSource",
    system_prompt="You are a helpful assistant."
)

print(f"Conversation ID: {conversation.id}")
```

### Send a Message

```python
# Send a message to an existing conversation
response = client.chat.messages.create(
    conversation.id,
    content="What is Python?"
)
print(response.output_text)
```

### List Conversations

```python
# List all conversations
conversations = client.chat.conversations.list()

for conv in conversations:
    print(f"{conv.title} - {conv.model}")
```

### Stream Responses

```python
# Stream a response
conversation = client.chat.conversations.create(
    model="DeepSeek-R1-Distill-Llama-8B-OpenSource"
)

for event in client.chat.messages.stream(conversation.id, content="Tell me a story"):
    if event.type == "delta":
        print(event.chunk, end="", flush=True)
```

## Image Generation

### Generate an Image

```python
from aether_ai_sdk import AI

client = AI(api_key="at_live_your_api_key_here")

# Generate an image
response = client.images.generate(
    prompt="A sunset over mountains",
    aspect_ratio="16:9",  # Options: 1:1, 16:9, 9:16, 4:3, 3:4
    enhance=True  # Uses Gemini 3.6 Flash prompt enhancer
)

print(f"Image URL: {response.image_url}")
print(f"Enhanced Prompt: {response.enhanced_prompt}")
```

### Image Generation Options

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `prompt` | str | required | Description of the image to generate |
| `aspect_ratio` | str | "1:1" | Image dimensions: 1:1, 16:9, 9:16, 4:3, 3:4 |
| `enhance` | bool | False | Enhance prompt using Gemini 3.6 Flash |
| `conversation_id` | str | None | Link to a conversation for context |

## Configuration

```python
from aether_ai_sdk import AI

client = AI(
    api_key="at_live_your_api_key_here",
    base_url="https://aiaether.ai.studio",  # Default
    timeout=60.0,                           # Request timeout in seconds
    max_retries=2                           # Number of retry attempts
)
```

## Environment Variables

You can also configure the client using environment variables:

```bash
export AI_API_KEY="at_live_your_api_key_here"
export AI_BASE_URL="https://aiaether.ai.studio"
export AI_TIMEOUT="60.0"
export AI_MAX_RETRIES="2"
```

```python
from aether_ai_sdk import AI

# Will use environment variables
client = AI()
```

## Available Models

- `DeepSeek-R1-Distill-Llama-8B-OpenSource`

Visit [https://aiaether.ai.studio](https://aiaether.ai.studio) for the latest list of available models.

## Error Handling

```python
from aether_ai_sdk import AI, AuthenticationError, RateLimitError

try:
    client = AI(api_key="invalid_key")
    response = client.chat.create(
        model="DeepSeek-R1-Distill-Llama-8B-OpenSource",
        messages=[{"role": "user", "content": "Hello"}]
    )
except AuthenticationError as e:
    print(f"Invalid API key: {e}")
except RateLimitError as e:
    print(f"Rate limit exceeded: {e}")
except Exception as e:
    print(f"Error: {e}")
```

## Links

- Website: [https://aiaether.ai.studio](https://aiaether.ai.studio)
- PyPI: [https://pypi.org/project/aether-ai-sdk](https://pypi.org/project/aether-ai-sdk)
- API Documentation: [https://aiaether.ai.studio/docs](https://aiaether.ai.studio/docs)

## License

MIT