python-sdklisted
Install: claude install-skill aiskillstore/marketplace
# Python SDK
Build AI applications with the [inference.sh](https://inference.sh) Python SDK.

## Quick Start
```bash
pip install inferencesh
```
```python
from inferencesh import inference
client = inference(api_key="inf_your_key")
# Run an AI app
result = client.run({
"app": "infsh/flux-schnell",
"input": {"prompt": "A sunset over mountains"}
})
print(result["output"])
```
## Installation
```bash
# Standard installation
pip install inferencesh
# With async support
pip install inferencesh[async]
```
**Requirements:** Python 3.8+
## Authentication
```python
import os
from inferencesh import inference
# Direct API key
client = inference(api_key="inf_your_key")
# From environment variable (recommended)
client = inference(api_key=os.environ["INFERENCE_API_KEY"])
```
Get your API key: Settings → API Keys → Create API Key
## Running Apps
### Basic Execution
```python
result = client.run({
"app": "infsh/flux-schnell",
"input": {"prompt": "A cat astronaut"}
})
print(result["status"]) # "completed"
print(result["output"]) # Output data
```
### Fire and Forget
```python
task = client.run({
"app": "google/veo-3-1-fast",
"input": {"prompt": "Drone flying over mountains"}
}, wait=False)
print(f"Task ID: {task['id']}")
# Check later with client.get_task(task['id'])
```
### Streaming Progress
```python
for update in client.run({