Skip to main content
The Python SDK ships in the same package as the CLI. If you haven’t installed or authenticated yet, follow the Overview first.

Quickstart

Sync client

Async client

For application code that’s already async (FastAPI, aiohttp, anyio, etc.), use AsyncCekura:
The async client mirrors the sync API method-for-method — anything you can do with Cekura you can do with await AsyncCekura(...).

Resource map

The client exposes one attribute per top-level resource. Each provides typed methods (list, get, create, update, delete) plus resource-specific actions:
Use dir(client) in a REPL or help(client.agents) to discover everything available.

Common patterns

Configuration

The SDK resolves configuration in this order (first match wins):
  1. Explicit argumentCekura(api_key=..., api_url=...)
  2. Environment variableCEKURA_API_KEY, CEKURA_API_URL
  3. Config file~/.cekura/config.toml (managed by the CLI)
  4. Defaultshttps://api.cekura.ai
This means a developer can cekura auth login once and any Python script on the same machine picks up the OAuth session automatically — no API key needed.

Troubleshooting

  • OAuth path: the saved session expired. Re-run cekura auth login.
  • API key path: confirm CEKURA_API_KEY is set in the process environment, or pass Cekura(api_key=...) explicitly. Some endpoints (e.g. billing.info) require an org-scoped API key — OAuth bearer is not sufficient.
The platform enforces per-plan rate limits. Add backoff between calls, batch where possible, or upgrade your plan. Check usage in Settings → API Usage.
List endpoints return a paginated response shape: {"count": N, "next": url, "previous": url, "results": [...]}. Pass page= and page_size= to walk pages, or check results length to know when to stop.

References

CLI guide

Use the same operations from your terminal or CI pipeline.

API Reference

Full endpoint documentation for every resource the SDK exposes.