Skip to main content
All SDK and v1 API requests require an API key.

Python SDK

Pass key directly

from stewai import Client

client = Client(api_key="your-api-key")

Or use environment variable

export STEWAI_API_KEY="your-api-key"
from stewai import Client

client = Client()  # reads STEWAI_API_KEY
api_key= takes precedence over STEWAI_API_KEY when both are provided. If neither is provided, Client(...) raises ValueError.

REST API v1

Send the key as Bearer auth:
curl -X POST https://api.stewai.com/v1/runs/ \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"recipe_id": "01JEXAMPLE00000000000000000"}'

Security

Never commit API keys to source control. Rotate compromised keys immediately.

Next steps