ai
Installation
SKILL.md
AI SDK for Python
Package: ai. Requires Python 3.12+. Install with uv add ai.
Unprefixed model IDs use AI Gateway and AI_GATEWAY_API_KEY. Direct providers
use provider:model, their API key, and an extra:
uv add "ai[openai]" # OPENAI_API_KEY, ai.get_model("openai:gpt-5")
uv add "ai[anthropic]" # ANTHROPIC_API_KEY, ai.get_model("anthropic:claude-sonnet-4")
Basic use
Use ai.stream for one model call without Python tool execution:
import ai