Official SDK

Official Python SDK

Search, download, and generate AI stock photos from Python. Sync and async clients, full type hints, Pydantic models.

pip install okslop
View on PyPI

Sync and async

Use `OKSLOP` for sync code or `AsyncOKSLOP` for async/await. Both have identical APIs.

Type-safe

Full type hints and Pydantic models. Works great with mypy, Pylance, and modern Python tooling.

Generated from spec

Models are auto-generated from the TypeScript SDK spec. Always in sync, never outdated.

Get started

Install in one command, configure in one line.

Configuration
from okslop import OKSLOP

client = OKSLOP()
result = client.images.search(query="coffee shop")
for image in result.results:
    print(image.id, image.alt_description)

Frequently asked questions

Ready to use OKSLOP in Python SDK?

Free AI-generated stock photos, right in your design tool. No attribution required.